@commercetools-frontend/i18n 22.32.2 → 22.33.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.
|
@@ -5,16 +5,8 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var _pt = require('prop-types');
|
|
6
6
|
var react = require('react');
|
|
7
7
|
var sentry = require('@commercetools-frontend/sentry');
|
|
8
|
-
var _Object$keys = require('@babel/runtime-corejs3/core-js-stable/object/keys');
|
|
9
|
-
var _Object$getOwnPropertySymbols = require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols');
|
|
10
|
-
var _filterInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/filter');
|
|
11
|
-
var _Object$getOwnPropertyDescriptor = require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor');
|
|
12
|
-
var _forEachInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/for-each');
|
|
13
|
-
var _Object$getOwnPropertyDescriptors = require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors');
|
|
14
|
-
var _Object$defineProperties = require('@babel/runtime-corejs3/core-js-stable/object/define-properties');
|
|
15
|
-
var _Object$defineProperty = require('@babel/runtime-corejs3/core-js-stable/object/define-property');
|
|
16
|
-
var _defineProperty = require('@babel/runtime-corejs3/helpers/defineProperty');
|
|
17
8
|
var _slicedToArray = require('@babel/runtime-corejs3/helpers/slicedToArray');
|
|
9
|
+
var _Promise = require('@babel/runtime-corejs3/core-js-stable/promise');
|
|
18
10
|
var _includesInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/includes');
|
|
19
11
|
var _reduceInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/reduce');
|
|
20
12
|
var _Object$entries = require('@babel/runtime-corejs3/core-js-stable/object/entries');
|
|
@@ -44,14 +36,7 @@ function _interopNamespace(e) {
|
|
|
44
36
|
}
|
|
45
37
|
|
|
46
38
|
var _pt__default = /*#__PURE__*/_interopDefault(_pt);
|
|
47
|
-
var
|
|
48
|
-
var _Object$getOwnPropertySymbols__default = /*#__PURE__*/_interopDefault(_Object$getOwnPropertySymbols);
|
|
49
|
-
var _filterInstanceProperty__default = /*#__PURE__*/_interopDefault(_filterInstanceProperty);
|
|
50
|
-
var _Object$getOwnPropertyDescriptor__default = /*#__PURE__*/_interopDefault(_Object$getOwnPropertyDescriptor);
|
|
51
|
-
var _forEachInstanceProperty__default = /*#__PURE__*/_interopDefault(_forEachInstanceProperty);
|
|
52
|
-
var _Object$getOwnPropertyDescriptors__default = /*#__PURE__*/_interopDefault(_Object$getOwnPropertyDescriptors);
|
|
53
|
-
var _Object$defineProperties__default = /*#__PURE__*/_interopDefault(_Object$defineProperties);
|
|
54
|
-
var _Object$defineProperty__default = /*#__PURE__*/_interopDefault(_Object$defineProperty);
|
|
39
|
+
var _Promise__default = /*#__PURE__*/_interopDefault(_Promise);
|
|
55
40
|
var _includesInstanceProperty__default = /*#__PURE__*/_interopDefault(_includesInstanceProperty);
|
|
56
41
|
var _reduceInstanceProperty__default = /*#__PURE__*/_interopDefault(_reduceInstanceProperty);
|
|
57
42
|
var _Object$entries__default = /*#__PURE__*/_interopDefault(_Object$entries);
|
|
@@ -59,7 +44,7 @@ var _Object$assign__default = /*#__PURE__*/_interopDefault(_Object$assign);
|
|
|
59
44
|
var _startsWithInstanceProperty__default = /*#__PURE__*/_interopDefault(_startsWithInstanceProperty);
|
|
60
45
|
|
|
61
46
|
// NOTE: This string will be replaced on build time with the package version.
|
|
62
|
-
var version = "22.
|
|
47
|
+
var version = "22.33.0";
|
|
63
48
|
|
|
64
49
|
// @ts-nocheck
|
|
65
50
|
/* THIS IS A GENERATED FILE */
|
|
@@ -193,8 +178,6 @@ async function loadMomentLocales(locale) {
|
|
|
193
178
|
}
|
|
194
179
|
}
|
|
195
180
|
|
|
196
|
-
function ownKeys(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
197
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
198
181
|
const extractLanguageTagFromLocale = locale => _includesInstanceProperty__default["default"](locale).call(locale, '-') ? locale.split('-')[0] : locale;
|
|
199
182
|
const isStructuredJson = message => message?.string !== undefined;
|
|
200
183
|
const parseChunkImport = chunkImport => {
|
|
@@ -207,9 +190,8 @@ const parseChunkImport = chunkImport => {
|
|
|
207
190
|
messageKey = _ref2[0],
|
|
208
191
|
messageValue = _ref2[1];
|
|
209
192
|
const messageAsString = isStructuredJson(messageValue) ? messageValue.string : messageValue;
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
});
|
|
193
|
+
messages[messageKey] = messageAsString;
|
|
194
|
+
return messages;
|
|
213
195
|
}, {});
|
|
214
196
|
};
|
|
215
197
|
const mergeMessages = function () {
|
|
@@ -280,17 +262,19 @@ const getCommunityKitChunkImport = async locale => {
|
|
|
280
262
|
// Use default (lazy) so that we will receive one chunk per
|
|
281
263
|
// locale. https://webpack.js.org/api/module-methods/#import-
|
|
282
264
|
async function loadI18n(locale) {
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
265
|
+
const _await$Promise$all = await _Promise__default["default"].all([
|
|
266
|
+
// Load moment localizations
|
|
267
|
+
loadMomentLocales(locale),
|
|
268
|
+
// Load ui-kit translations
|
|
269
|
+
getUiKitChunkImport(locale),
|
|
270
|
+
// Load app-kit translations
|
|
271
|
+
getAppKitChunkImport(locale),
|
|
272
|
+
// Load community-kit translations
|
|
273
|
+
getCommunityKitChunkImport(locale)]),
|
|
274
|
+
_await$Promise$all2 = _slicedToArray(_await$Promise$all, 4),
|
|
275
|
+
uiKitChunkImport = _await$Promise$all2[1],
|
|
276
|
+
appKitChunkImport = _await$Promise$all2[2],
|
|
277
|
+
communityKitChunkImport = _await$Promise$all2[3];
|
|
294
278
|
|
|
295
279
|
// Prefer loading `default` (for ESM bundles) and
|
|
296
280
|
// fall back to normal import (for CJS bundles).
|
|
@@ -5,16 +5,8 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var _pt = require('prop-types');
|
|
6
6
|
var react = require('react');
|
|
7
7
|
var sentry = require('@commercetools-frontend/sentry');
|
|
8
|
-
var _Object$keys = require('@babel/runtime-corejs3/core-js-stable/object/keys');
|
|
9
|
-
var _Object$getOwnPropertySymbols = require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols');
|
|
10
|
-
var _filterInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/filter');
|
|
11
|
-
var _Object$getOwnPropertyDescriptor = require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor');
|
|
12
|
-
var _forEachInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/for-each');
|
|
13
|
-
var _Object$getOwnPropertyDescriptors = require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors');
|
|
14
|
-
var _Object$defineProperties = require('@babel/runtime-corejs3/core-js-stable/object/define-properties');
|
|
15
|
-
var _Object$defineProperty = require('@babel/runtime-corejs3/core-js-stable/object/define-property');
|
|
16
|
-
var _defineProperty = require('@babel/runtime-corejs3/helpers/defineProperty');
|
|
17
8
|
var _slicedToArray = require('@babel/runtime-corejs3/helpers/slicedToArray');
|
|
9
|
+
var _Promise = require('@babel/runtime-corejs3/core-js-stable/promise');
|
|
18
10
|
var _includesInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/includes');
|
|
19
11
|
var _reduceInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/reduce');
|
|
20
12
|
var _Object$entries = require('@babel/runtime-corejs3/core-js-stable/object/entries');
|
|
@@ -44,14 +36,7 @@ function _interopNamespace(e) {
|
|
|
44
36
|
}
|
|
45
37
|
|
|
46
38
|
var _pt__default = /*#__PURE__*/_interopDefault(_pt);
|
|
47
|
-
var
|
|
48
|
-
var _Object$getOwnPropertySymbols__default = /*#__PURE__*/_interopDefault(_Object$getOwnPropertySymbols);
|
|
49
|
-
var _filterInstanceProperty__default = /*#__PURE__*/_interopDefault(_filterInstanceProperty);
|
|
50
|
-
var _Object$getOwnPropertyDescriptor__default = /*#__PURE__*/_interopDefault(_Object$getOwnPropertyDescriptor);
|
|
51
|
-
var _forEachInstanceProperty__default = /*#__PURE__*/_interopDefault(_forEachInstanceProperty);
|
|
52
|
-
var _Object$getOwnPropertyDescriptors__default = /*#__PURE__*/_interopDefault(_Object$getOwnPropertyDescriptors);
|
|
53
|
-
var _Object$defineProperties__default = /*#__PURE__*/_interopDefault(_Object$defineProperties);
|
|
54
|
-
var _Object$defineProperty__default = /*#__PURE__*/_interopDefault(_Object$defineProperty);
|
|
39
|
+
var _Promise__default = /*#__PURE__*/_interopDefault(_Promise);
|
|
55
40
|
var _includesInstanceProperty__default = /*#__PURE__*/_interopDefault(_includesInstanceProperty);
|
|
56
41
|
var _reduceInstanceProperty__default = /*#__PURE__*/_interopDefault(_reduceInstanceProperty);
|
|
57
42
|
var _Object$entries__default = /*#__PURE__*/_interopDefault(_Object$entries);
|
|
@@ -59,7 +44,7 @@ var _Object$assign__default = /*#__PURE__*/_interopDefault(_Object$assign);
|
|
|
59
44
|
var _startsWithInstanceProperty__default = /*#__PURE__*/_interopDefault(_startsWithInstanceProperty);
|
|
60
45
|
|
|
61
46
|
// NOTE: This string will be replaced on build time with the package version.
|
|
62
|
-
var version = "22.
|
|
47
|
+
var version = "22.33.0";
|
|
63
48
|
|
|
64
49
|
// @ts-nocheck
|
|
65
50
|
/* THIS IS A GENERATED FILE */
|
|
@@ -193,8 +178,6 @@ async function loadMomentLocales(locale) {
|
|
|
193
178
|
}
|
|
194
179
|
}
|
|
195
180
|
|
|
196
|
-
function ownKeys(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
197
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
198
181
|
const extractLanguageTagFromLocale = locale => _includesInstanceProperty__default["default"](locale).call(locale, '-') ? locale.split('-')[0] : locale;
|
|
199
182
|
const isStructuredJson = message => message?.string !== undefined;
|
|
200
183
|
const parseChunkImport = chunkImport => {
|
|
@@ -207,9 +190,8 @@ const parseChunkImport = chunkImport => {
|
|
|
207
190
|
messageKey = _ref2[0],
|
|
208
191
|
messageValue = _ref2[1];
|
|
209
192
|
const messageAsString = isStructuredJson(messageValue) ? messageValue.string : messageValue;
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
});
|
|
193
|
+
messages[messageKey] = messageAsString;
|
|
194
|
+
return messages;
|
|
213
195
|
}, {});
|
|
214
196
|
};
|
|
215
197
|
const mergeMessages = function () {
|
|
@@ -280,17 +262,19 @@ const getCommunityKitChunkImport = async locale => {
|
|
|
280
262
|
// Use default (lazy) so that we will receive one chunk per
|
|
281
263
|
// locale. https://webpack.js.org/api/module-methods/#import-
|
|
282
264
|
async function loadI18n(locale) {
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
265
|
+
const _await$Promise$all = await _Promise__default["default"].all([
|
|
266
|
+
// Load moment localizations
|
|
267
|
+
loadMomentLocales(locale),
|
|
268
|
+
// Load ui-kit translations
|
|
269
|
+
getUiKitChunkImport(locale),
|
|
270
|
+
// Load app-kit translations
|
|
271
|
+
getAppKitChunkImport(locale),
|
|
272
|
+
// Load community-kit translations
|
|
273
|
+
getCommunityKitChunkImport(locale)]),
|
|
274
|
+
_await$Promise$all2 = _slicedToArray(_await$Promise$all, 4),
|
|
275
|
+
uiKitChunkImport = _await$Promise$all2[1],
|
|
276
|
+
appKitChunkImport = _await$Promise$all2[2],
|
|
277
|
+
communityKitChunkImport = _await$Promise$all2[3];
|
|
294
278
|
|
|
295
279
|
// Prefer loading `default` (for ESM bundles) and
|
|
296
280
|
// fall back to normal import (for CJS bundles).
|
|
@@ -1,16 +1,8 @@
|
|
|
1
1
|
import _pt from 'prop-types';
|
|
2
2
|
import { useState, useEffect, useCallback } from 'react';
|
|
3
3
|
import { reportErrorToSentry } from '@commercetools-frontend/sentry';
|
|
4
|
-
import _Object$keys from '@babel/runtime-corejs3/core-js-stable/object/keys';
|
|
5
|
-
import _Object$getOwnPropertySymbols from '@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols';
|
|
6
|
-
import _filterInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/filter';
|
|
7
|
-
import _Object$getOwnPropertyDescriptor from '@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor';
|
|
8
|
-
import _forEachInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/for-each';
|
|
9
|
-
import _Object$getOwnPropertyDescriptors from '@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors';
|
|
10
|
-
import _Object$defineProperties from '@babel/runtime-corejs3/core-js-stable/object/define-properties';
|
|
11
|
-
import _Object$defineProperty from '@babel/runtime-corejs3/core-js-stable/object/define-property';
|
|
12
|
-
import _defineProperty from '@babel/runtime-corejs3/helpers/esm/defineProperty';
|
|
13
4
|
import _slicedToArray from '@babel/runtime-corejs3/helpers/esm/slicedToArray';
|
|
5
|
+
import _Promise from '@babel/runtime-corejs3/core-js-stable/promise';
|
|
14
6
|
import _includesInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/includes';
|
|
15
7
|
import _reduceInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/reduce';
|
|
16
8
|
import _Object$entries from '@babel/runtime-corejs3/core-js-stable/object/entries';
|
|
@@ -20,7 +12,7 @@ import { jsx, Fragment } from '@emotion/react/jsx-runtime';
|
|
|
20
12
|
import { defineMessages } from 'react-intl';
|
|
21
13
|
|
|
22
14
|
// NOTE: This string will be replaced on build time with the package version.
|
|
23
|
-
var version = "22.
|
|
15
|
+
var version = "22.33.0";
|
|
24
16
|
|
|
25
17
|
// @ts-nocheck
|
|
26
18
|
/* THIS IS A GENERATED FILE */
|
|
@@ -154,8 +146,6 @@ async function loadMomentLocales(locale) {
|
|
|
154
146
|
}
|
|
155
147
|
}
|
|
156
148
|
|
|
157
|
-
function ownKeys(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
158
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context2 = ownKeys(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context3 = ownKeys(Object(t))).call(_context3, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
159
149
|
const extractLanguageTagFromLocale = locale => _includesInstanceProperty(locale).call(locale, '-') ? locale.split('-')[0] : locale;
|
|
160
150
|
const isStructuredJson = message => message?.string !== undefined;
|
|
161
151
|
const parseChunkImport = chunkImport => {
|
|
@@ -168,9 +158,8 @@ const parseChunkImport = chunkImport => {
|
|
|
168
158
|
messageKey = _ref2[0],
|
|
169
159
|
messageValue = _ref2[1];
|
|
170
160
|
const messageAsString = isStructuredJson(messageValue) ? messageValue.string : messageValue;
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
});
|
|
161
|
+
messages[messageKey] = messageAsString;
|
|
162
|
+
return messages;
|
|
174
163
|
}, {});
|
|
175
164
|
};
|
|
176
165
|
const mergeMessages = function () {
|
|
@@ -241,17 +230,19 @@ const getCommunityKitChunkImport = async locale => {
|
|
|
241
230
|
// Use default (lazy) so that we will receive one chunk per
|
|
242
231
|
// locale. https://webpack.js.org/api/module-methods/#import-
|
|
243
232
|
async function loadI18n(locale) {
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
233
|
+
const _await$Promise$all = await _Promise.all([
|
|
234
|
+
// Load moment localizations
|
|
235
|
+
loadMomentLocales(locale),
|
|
236
|
+
// Load ui-kit translations
|
|
237
|
+
getUiKitChunkImport(locale),
|
|
238
|
+
// Load app-kit translations
|
|
239
|
+
getAppKitChunkImport(locale),
|
|
240
|
+
// Load community-kit translations
|
|
241
|
+
getCommunityKitChunkImport(locale)]),
|
|
242
|
+
_await$Promise$all2 = _slicedToArray(_await$Promise$all, 4),
|
|
243
|
+
uiKitChunkImport = _await$Promise$all2[1],
|
|
244
|
+
appKitChunkImport = _await$Promise$all2[2],
|
|
245
|
+
communityKitChunkImport = _await$Promise$all2[3];
|
|
255
246
|
|
|
256
247
|
// Prefer loading `default` (for ESM bundles) and
|
|
257
248
|
// fall back to normal import (for CJS bundles).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@commercetools-frontend/i18n",
|
|
3
|
-
"version": "22.
|
|
3
|
+
"version": "22.33.0",
|
|
4
4
|
"description": "MC i18n messages",
|
|
5
5
|
"bugs": "https://github.com/commercetools/merchant-center-application-kit/issues",
|
|
6
6
|
"repository": {
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"@babel/runtime": "^7.22.15",
|
|
33
33
|
"@babel/runtime-corejs3": "^7.22.15",
|
|
34
34
|
"@commercetools-community-kit/i18n": "^0.3.0",
|
|
35
|
-
"@commercetools-frontend/sentry": "22.
|
|
35
|
+
"@commercetools-frontend/sentry": "22.33.0",
|
|
36
36
|
"@commercetools-uikit/i18n": "^19.9.0",
|
|
37
37
|
"@emotion/react": "^11.11.4",
|
|
38
38
|
"@formatjs/icu-messageformat-parser": "2.7.8",
|