@commercetools-frontend/l10n 22.23.3 → 22.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -256,8 +256,8 @@ However, there might be a case where the selected **data locale** does not match
|
|
|
256
256
|
|
|
257
257
|
The `formatLocalizedString` util is authored with the following in mind:
|
|
258
258
|
|
|
259
|
-
1. Help
|
|
260
|
-
2. Help
|
|
259
|
+
1. Help deriving a value of `LocalizedString` given a specified locale.
|
|
260
|
+
2. Help rendering a value derived from `LocalizedString`.
|
|
261
261
|
|
|
262
262
|
Let us take a look at the examples below putting this to action.
|
|
263
263
|
|
|
@@ -343,7 +343,7 @@ The default value of `fallback` is a `""`.
|
|
|
343
343
|
#### Fallback order
|
|
344
344
|
|
|
345
345
|
In **Scenario 2** above, we discussed that `formatLocalizedString` will pick the "next available value" from `product.name` when there is no matching value. In our case, the next available value was the locale `en`.
|
|
346
|
-
|
|
346
|
+
Merchant Center customizations developers can take full control over the order of attempted lookups of the value while there is no match. Before `formatLocalizedString` eventually proceeds to rendering what is specified as `fallback`.
|
|
347
347
|
|
|
348
348
|
`formatLocalizedString` accepts `fallbackOrder`, and this [test exemplifies the use case and resolve](./src/localize.spec.ts#L151:L170).
|
|
349
349
|
|
|
@@ -50,7 +50,7 @@ var moment__default = /*#__PURE__*/_interopDefault(moment);
|
|
|
50
50
|
var omit__default = /*#__PURE__*/_interopDefault(omit);
|
|
51
51
|
|
|
52
52
|
// NOTE: This string will be replaced on build time with the package version.
|
|
53
|
-
var version = "22.
|
|
53
|
+
var version = "22.24.0";
|
|
54
54
|
|
|
55
55
|
// https://babeljs.io/blog/2017/09/11/zero-config-with-babel-macros
|
|
56
56
|
const supportedLocales = ["en", "de", "es", "fr-FR", "pt-BR", "zh-CN"];
|
|
@@ -50,7 +50,7 @@ var moment__default = /*#__PURE__*/_interopDefault(moment);
|
|
|
50
50
|
var omit__default = /*#__PURE__*/_interopDefault(omit);
|
|
51
51
|
|
|
52
52
|
// NOTE: This string will be replaced on build time with the package version.
|
|
53
|
-
var version = "22.
|
|
53
|
+
var version = "22.24.0";
|
|
54
54
|
|
|
55
55
|
// https://babeljs.io/blog/2017/09/11/zero-config-with-babel-macros
|
|
56
56
|
const supportedLocales = ["en", "de", "es", "fr-FR", "pt-BR", "zh-CN"];
|
|
@@ -24,7 +24,7 @@ import moment from 'moment-timezone';
|
|
|
24
24
|
import omit from 'lodash/omit';
|
|
25
25
|
|
|
26
26
|
// NOTE: This string will be replaced on build time with the package version.
|
|
27
|
-
var version = "22.
|
|
27
|
+
var version = "22.24.0";
|
|
28
28
|
|
|
29
29
|
// https://babeljs.io/blog/2017/09/11/zero-config-with-babel-macros
|
|
30
30
|
const supportedLocales = ["en", "de", "es", "fr-FR", "pt-BR", "zh-CN"];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@commercetools-frontend/l10n",
|
|
3
|
-
"version": "22.
|
|
3
|
+
"version": "22.24.0",
|
|
4
4
|
"description": "React bindings to load l10n data",
|
|
5
5
|
"bugs": "https://github.com/commercetools/merchant-center-application-kit/issues",
|
|
6
6
|
"repository": {
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"url": "https://github.com/commercetools/merchant-center-application-kit.git",
|
|
9
9
|
"directory": "packages/l10n"
|
|
10
10
|
},
|
|
11
|
-
"homepage": "https://docs.commercetools.com/
|
|
11
|
+
"homepage": "https://docs.commercetools.com/merchant-center-customizations",
|
|
12
12
|
"keywords": [
|
|
13
13
|
"javascript",
|
|
14
14
|
"frontend",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@babel/runtime": "^7.22.15",
|
|
33
33
|
"@babel/runtime-corejs3": "^7.22.15",
|
|
34
|
-
"@commercetools-frontend/sentry": "22.
|
|
34
|
+
"@commercetools-frontend/sentry": "22.24.0",
|
|
35
35
|
"@emotion/react": "^11.11.4",
|
|
36
36
|
"@types/lodash": "^4.14.198",
|
|
37
37
|
"@types/prop-types": "^15.7.5",
|