@commercetools-frontend/i18n 21.6.0 → 21.9.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/LICENSE +1 -1
- package/compiled-data/core.json +14 -2
- package/dist/commercetools-frontend-i18n.cjs.dev.js +323 -39
- package/dist/commercetools-frontend-i18n.cjs.prod.js +323 -39
- package/dist/commercetools-frontend-i18n.esm.js +323 -39
- package/dist/declarations/src/export-types.d.ts +3 -0
- package/dist/declarations/src/load-i18n.d.ts +4 -2
- package/dist/declarations/src/moment-locales.d.ts +2 -0
- package/dist/declarations/src/utils.d.ts +0 -1
- package/package.json +11 -11
package/LICENSE
CHANGED
package/compiled-data/core.json
CHANGED
|
@@ -371,6 +371,12 @@
|
|
|
371
371
|
"value": "We are unable to authorize you to use the Merchant Center."
|
|
372
372
|
}
|
|
373
373
|
],
|
|
374
|
+
"LocaleSwitcher.localesLabel": [
|
|
375
|
+
{
|
|
376
|
+
"type": 0,
|
|
377
|
+
"value": "Locales menu"
|
|
378
|
+
}
|
|
379
|
+
],
|
|
374
380
|
"NavBar.MCSupport.title": [
|
|
375
381
|
{
|
|
376
382
|
"type": 0,
|
|
@@ -571,10 +577,10 @@
|
|
|
571
577
|
"value": "Sorry, but there are no projects that match your search."
|
|
572
578
|
}
|
|
573
579
|
],
|
|
574
|
-
"ProjectSwitcher.
|
|
580
|
+
"ProjectSwitcher.projectsLabel": [
|
|
575
581
|
{
|
|
576
582
|
"type": 0,
|
|
577
|
-
"value": "Projects"
|
|
583
|
+
"value": "Projects menu"
|
|
578
584
|
}
|
|
579
585
|
],
|
|
580
586
|
"ProjectSwitcher.searchPlaceholder": [
|
|
@@ -1021,6 +1027,12 @@
|
|
|
1021
1027
|
"value": "Logout"
|
|
1022
1028
|
}
|
|
1023
1029
|
],
|
|
1030
|
+
"UserSettingsMenu.menuLabel": [
|
|
1031
|
+
{
|
|
1032
|
+
"type": 0,
|
|
1033
|
+
"value": "User settings menu"
|
|
1034
|
+
}
|
|
1035
|
+
],
|
|
1024
1036
|
"UserSettingsMenu.openMenuLabel": [
|
|
1025
1037
|
{
|
|
1026
1038
|
"type": 0,
|
|
@@ -43,7 +43,7 @@ var _concatInstanceProperty__default = /*#__PURE__*/_interopDefault(_concatInsta
|
|
|
43
43
|
var _startsWithInstanceProperty__default = /*#__PURE__*/_interopDefault(_startsWithInstanceProperty);
|
|
44
44
|
|
|
45
45
|
// NOTE: This string will be replaced on build time with the package version.
|
|
46
|
-
var version = "21.
|
|
46
|
+
var version = "21.9.0";
|
|
47
47
|
|
|
48
48
|
var extractLanguageTagFromLocale = function extractLanguageTagFromLocale(locale) {
|
|
49
49
|
return _includesInstanceProperty__default["default"](locale).call(locale, '-') ? locale.split('-')[0] : locale;
|
|
@@ -57,14 +57,6 @@ var mergeMessages = function mergeMessages() {
|
|
|
57
57
|
|
|
58
58
|
return _Object$assign__default["default"].apply(Object, _concatInstanceProperty__default["default"](_context = [{}]).call(_context, messages));
|
|
59
59
|
};
|
|
60
|
-
var mapLocaleToMomentLocale = function mapLocaleToMomentLocale(locale) {
|
|
61
|
-
if (_startsWithInstanceProperty__default["default"](locale).call(locale, 'de')) return 'de';
|
|
62
|
-
if (_startsWithInstanceProperty__default["default"](locale).call(locale, 'es')) return 'es';
|
|
63
|
-
if (_startsWithInstanceProperty__default["default"](locale).call(locale, 'fr')) return 'fr';
|
|
64
|
-
if (locale === 'zh-CN') return 'zh-cn';
|
|
65
|
-
if (_startsWithInstanceProperty__default["default"](locale).call(locale, 'ja')) return 'ja';
|
|
66
|
-
return 'en-gb';
|
|
67
|
-
};
|
|
68
60
|
var mapLocaleToIntlLocale = function mapLocaleToIntlLocale(locale) {
|
|
69
61
|
if (_startsWithInstanceProperty__default["default"](locale).call(locale, 'de')) return 'de';
|
|
70
62
|
if (_startsWithInstanceProperty__default["default"](locale).call(locale, 'es')) return 'es';
|
|
@@ -74,41 +66,333 @@ var mapLocaleToIntlLocale = function mapLocaleToIntlLocale(locale) {
|
|
|
74
66
|
return 'en';
|
|
75
67
|
};
|
|
76
68
|
|
|
77
|
-
|
|
78
|
-
var momentLocale = mapLocaleToMomentLocale(locale);
|
|
69
|
+
// @ts-nocheck
|
|
79
70
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
'moment/locale/de')); });
|
|
71
|
+
/* THIS IS A GENERATED FILE */
|
|
72
|
+
function loadMomentLocales(_x) {
|
|
73
|
+
return _loadMomentLocales.apply(this, arguments);
|
|
74
|
+
}
|
|
85
75
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
76
|
+
function _loadMomentLocales() {
|
|
77
|
+
_loadMomentLocales = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee(locale) {
|
|
78
|
+
var lowercaseLocale;
|
|
79
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee$(_context) {
|
|
80
|
+
while (1) {
|
|
81
|
+
switch (_context.prev = _context.next) {
|
|
82
|
+
case 0:
|
|
83
|
+
lowercaseLocale = locale.toLowerCase();
|
|
84
|
+
_context.t0 = lowercaseLocale;
|
|
85
|
+
_context.next = _context.t0 === 'de' ? 4 : _context.t0 === 'de-at' ? 7 : _context.t0 === 'de-be' ? 10 : _context.t0 === 'de-ch' ? 13 : _context.t0 === 'de-de' ? 16 : _context.t0 === 'de-li' ? 19 : _context.t0 === 'de-lu' ? 22 : _context.t0 === 'en-au' ? 25 : _context.t0 === 'en-ca' ? 28 : _context.t0 === 'en-gb' ? 31 : _context.t0 === 'en-ie' ? 34 : _context.t0 === 'en-in' ? 37 : _context.t0 === 'en-nz' ? 40 : _context.t0 === 'en-sg' ? 43 : _context.t0 === 'es' ? 46 : _context.t0 === 'es-ar' ? 49 : _context.t0 === 'es-bo' ? 52 : _context.t0 === 'es-cl' ? 55 : _context.t0 === 'es-co' ? 58 : _context.t0 === 'es-cr' ? 61 : _context.t0 === 'es-cu' ? 64 : _context.t0 === 'es-do' ? 67 : _context.t0 === 'es-ea' ? 70 : _context.t0 === 'es-ec' ? 73 : _context.t0 === 'es-es' ? 76 : _context.t0 === 'es-gq' ? 79 : _context.t0 === 'es-gt' ? 82 : _context.t0 === 'es-hn' ? 85 : _context.t0 === 'es-ic' ? 88 : _context.t0 === 'es-mx' ? 91 : _context.t0 === 'es-ni' ? 94 : _context.t0 === 'es-pa' ? 97 : _context.t0 === 'es-pe' ? 100 : _context.t0 === 'es-pr' ? 103 : _context.t0 === 'es-py' ? 106 : _context.t0 === 'es-sv' ? 109 : _context.t0 === 'es-uy' ? 112 : _context.t0 === 'es-ve' ? 115 : _context.t0 === 'fr-fr' ? 118 : _context.t0 === 'ja' ? 121 : _context.t0 === 'ja-jp' ? 124 : _context.t0 === 'zh-cn' ? 127 : 130;
|
|
86
|
+
break;
|
|
90
87
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
'moment/locale/fr')); });
|
|
88
|
+
case 4:
|
|
89
|
+
_context.next = 6;
|
|
90
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('moment/dist/locale/de')); });
|
|
95
91
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
/* webpackChunkName: "i18n-moment-locale-zh-cn" */
|
|
99
|
-
'moment/locale/zh-cn')); });
|
|
92
|
+
case 6:
|
|
93
|
+
return _context.abrupt("break", 131);
|
|
100
94
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
'moment/locale/ja')); });
|
|
95
|
+
case 7:
|
|
96
|
+
_context.next = 9;
|
|
97
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('moment/dist/locale/de-at')); });
|
|
105
98
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
};
|
|
99
|
+
case 9:
|
|
100
|
+
return _context.abrupt("break", 131);
|
|
101
|
+
|
|
102
|
+
case 10:
|
|
103
|
+
_context.next = 12;
|
|
104
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('moment/dist/locale/de')); });
|
|
105
|
+
|
|
106
|
+
case 12:
|
|
107
|
+
return _context.abrupt("break", 131);
|
|
108
|
+
|
|
109
|
+
case 13:
|
|
110
|
+
_context.next = 15;
|
|
111
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('moment/dist/locale/de-ch')); });
|
|
112
|
+
|
|
113
|
+
case 15:
|
|
114
|
+
return _context.abrupt("break", 131);
|
|
115
|
+
|
|
116
|
+
case 16:
|
|
117
|
+
_context.next = 18;
|
|
118
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('moment/dist/locale/de')); });
|
|
119
|
+
|
|
120
|
+
case 18:
|
|
121
|
+
return _context.abrupt("break", 131);
|
|
122
|
+
|
|
123
|
+
case 19:
|
|
124
|
+
_context.next = 21;
|
|
125
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('moment/dist/locale/de')); });
|
|
126
|
+
|
|
127
|
+
case 21:
|
|
128
|
+
return _context.abrupt("break", 131);
|
|
129
|
+
|
|
130
|
+
case 22:
|
|
131
|
+
_context.next = 24;
|
|
132
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('moment/dist/locale/de')); });
|
|
133
|
+
|
|
134
|
+
case 24:
|
|
135
|
+
return _context.abrupt("break", 131);
|
|
136
|
+
|
|
137
|
+
case 25:
|
|
138
|
+
_context.next = 27;
|
|
139
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('moment/dist/locale/en-au')); });
|
|
140
|
+
|
|
141
|
+
case 27:
|
|
142
|
+
return _context.abrupt("break", 131);
|
|
143
|
+
|
|
144
|
+
case 28:
|
|
145
|
+
_context.next = 30;
|
|
146
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('moment/dist/locale/en-ca')); });
|
|
147
|
+
|
|
148
|
+
case 30:
|
|
149
|
+
return _context.abrupt("break", 131);
|
|
150
|
+
|
|
151
|
+
case 31:
|
|
152
|
+
_context.next = 33;
|
|
153
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('moment/dist/locale/en-gb')); });
|
|
154
|
+
|
|
155
|
+
case 33:
|
|
156
|
+
return _context.abrupt("break", 131);
|
|
157
|
+
|
|
158
|
+
case 34:
|
|
159
|
+
_context.next = 36;
|
|
160
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('moment/dist/locale/en-ie')); });
|
|
161
|
+
|
|
162
|
+
case 36:
|
|
163
|
+
return _context.abrupt("break", 131);
|
|
164
|
+
|
|
165
|
+
case 37:
|
|
166
|
+
_context.next = 39;
|
|
167
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('moment/dist/locale/en-in')); });
|
|
168
|
+
|
|
169
|
+
case 39:
|
|
170
|
+
return _context.abrupt("break", 131);
|
|
171
|
+
|
|
172
|
+
case 40:
|
|
173
|
+
_context.next = 42;
|
|
174
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('moment/dist/locale/en-nz')); });
|
|
175
|
+
|
|
176
|
+
case 42:
|
|
177
|
+
return _context.abrupt("break", 131);
|
|
178
|
+
|
|
179
|
+
case 43:
|
|
180
|
+
_context.next = 45;
|
|
181
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('moment/dist/locale/en-sg')); });
|
|
182
|
+
|
|
183
|
+
case 45:
|
|
184
|
+
return _context.abrupt("break", 131);
|
|
185
|
+
|
|
186
|
+
case 46:
|
|
187
|
+
_context.next = 48;
|
|
188
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('moment/dist/locale/es')); });
|
|
189
|
+
|
|
190
|
+
case 48:
|
|
191
|
+
return _context.abrupt("break", 131);
|
|
192
|
+
|
|
193
|
+
case 49:
|
|
194
|
+
_context.next = 51;
|
|
195
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('moment/dist/locale/es')); });
|
|
196
|
+
|
|
197
|
+
case 51:
|
|
198
|
+
return _context.abrupt("break", 131);
|
|
199
|
+
|
|
200
|
+
case 52:
|
|
201
|
+
_context.next = 54;
|
|
202
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('moment/dist/locale/es')); });
|
|
203
|
+
|
|
204
|
+
case 54:
|
|
205
|
+
return _context.abrupt("break", 131);
|
|
206
|
+
|
|
207
|
+
case 55:
|
|
208
|
+
_context.next = 57;
|
|
209
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('moment/dist/locale/es')); });
|
|
210
|
+
|
|
211
|
+
case 57:
|
|
212
|
+
return _context.abrupt("break", 131);
|
|
213
|
+
|
|
214
|
+
case 58:
|
|
215
|
+
_context.next = 60;
|
|
216
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('moment/dist/locale/es')); });
|
|
217
|
+
|
|
218
|
+
case 60:
|
|
219
|
+
return _context.abrupt("break", 131);
|
|
220
|
+
|
|
221
|
+
case 61:
|
|
222
|
+
_context.next = 63;
|
|
223
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('moment/dist/locale/es')); });
|
|
224
|
+
|
|
225
|
+
case 63:
|
|
226
|
+
return _context.abrupt("break", 131);
|
|
227
|
+
|
|
228
|
+
case 64:
|
|
229
|
+
_context.next = 66;
|
|
230
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('moment/dist/locale/es')); });
|
|
231
|
+
|
|
232
|
+
case 66:
|
|
233
|
+
return _context.abrupt("break", 131);
|
|
234
|
+
|
|
235
|
+
case 67:
|
|
236
|
+
_context.next = 69;
|
|
237
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('moment/dist/locale/es-do')); });
|
|
238
|
+
|
|
239
|
+
case 69:
|
|
240
|
+
return _context.abrupt("break", 131);
|
|
241
|
+
|
|
242
|
+
case 70:
|
|
243
|
+
_context.next = 72;
|
|
244
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('moment/dist/locale/es')); });
|
|
245
|
+
|
|
246
|
+
case 72:
|
|
247
|
+
return _context.abrupt("break", 131);
|
|
248
|
+
|
|
249
|
+
case 73:
|
|
250
|
+
_context.next = 75;
|
|
251
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('moment/dist/locale/es')); });
|
|
252
|
+
|
|
253
|
+
case 75:
|
|
254
|
+
return _context.abrupt("break", 131);
|
|
255
|
+
|
|
256
|
+
case 76:
|
|
257
|
+
_context.next = 78;
|
|
258
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('moment/dist/locale/es')); });
|
|
259
|
+
|
|
260
|
+
case 78:
|
|
261
|
+
return _context.abrupt("break", 131);
|
|
262
|
+
|
|
263
|
+
case 79:
|
|
264
|
+
_context.next = 81;
|
|
265
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('moment/dist/locale/es')); });
|
|
266
|
+
|
|
267
|
+
case 81:
|
|
268
|
+
return _context.abrupt("break", 131);
|
|
269
|
+
|
|
270
|
+
case 82:
|
|
271
|
+
_context.next = 84;
|
|
272
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('moment/dist/locale/es')); });
|
|
273
|
+
|
|
274
|
+
case 84:
|
|
275
|
+
return _context.abrupt("break", 131);
|
|
276
|
+
|
|
277
|
+
case 85:
|
|
278
|
+
_context.next = 87;
|
|
279
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('moment/dist/locale/es')); });
|
|
280
|
+
|
|
281
|
+
case 87:
|
|
282
|
+
return _context.abrupt("break", 131);
|
|
283
|
+
|
|
284
|
+
case 88:
|
|
285
|
+
_context.next = 90;
|
|
286
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('moment/dist/locale/es')); });
|
|
287
|
+
|
|
288
|
+
case 90:
|
|
289
|
+
return _context.abrupt("break", 131);
|
|
290
|
+
|
|
291
|
+
case 91:
|
|
292
|
+
_context.next = 93;
|
|
293
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('moment/dist/locale/es-mx')); });
|
|
294
|
+
|
|
295
|
+
case 93:
|
|
296
|
+
return _context.abrupt("break", 131);
|
|
297
|
+
|
|
298
|
+
case 94:
|
|
299
|
+
_context.next = 96;
|
|
300
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('moment/dist/locale/es')); });
|
|
301
|
+
|
|
302
|
+
case 96:
|
|
303
|
+
return _context.abrupt("break", 131);
|
|
304
|
+
|
|
305
|
+
case 97:
|
|
306
|
+
_context.next = 99;
|
|
307
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('moment/dist/locale/es')); });
|
|
308
|
+
|
|
309
|
+
case 99:
|
|
310
|
+
return _context.abrupt("break", 131);
|
|
311
|
+
|
|
312
|
+
case 100:
|
|
313
|
+
_context.next = 102;
|
|
314
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('moment/dist/locale/es')); });
|
|
315
|
+
|
|
316
|
+
case 102:
|
|
317
|
+
return _context.abrupt("break", 131);
|
|
318
|
+
|
|
319
|
+
case 103:
|
|
320
|
+
_context.next = 105;
|
|
321
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('moment/dist/locale/es')); });
|
|
322
|
+
|
|
323
|
+
case 105:
|
|
324
|
+
return _context.abrupt("break", 131);
|
|
325
|
+
|
|
326
|
+
case 106:
|
|
327
|
+
_context.next = 108;
|
|
328
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('moment/dist/locale/es')); });
|
|
329
|
+
|
|
330
|
+
case 108:
|
|
331
|
+
return _context.abrupt("break", 131);
|
|
332
|
+
|
|
333
|
+
case 109:
|
|
334
|
+
_context.next = 111;
|
|
335
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('moment/dist/locale/es')); });
|
|
336
|
+
|
|
337
|
+
case 111:
|
|
338
|
+
return _context.abrupt("break", 131);
|
|
339
|
+
|
|
340
|
+
case 112:
|
|
341
|
+
_context.next = 114;
|
|
342
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('moment/dist/locale/es')); });
|
|
343
|
+
|
|
344
|
+
case 114:
|
|
345
|
+
return _context.abrupt("break", 131);
|
|
346
|
+
|
|
347
|
+
case 115:
|
|
348
|
+
_context.next = 117;
|
|
349
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('moment/dist/locale/es')); });
|
|
350
|
+
|
|
351
|
+
case 117:
|
|
352
|
+
return _context.abrupt("break", 131);
|
|
353
|
+
|
|
354
|
+
case 118:
|
|
355
|
+
_context.next = 120;
|
|
356
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('moment/dist/locale/fr')); });
|
|
357
|
+
|
|
358
|
+
case 120:
|
|
359
|
+
return _context.abrupt("break", 131);
|
|
360
|
+
|
|
361
|
+
case 121:
|
|
362
|
+
_context.next = 123;
|
|
363
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('moment/dist/locale/ja')); });
|
|
364
|
+
|
|
365
|
+
case 123:
|
|
366
|
+
return _context.abrupt("break", 131);
|
|
367
|
+
|
|
368
|
+
case 124:
|
|
369
|
+
_context.next = 126;
|
|
370
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('moment/dist/locale/ja')); });
|
|
371
|
+
|
|
372
|
+
case 126:
|
|
373
|
+
return _context.abrupt("break", 131);
|
|
374
|
+
|
|
375
|
+
case 127:
|
|
376
|
+
_context.next = 129;
|
|
377
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('moment/dist/locale/zh-cn')); });
|
|
378
|
+
|
|
379
|
+
case 129:
|
|
380
|
+
return _context.abrupt("break", 131);
|
|
381
|
+
|
|
382
|
+
case 130:
|
|
383
|
+
return _context.abrupt("break", 131);
|
|
384
|
+
|
|
385
|
+
case 131:
|
|
386
|
+
|
|
387
|
+
case 132:
|
|
388
|
+
case "end":
|
|
389
|
+
return _context.stop();
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
}, _callee);
|
|
393
|
+
}));
|
|
394
|
+
return _loadMomentLocales.apply(this, arguments);
|
|
395
|
+
}
|
|
112
396
|
|
|
113
397
|
var getUiKitChunkImport = function getUiKitChunkImport(locale) {
|
|
114
398
|
var intlLocale = mapLocaleToIntlLocale(locale);
|
|
@@ -275,7 +559,7 @@ function _loadI18n() {
|
|
|
275
559
|
switch (_context2.prev = _context2.next) {
|
|
276
560
|
case 0:
|
|
277
561
|
_context2.next = 2;
|
|
278
|
-
return
|
|
562
|
+
return loadMomentLocales(locale);
|
|
279
563
|
|
|
280
564
|
case 2:
|
|
281
565
|
_context2.next = 4;
|
|
@@ -43,7 +43,7 @@ var _concatInstanceProperty__default = /*#__PURE__*/_interopDefault(_concatInsta
|
|
|
43
43
|
var _startsWithInstanceProperty__default = /*#__PURE__*/_interopDefault(_startsWithInstanceProperty);
|
|
44
44
|
|
|
45
45
|
// NOTE: This string will be replaced on build time with the package version.
|
|
46
|
-
var version = "21.
|
|
46
|
+
var version = "21.9.0";
|
|
47
47
|
|
|
48
48
|
var extractLanguageTagFromLocale = function extractLanguageTagFromLocale(locale) {
|
|
49
49
|
return _includesInstanceProperty__default["default"](locale).call(locale, '-') ? locale.split('-')[0] : locale;
|
|
@@ -57,14 +57,6 @@ var mergeMessages = function mergeMessages() {
|
|
|
57
57
|
|
|
58
58
|
return _Object$assign__default["default"].apply(Object, _concatInstanceProperty__default["default"](_context = [{}]).call(_context, messages));
|
|
59
59
|
};
|
|
60
|
-
var mapLocaleToMomentLocale = function mapLocaleToMomentLocale(locale) {
|
|
61
|
-
if (_startsWithInstanceProperty__default["default"](locale).call(locale, 'de')) return 'de';
|
|
62
|
-
if (_startsWithInstanceProperty__default["default"](locale).call(locale, 'es')) return 'es';
|
|
63
|
-
if (_startsWithInstanceProperty__default["default"](locale).call(locale, 'fr')) return 'fr';
|
|
64
|
-
if (locale === 'zh-CN') return 'zh-cn';
|
|
65
|
-
if (_startsWithInstanceProperty__default["default"](locale).call(locale, 'ja')) return 'ja';
|
|
66
|
-
return 'en-gb';
|
|
67
|
-
};
|
|
68
60
|
var mapLocaleToIntlLocale = function mapLocaleToIntlLocale(locale) {
|
|
69
61
|
if (_startsWithInstanceProperty__default["default"](locale).call(locale, 'de')) return 'de';
|
|
70
62
|
if (_startsWithInstanceProperty__default["default"](locale).call(locale, 'es')) return 'es';
|
|
@@ -74,41 +66,333 @@ var mapLocaleToIntlLocale = function mapLocaleToIntlLocale(locale) {
|
|
|
74
66
|
return 'en';
|
|
75
67
|
};
|
|
76
68
|
|
|
77
|
-
|
|
78
|
-
var momentLocale = mapLocaleToMomentLocale(locale);
|
|
69
|
+
// @ts-nocheck
|
|
79
70
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
'moment/locale/de')); });
|
|
71
|
+
/* THIS IS A GENERATED FILE */
|
|
72
|
+
function loadMomentLocales(_x) {
|
|
73
|
+
return _loadMomentLocales.apply(this, arguments);
|
|
74
|
+
}
|
|
85
75
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
76
|
+
function _loadMomentLocales() {
|
|
77
|
+
_loadMomentLocales = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee(locale) {
|
|
78
|
+
var lowercaseLocale;
|
|
79
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee$(_context) {
|
|
80
|
+
while (1) {
|
|
81
|
+
switch (_context.prev = _context.next) {
|
|
82
|
+
case 0:
|
|
83
|
+
lowercaseLocale = locale.toLowerCase();
|
|
84
|
+
_context.t0 = lowercaseLocale;
|
|
85
|
+
_context.next = _context.t0 === 'de' ? 4 : _context.t0 === 'de-at' ? 7 : _context.t0 === 'de-be' ? 10 : _context.t0 === 'de-ch' ? 13 : _context.t0 === 'de-de' ? 16 : _context.t0 === 'de-li' ? 19 : _context.t0 === 'de-lu' ? 22 : _context.t0 === 'en-au' ? 25 : _context.t0 === 'en-ca' ? 28 : _context.t0 === 'en-gb' ? 31 : _context.t0 === 'en-ie' ? 34 : _context.t0 === 'en-in' ? 37 : _context.t0 === 'en-nz' ? 40 : _context.t0 === 'en-sg' ? 43 : _context.t0 === 'es' ? 46 : _context.t0 === 'es-ar' ? 49 : _context.t0 === 'es-bo' ? 52 : _context.t0 === 'es-cl' ? 55 : _context.t0 === 'es-co' ? 58 : _context.t0 === 'es-cr' ? 61 : _context.t0 === 'es-cu' ? 64 : _context.t0 === 'es-do' ? 67 : _context.t0 === 'es-ea' ? 70 : _context.t0 === 'es-ec' ? 73 : _context.t0 === 'es-es' ? 76 : _context.t0 === 'es-gq' ? 79 : _context.t0 === 'es-gt' ? 82 : _context.t0 === 'es-hn' ? 85 : _context.t0 === 'es-ic' ? 88 : _context.t0 === 'es-mx' ? 91 : _context.t0 === 'es-ni' ? 94 : _context.t0 === 'es-pa' ? 97 : _context.t0 === 'es-pe' ? 100 : _context.t0 === 'es-pr' ? 103 : _context.t0 === 'es-py' ? 106 : _context.t0 === 'es-sv' ? 109 : _context.t0 === 'es-uy' ? 112 : _context.t0 === 'es-ve' ? 115 : _context.t0 === 'fr-fr' ? 118 : _context.t0 === 'ja' ? 121 : _context.t0 === 'ja-jp' ? 124 : _context.t0 === 'zh-cn' ? 127 : 130;
|
|
86
|
+
break;
|
|
90
87
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
'moment/locale/fr')); });
|
|
88
|
+
case 4:
|
|
89
|
+
_context.next = 6;
|
|
90
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('moment/dist/locale/de')); });
|
|
95
91
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
/* webpackChunkName: "i18n-moment-locale-zh-cn" */
|
|
99
|
-
'moment/locale/zh-cn')); });
|
|
92
|
+
case 6:
|
|
93
|
+
return _context.abrupt("break", 131);
|
|
100
94
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
'moment/locale/ja')); });
|
|
95
|
+
case 7:
|
|
96
|
+
_context.next = 9;
|
|
97
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('moment/dist/locale/de-at')); });
|
|
105
98
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
};
|
|
99
|
+
case 9:
|
|
100
|
+
return _context.abrupt("break", 131);
|
|
101
|
+
|
|
102
|
+
case 10:
|
|
103
|
+
_context.next = 12;
|
|
104
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('moment/dist/locale/de')); });
|
|
105
|
+
|
|
106
|
+
case 12:
|
|
107
|
+
return _context.abrupt("break", 131);
|
|
108
|
+
|
|
109
|
+
case 13:
|
|
110
|
+
_context.next = 15;
|
|
111
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('moment/dist/locale/de-ch')); });
|
|
112
|
+
|
|
113
|
+
case 15:
|
|
114
|
+
return _context.abrupt("break", 131);
|
|
115
|
+
|
|
116
|
+
case 16:
|
|
117
|
+
_context.next = 18;
|
|
118
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('moment/dist/locale/de')); });
|
|
119
|
+
|
|
120
|
+
case 18:
|
|
121
|
+
return _context.abrupt("break", 131);
|
|
122
|
+
|
|
123
|
+
case 19:
|
|
124
|
+
_context.next = 21;
|
|
125
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('moment/dist/locale/de')); });
|
|
126
|
+
|
|
127
|
+
case 21:
|
|
128
|
+
return _context.abrupt("break", 131);
|
|
129
|
+
|
|
130
|
+
case 22:
|
|
131
|
+
_context.next = 24;
|
|
132
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('moment/dist/locale/de')); });
|
|
133
|
+
|
|
134
|
+
case 24:
|
|
135
|
+
return _context.abrupt("break", 131);
|
|
136
|
+
|
|
137
|
+
case 25:
|
|
138
|
+
_context.next = 27;
|
|
139
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('moment/dist/locale/en-au')); });
|
|
140
|
+
|
|
141
|
+
case 27:
|
|
142
|
+
return _context.abrupt("break", 131);
|
|
143
|
+
|
|
144
|
+
case 28:
|
|
145
|
+
_context.next = 30;
|
|
146
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('moment/dist/locale/en-ca')); });
|
|
147
|
+
|
|
148
|
+
case 30:
|
|
149
|
+
return _context.abrupt("break", 131);
|
|
150
|
+
|
|
151
|
+
case 31:
|
|
152
|
+
_context.next = 33;
|
|
153
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('moment/dist/locale/en-gb')); });
|
|
154
|
+
|
|
155
|
+
case 33:
|
|
156
|
+
return _context.abrupt("break", 131);
|
|
157
|
+
|
|
158
|
+
case 34:
|
|
159
|
+
_context.next = 36;
|
|
160
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('moment/dist/locale/en-ie')); });
|
|
161
|
+
|
|
162
|
+
case 36:
|
|
163
|
+
return _context.abrupt("break", 131);
|
|
164
|
+
|
|
165
|
+
case 37:
|
|
166
|
+
_context.next = 39;
|
|
167
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('moment/dist/locale/en-in')); });
|
|
168
|
+
|
|
169
|
+
case 39:
|
|
170
|
+
return _context.abrupt("break", 131);
|
|
171
|
+
|
|
172
|
+
case 40:
|
|
173
|
+
_context.next = 42;
|
|
174
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('moment/dist/locale/en-nz')); });
|
|
175
|
+
|
|
176
|
+
case 42:
|
|
177
|
+
return _context.abrupt("break", 131);
|
|
178
|
+
|
|
179
|
+
case 43:
|
|
180
|
+
_context.next = 45;
|
|
181
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('moment/dist/locale/en-sg')); });
|
|
182
|
+
|
|
183
|
+
case 45:
|
|
184
|
+
return _context.abrupt("break", 131);
|
|
185
|
+
|
|
186
|
+
case 46:
|
|
187
|
+
_context.next = 48;
|
|
188
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('moment/dist/locale/es')); });
|
|
189
|
+
|
|
190
|
+
case 48:
|
|
191
|
+
return _context.abrupt("break", 131);
|
|
192
|
+
|
|
193
|
+
case 49:
|
|
194
|
+
_context.next = 51;
|
|
195
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('moment/dist/locale/es')); });
|
|
196
|
+
|
|
197
|
+
case 51:
|
|
198
|
+
return _context.abrupt("break", 131);
|
|
199
|
+
|
|
200
|
+
case 52:
|
|
201
|
+
_context.next = 54;
|
|
202
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('moment/dist/locale/es')); });
|
|
203
|
+
|
|
204
|
+
case 54:
|
|
205
|
+
return _context.abrupt("break", 131);
|
|
206
|
+
|
|
207
|
+
case 55:
|
|
208
|
+
_context.next = 57;
|
|
209
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('moment/dist/locale/es')); });
|
|
210
|
+
|
|
211
|
+
case 57:
|
|
212
|
+
return _context.abrupt("break", 131);
|
|
213
|
+
|
|
214
|
+
case 58:
|
|
215
|
+
_context.next = 60;
|
|
216
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('moment/dist/locale/es')); });
|
|
217
|
+
|
|
218
|
+
case 60:
|
|
219
|
+
return _context.abrupt("break", 131);
|
|
220
|
+
|
|
221
|
+
case 61:
|
|
222
|
+
_context.next = 63;
|
|
223
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('moment/dist/locale/es')); });
|
|
224
|
+
|
|
225
|
+
case 63:
|
|
226
|
+
return _context.abrupt("break", 131);
|
|
227
|
+
|
|
228
|
+
case 64:
|
|
229
|
+
_context.next = 66;
|
|
230
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('moment/dist/locale/es')); });
|
|
231
|
+
|
|
232
|
+
case 66:
|
|
233
|
+
return _context.abrupt("break", 131);
|
|
234
|
+
|
|
235
|
+
case 67:
|
|
236
|
+
_context.next = 69;
|
|
237
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('moment/dist/locale/es-do')); });
|
|
238
|
+
|
|
239
|
+
case 69:
|
|
240
|
+
return _context.abrupt("break", 131);
|
|
241
|
+
|
|
242
|
+
case 70:
|
|
243
|
+
_context.next = 72;
|
|
244
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('moment/dist/locale/es')); });
|
|
245
|
+
|
|
246
|
+
case 72:
|
|
247
|
+
return _context.abrupt("break", 131);
|
|
248
|
+
|
|
249
|
+
case 73:
|
|
250
|
+
_context.next = 75;
|
|
251
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('moment/dist/locale/es')); });
|
|
252
|
+
|
|
253
|
+
case 75:
|
|
254
|
+
return _context.abrupt("break", 131);
|
|
255
|
+
|
|
256
|
+
case 76:
|
|
257
|
+
_context.next = 78;
|
|
258
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('moment/dist/locale/es')); });
|
|
259
|
+
|
|
260
|
+
case 78:
|
|
261
|
+
return _context.abrupt("break", 131);
|
|
262
|
+
|
|
263
|
+
case 79:
|
|
264
|
+
_context.next = 81;
|
|
265
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('moment/dist/locale/es')); });
|
|
266
|
+
|
|
267
|
+
case 81:
|
|
268
|
+
return _context.abrupt("break", 131);
|
|
269
|
+
|
|
270
|
+
case 82:
|
|
271
|
+
_context.next = 84;
|
|
272
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('moment/dist/locale/es')); });
|
|
273
|
+
|
|
274
|
+
case 84:
|
|
275
|
+
return _context.abrupt("break", 131);
|
|
276
|
+
|
|
277
|
+
case 85:
|
|
278
|
+
_context.next = 87;
|
|
279
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('moment/dist/locale/es')); });
|
|
280
|
+
|
|
281
|
+
case 87:
|
|
282
|
+
return _context.abrupt("break", 131);
|
|
283
|
+
|
|
284
|
+
case 88:
|
|
285
|
+
_context.next = 90;
|
|
286
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('moment/dist/locale/es')); });
|
|
287
|
+
|
|
288
|
+
case 90:
|
|
289
|
+
return _context.abrupt("break", 131);
|
|
290
|
+
|
|
291
|
+
case 91:
|
|
292
|
+
_context.next = 93;
|
|
293
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('moment/dist/locale/es-mx')); });
|
|
294
|
+
|
|
295
|
+
case 93:
|
|
296
|
+
return _context.abrupt("break", 131);
|
|
297
|
+
|
|
298
|
+
case 94:
|
|
299
|
+
_context.next = 96;
|
|
300
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('moment/dist/locale/es')); });
|
|
301
|
+
|
|
302
|
+
case 96:
|
|
303
|
+
return _context.abrupt("break", 131);
|
|
304
|
+
|
|
305
|
+
case 97:
|
|
306
|
+
_context.next = 99;
|
|
307
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('moment/dist/locale/es')); });
|
|
308
|
+
|
|
309
|
+
case 99:
|
|
310
|
+
return _context.abrupt("break", 131);
|
|
311
|
+
|
|
312
|
+
case 100:
|
|
313
|
+
_context.next = 102;
|
|
314
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('moment/dist/locale/es')); });
|
|
315
|
+
|
|
316
|
+
case 102:
|
|
317
|
+
return _context.abrupt("break", 131);
|
|
318
|
+
|
|
319
|
+
case 103:
|
|
320
|
+
_context.next = 105;
|
|
321
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('moment/dist/locale/es')); });
|
|
322
|
+
|
|
323
|
+
case 105:
|
|
324
|
+
return _context.abrupt("break", 131);
|
|
325
|
+
|
|
326
|
+
case 106:
|
|
327
|
+
_context.next = 108;
|
|
328
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('moment/dist/locale/es')); });
|
|
329
|
+
|
|
330
|
+
case 108:
|
|
331
|
+
return _context.abrupt("break", 131);
|
|
332
|
+
|
|
333
|
+
case 109:
|
|
334
|
+
_context.next = 111;
|
|
335
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('moment/dist/locale/es')); });
|
|
336
|
+
|
|
337
|
+
case 111:
|
|
338
|
+
return _context.abrupt("break", 131);
|
|
339
|
+
|
|
340
|
+
case 112:
|
|
341
|
+
_context.next = 114;
|
|
342
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('moment/dist/locale/es')); });
|
|
343
|
+
|
|
344
|
+
case 114:
|
|
345
|
+
return _context.abrupt("break", 131);
|
|
346
|
+
|
|
347
|
+
case 115:
|
|
348
|
+
_context.next = 117;
|
|
349
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('moment/dist/locale/es')); });
|
|
350
|
+
|
|
351
|
+
case 117:
|
|
352
|
+
return _context.abrupt("break", 131);
|
|
353
|
+
|
|
354
|
+
case 118:
|
|
355
|
+
_context.next = 120;
|
|
356
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('moment/dist/locale/fr')); });
|
|
357
|
+
|
|
358
|
+
case 120:
|
|
359
|
+
return _context.abrupt("break", 131);
|
|
360
|
+
|
|
361
|
+
case 121:
|
|
362
|
+
_context.next = 123;
|
|
363
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('moment/dist/locale/ja')); });
|
|
364
|
+
|
|
365
|
+
case 123:
|
|
366
|
+
return _context.abrupt("break", 131);
|
|
367
|
+
|
|
368
|
+
case 124:
|
|
369
|
+
_context.next = 126;
|
|
370
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('moment/dist/locale/ja')); });
|
|
371
|
+
|
|
372
|
+
case 126:
|
|
373
|
+
return _context.abrupt("break", 131);
|
|
374
|
+
|
|
375
|
+
case 127:
|
|
376
|
+
_context.next = 129;
|
|
377
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('moment/dist/locale/zh-cn')); });
|
|
378
|
+
|
|
379
|
+
case 129:
|
|
380
|
+
return _context.abrupt("break", 131);
|
|
381
|
+
|
|
382
|
+
case 130:
|
|
383
|
+
return _context.abrupt("break", 131);
|
|
384
|
+
|
|
385
|
+
case 131:
|
|
386
|
+
|
|
387
|
+
case 132:
|
|
388
|
+
case "end":
|
|
389
|
+
return _context.stop();
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
}, _callee);
|
|
393
|
+
}));
|
|
394
|
+
return _loadMomentLocales.apply(this, arguments);
|
|
395
|
+
}
|
|
112
396
|
|
|
113
397
|
var getUiKitChunkImport = function getUiKitChunkImport(locale) {
|
|
114
398
|
var intlLocale = mapLocaleToIntlLocale(locale);
|
|
@@ -275,7 +559,7 @@ function _loadI18n() {
|
|
|
275
559
|
switch (_context2.prev = _context2.next) {
|
|
276
560
|
case 0:
|
|
277
561
|
_context2.next = 2;
|
|
278
|
-
return
|
|
562
|
+
return loadMomentLocales(locale);
|
|
279
563
|
|
|
280
564
|
case 2:
|
|
281
565
|
_context2.next = 4;
|
|
@@ -12,7 +12,7 @@ import { jsx, Fragment } from '@emotion/react/jsx-runtime';
|
|
|
12
12
|
import { defineMessages } from 'react-intl';
|
|
13
13
|
|
|
14
14
|
// NOTE: This string will be replaced on build time with the package version.
|
|
15
|
-
var version = "21.
|
|
15
|
+
var version = "21.9.0";
|
|
16
16
|
|
|
17
17
|
var extractLanguageTagFromLocale = function extractLanguageTagFromLocale(locale) {
|
|
18
18
|
return _includesInstanceProperty(locale).call(locale, '-') ? locale.split('-')[0] : locale;
|
|
@@ -26,14 +26,6 @@ var mergeMessages = function mergeMessages() {
|
|
|
26
26
|
|
|
27
27
|
return _Object$assign.apply(Object, _concatInstanceProperty(_context = [{}]).call(_context, messages));
|
|
28
28
|
};
|
|
29
|
-
var mapLocaleToMomentLocale = function mapLocaleToMomentLocale(locale) {
|
|
30
|
-
if (_startsWithInstanceProperty(locale).call(locale, 'de')) return 'de';
|
|
31
|
-
if (_startsWithInstanceProperty(locale).call(locale, 'es')) return 'es';
|
|
32
|
-
if (_startsWithInstanceProperty(locale).call(locale, 'fr')) return 'fr';
|
|
33
|
-
if (locale === 'zh-CN') return 'zh-cn';
|
|
34
|
-
if (_startsWithInstanceProperty(locale).call(locale, 'ja')) return 'ja';
|
|
35
|
-
return 'en-gb';
|
|
36
|
-
};
|
|
37
29
|
var mapLocaleToIntlLocale = function mapLocaleToIntlLocale(locale) {
|
|
38
30
|
if (_startsWithInstanceProperty(locale).call(locale, 'de')) return 'de';
|
|
39
31
|
if (_startsWithInstanceProperty(locale).call(locale, 'es')) return 'es';
|
|
@@ -43,41 +35,333 @@ var mapLocaleToIntlLocale = function mapLocaleToIntlLocale(locale) {
|
|
|
43
35
|
return 'en';
|
|
44
36
|
};
|
|
45
37
|
|
|
46
|
-
|
|
47
|
-
var momentLocale = mapLocaleToMomentLocale(locale);
|
|
38
|
+
// @ts-nocheck
|
|
48
39
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
'moment/locale/de');
|
|
40
|
+
/* THIS IS A GENERATED FILE */
|
|
41
|
+
function loadMomentLocales(_x) {
|
|
42
|
+
return _loadMomentLocales.apply(this, arguments);
|
|
43
|
+
}
|
|
54
44
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
45
|
+
function _loadMomentLocales() {
|
|
46
|
+
_loadMomentLocales = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(locale) {
|
|
47
|
+
var lowercaseLocale;
|
|
48
|
+
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
49
|
+
while (1) {
|
|
50
|
+
switch (_context.prev = _context.next) {
|
|
51
|
+
case 0:
|
|
52
|
+
lowercaseLocale = locale.toLowerCase();
|
|
53
|
+
_context.t0 = lowercaseLocale;
|
|
54
|
+
_context.next = _context.t0 === 'de' ? 4 : _context.t0 === 'de-at' ? 7 : _context.t0 === 'de-be' ? 10 : _context.t0 === 'de-ch' ? 13 : _context.t0 === 'de-de' ? 16 : _context.t0 === 'de-li' ? 19 : _context.t0 === 'de-lu' ? 22 : _context.t0 === 'en-au' ? 25 : _context.t0 === 'en-ca' ? 28 : _context.t0 === 'en-gb' ? 31 : _context.t0 === 'en-ie' ? 34 : _context.t0 === 'en-in' ? 37 : _context.t0 === 'en-nz' ? 40 : _context.t0 === 'en-sg' ? 43 : _context.t0 === 'es' ? 46 : _context.t0 === 'es-ar' ? 49 : _context.t0 === 'es-bo' ? 52 : _context.t0 === 'es-cl' ? 55 : _context.t0 === 'es-co' ? 58 : _context.t0 === 'es-cr' ? 61 : _context.t0 === 'es-cu' ? 64 : _context.t0 === 'es-do' ? 67 : _context.t0 === 'es-ea' ? 70 : _context.t0 === 'es-ec' ? 73 : _context.t0 === 'es-es' ? 76 : _context.t0 === 'es-gq' ? 79 : _context.t0 === 'es-gt' ? 82 : _context.t0 === 'es-hn' ? 85 : _context.t0 === 'es-ic' ? 88 : _context.t0 === 'es-mx' ? 91 : _context.t0 === 'es-ni' ? 94 : _context.t0 === 'es-pa' ? 97 : _context.t0 === 'es-pe' ? 100 : _context.t0 === 'es-pr' ? 103 : _context.t0 === 'es-py' ? 106 : _context.t0 === 'es-sv' ? 109 : _context.t0 === 'es-uy' ? 112 : _context.t0 === 'es-ve' ? 115 : _context.t0 === 'fr-fr' ? 118 : _context.t0 === 'ja' ? 121 : _context.t0 === 'ja-jp' ? 124 : _context.t0 === 'zh-cn' ? 127 : 130;
|
|
55
|
+
break;
|
|
59
56
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
'moment/locale/fr');
|
|
57
|
+
case 4:
|
|
58
|
+
_context.next = 6;
|
|
59
|
+
return import('moment/dist/locale/de');
|
|
64
60
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
/* webpackChunkName: "i18n-moment-locale-zh-cn" */
|
|
68
|
-
'moment/locale/zh-cn');
|
|
61
|
+
case 6:
|
|
62
|
+
return _context.abrupt("break", 131);
|
|
69
63
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
'moment/locale/ja');
|
|
64
|
+
case 7:
|
|
65
|
+
_context.next = 9;
|
|
66
|
+
return import('moment/dist/locale/de-at');
|
|
74
67
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
68
|
+
case 9:
|
|
69
|
+
return _context.abrupt("break", 131);
|
|
70
|
+
|
|
71
|
+
case 10:
|
|
72
|
+
_context.next = 12;
|
|
73
|
+
return import('moment/dist/locale/de');
|
|
74
|
+
|
|
75
|
+
case 12:
|
|
76
|
+
return _context.abrupt("break", 131);
|
|
77
|
+
|
|
78
|
+
case 13:
|
|
79
|
+
_context.next = 15;
|
|
80
|
+
return import('moment/dist/locale/de-ch');
|
|
81
|
+
|
|
82
|
+
case 15:
|
|
83
|
+
return _context.abrupt("break", 131);
|
|
84
|
+
|
|
85
|
+
case 16:
|
|
86
|
+
_context.next = 18;
|
|
87
|
+
return import('moment/dist/locale/de');
|
|
88
|
+
|
|
89
|
+
case 18:
|
|
90
|
+
return _context.abrupt("break", 131);
|
|
91
|
+
|
|
92
|
+
case 19:
|
|
93
|
+
_context.next = 21;
|
|
94
|
+
return import('moment/dist/locale/de');
|
|
95
|
+
|
|
96
|
+
case 21:
|
|
97
|
+
return _context.abrupt("break", 131);
|
|
98
|
+
|
|
99
|
+
case 22:
|
|
100
|
+
_context.next = 24;
|
|
101
|
+
return import('moment/dist/locale/de');
|
|
102
|
+
|
|
103
|
+
case 24:
|
|
104
|
+
return _context.abrupt("break", 131);
|
|
105
|
+
|
|
106
|
+
case 25:
|
|
107
|
+
_context.next = 27;
|
|
108
|
+
return import('moment/dist/locale/en-au');
|
|
109
|
+
|
|
110
|
+
case 27:
|
|
111
|
+
return _context.abrupt("break", 131);
|
|
112
|
+
|
|
113
|
+
case 28:
|
|
114
|
+
_context.next = 30;
|
|
115
|
+
return import('moment/dist/locale/en-ca');
|
|
116
|
+
|
|
117
|
+
case 30:
|
|
118
|
+
return _context.abrupt("break", 131);
|
|
119
|
+
|
|
120
|
+
case 31:
|
|
121
|
+
_context.next = 33;
|
|
122
|
+
return import('moment/dist/locale/en-gb');
|
|
123
|
+
|
|
124
|
+
case 33:
|
|
125
|
+
return _context.abrupt("break", 131);
|
|
126
|
+
|
|
127
|
+
case 34:
|
|
128
|
+
_context.next = 36;
|
|
129
|
+
return import('moment/dist/locale/en-ie');
|
|
130
|
+
|
|
131
|
+
case 36:
|
|
132
|
+
return _context.abrupt("break", 131);
|
|
133
|
+
|
|
134
|
+
case 37:
|
|
135
|
+
_context.next = 39;
|
|
136
|
+
return import('moment/dist/locale/en-in');
|
|
137
|
+
|
|
138
|
+
case 39:
|
|
139
|
+
return _context.abrupt("break", 131);
|
|
140
|
+
|
|
141
|
+
case 40:
|
|
142
|
+
_context.next = 42;
|
|
143
|
+
return import('moment/dist/locale/en-nz');
|
|
144
|
+
|
|
145
|
+
case 42:
|
|
146
|
+
return _context.abrupt("break", 131);
|
|
147
|
+
|
|
148
|
+
case 43:
|
|
149
|
+
_context.next = 45;
|
|
150
|
+
return import('moment/dist/locale/en-sg');
|
|
151
|
+
|
|
152
|
+
case 45:
|
|
153
|
+
return _context.abrupt("break", 131);
|
|
154
|
+
|
|
155
|
+
case 46:
|
|
156
|
+
_context.next = 48;
|
|
157
|
+
return import('moment/dist/locale/es');
|
|
158
|
+
|
|
159
|
+
case 48:
|
|
160
|
+
return _context.abrupt("break", 131);
|
|
161
|
+
|
|
162
|
+
case 49:
|
|
163
|
+
_context.next = 51;
|
|
164
|
+
return import('moment/dist/locale/es');
|
|
165
|
+
|
|
166
|
+
case 51:
|
|
167
|
+
return _context.abrupt("break", 131);
|
|
168
|
+
|
|
169
|
+
case 52:
|
|
170
|
+
_context.next = 54;
|
|
171
|
+
return import('moment/dist/locale/es');
|
|
172
|
+
|
|
173
|
+
case 54:
|
|
174
|
+
return _context.abrupt("break", 131);
|
|
175
|
+
|
|
176
|
+
case 55:
|
|
177
|
+
_context.next = 57;
|
|
178
|
+
return import('moment/dist/locale/es');
|
|
179
|
+
|
|
180
|
+
case 57:
|
|
181
|
+
return _context.abrupt("break", 131);
|
|
182
|
+
|
|
183
|
+
case 58:
|
|
184
|
+
_context.next = 60;
|
|
185
|
+
return import('moment/dist/locale/es');
|
|
186
|
+
|
|
187
|
+
case 60:
|
|
188
|
+
return _context.abrupt("break", 131);
|
|
189
|
+
|
|
190
|
+
case 61:
|
|
191
|
+
_context.next = 63;
|
|
192
|
+
return import('moment/dist/locale/es');
|
|
193
|
+
|
|
194
|
+
case 63:
|
|
195
|
+
return _context.abrupt("break", 131);
|
|
196
|
+
|
|
197
|
+
case 64:
|
|
198
|
+
_context.next = 66;
|
|
199
|
+
return import('moment/dist/locale/es');
|
|
200
|
+
|
|
201
|
+
case 66:
|
|
202
|
+
return _context.abrupt("break", 131);
|
|
203
|
+
|
|
204
|
+
case 67:
|
|
205
|
+
_context.next = 69;
|
|
206
|
+
return import('moment/dist/locale/es-do');
|
|
207
|
+
|
|
208
|
+
case 69:
|
|
209
|
+
return _context.abrupt("break", 131);
|
|
210
|
+
|
|
211
|
+
case 70:
|
|
212
|
+
_context.next = 72;
|
|
213
|
+
return import('moment/dist/locale/es');
|
|
214
|
+
|
|
215
|
+
case 72:
|
|
216
|
+
return _context.abrupt("break", 131);
|
|
217
|
+
|
|
218
|
+
case 73:
|
|
219
|
+
_context.next = 75;
|
|
220
|
+
return import('moment/dist/locale/es');
|
|
221
|
+
|
|
222
|
+
case 75:
|
|
223
|
+
return _context.abrupt("break", 131);
|
|
224
|
+
|
|
225
|
+
case 76:
|
|
226
|
+
_context.next = 78;
|
|
227
|
+
return import('moment/dist/locale/es');
|
|
228
|
+
|
|
229
|
+
case 78:
|
|
230
|
+
return _context.abrupt("break", 131);
|
|
231
|
+
|
|
232
|
+
case 79:
|
|
233
|
+
_context.next = 81;
|
|
234
|
+
return import('moment/dist/locale/es');
|
|
235
|
+
|
|
236
|
+
case 81:
|
|
237
|
+
return _context.abrupt("break", 131);
|
|
238
|
+
|
|
239
|
+
case 82:
|
|
240
|
+
_context.next = 84;
|
|
241
|
+
return import('moment/dist/locale/es');
|
|
242
|
+
|
|
243
|
+
case 84:
|
|
244
|
+
return _context.abrupt("break", 131);
|
|
245
|
+
|
|
246
|
+
case 85:
|
|
247
|
+
_context.next = 87;
|
|
248
|
+
return import('moment/dist/locale/es');
|
|
249
|
+
|
|
250
|
+
case 87:
|
|
251
|
+
return _context.abrupt("break", 131);
|
|
252
|
+
|
|
253
|
+
case 88:
|
|
254
|
+
_context.next = 90;
|
|
255
|
+
return import('moment/dist/locale/es');
|
|
256
|
+
|
|
257
|
+
case 90:
|
|
258
|
+
return _context.abrupt("break", 131);
|
|
259
|
+
|
|
260
|
+
case 91:
|
|
261
|
+
_context.next = 93;
|
|
262
|
+
return import('moment/dist/locale/es-mx');
|
|
263
|
+
|
|
264
|
+
case 93:
|
|
265
|
+
return _context.abrupt("break", 131);
|
|
266
|
+
|
|
267
|
+
case 94:
|
|
268
|
+
_context.next = 96;
|
|
269
|
+
return import('moment/dist/locale/es');
|
|
270
|
+
|
|
271
|
+
case 96:
|
|
272
|
+
return _context.abrupt("break", 131);
|
|
273
|
+
|
|
274
|
+
case 97:
|
|
275
|
+
_context.next = 99;
|
|
276
|
+
return import('moment/dist/locale/es');
|
|
277
|
+
|
|
278
|
+
case 99:
|
|
279
|
+
return _context.abrupt("break", 131);
|
|
280
|
+
|
|
281
|
+
case 100:
|
|
282
|
+
_context.next = 102;
|
|
283
|
+
return import('moment/dist/locale/es');
|
|
284
|
+
|
|
285
|
+
case 102:
|
|
286
|
+
return _context.abrupt("break", 131);
|
|
287
|
+
|
|
288
|
+
case 103:
|
|
289
|
+
_context.next = 105;
|
|
290
|
+
return import('moment/dist/locale/es');
|
|
291
|
+
|
|
292
|
+
case 105:
|
|
293
|
+
return _context.abrupt("break", 131);
|
|
294
|
+
|
|
295
|
+
case 106:
|
|
296
|
+
_context.next = 108;
|
|
297
|
+
return import('moment/dist/locale/es');
|
|
298
|
+
|
|
299
|
+
case 108:
|
|
300
|
+
return _context.abrupt("break", 131);
|
|
301
|
+
|
|
302
|
+
case 109:
|
|
303
|
+
_context.next = 111;
|
|
304
|
+
return import('moment/dist/locale/es');
|
|
305
|
+
|
|
306
|
+
case 111:
|
|
307
|
+
return _context.abrupt("break", 131);
|
|
308
|
+
|
|
309
|
+
case 112:
|
|
310
|
+
_context.next = 114;
|
|
311
|
+
return import('moment/dist/locale/es');
|
|
312
|
+
|
|
313
|
+
case 114:
|
|
314
|
+
return _context.abrupt("break", 131);
|
|
315
|
+
|
|
316
|
+
case 115:
|
|
317
|
+
_context.next = 117;
|
|
318
|
+
return import('moment/dist/locale/es');
|
|
319
|
+
|
|
320
|
+
case 117:
|
|
321
|
+
return _context.abrupt("break", 131);
|
|
322
|
+
|
|
323
|
+
case 118:
|
|
324
|
+
_context.next = 120;
|
|
325
|
+
return import('moment/dist/locale/fr');
|
|
326
|
+
|
|
327
|
+
case 120:
|
|
328
|
+
return _context.abrupt("break", 131);
|
|
329
|
+
|
|
330
|
+
case 121:
|
|
331
|
+
_context.next = 123;
|
|
332
|
+
return import('moment/dist/locale/ja');
|
|
333
|
+
|
|
334
|
+
case 123:
|
|
335
|
+
return _context.abrupt("break", 131);
|
|
336
|
+
|
|
337
|
+
case 124:
|
|
338
|
+
_context.next = 126;
|
|
339
|
+
return import('moment/dist/locale/ja');
|
|
340
|
+
|
|
341
|
+
case 126:
|
|
342
|
+
return _context.abrupt("break", 131);
|
|
343
|
+
|
|
344
|
+
case 127:
|
|
345
|
+
_context.next = 129;
|
|
346
|
+
return import('moment/dist/locale/zh-cn');
|
|
347
|
+
|
|
348
|
+
case 129:
|
|
349
|
+
return _context.abrupt("break", 131);
|
|
350
|
+
|
|
351
|
+
case 130:
|
|
352
|
+
return _context.abrupt("break", 131);
|
|
353
|
+
|
|
354
|
+
case 131:
|
|
355
|
+
|
|
356
|
+
case 132:
|
|
357
|
+
case "end":
|
|
358
|
+
return _context.stop();
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
}, _callee);
|
|
362
|
+
}));
|
|
363
|
+
return _loadMomentLocales.apply(this, arguments);
|
|
364
|
+
}
|
|
81
365
|
|
|
82
366
|
var getUiKitChunkImport = function getUiKitChunkImport(locale) {
|
|
83
367
|
var intlLocale = mapLocaleToIntlLocale(locale);
|
|
@@ -244,7 +528,7 @@ function _loadI18n() {
|
|
|
244
528
|
switch (_context2.prev = _context2.next) {
|
|
245
529
|
case 0:
|
|
246
530
|
_context2.next = 2;
|
|
247
|
-
return
|
|
531
|
+
return loadMomentLocales(locale);
|
|
248
532
|
|
|
249
533
|
case 2:
|
|
250
534
|
_context2.next = 4;
|
|
@@ -1,2 +1,5 @@
|
|
|
1
1
|
import type { Props } from './async-locale-data/async-locale-data';
|
|
2
|
+
import type { I18NImportData, MergedMessages } from './load-i18n';
|
|
2
3
|
export declare type TAsyncLocaleDataProps = Props;
|
|
4
|
+
export declare type TI18NImportData = I18NImportData;
|
|
5
|
+
export declare type TMergedMessages = MergedMessages;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import type { MessageFormatElement } from '@formatjs/icu-messageformat-parser';
|
|
2
|
-
declare type
|
|
2
|
+
export declare type I18NImportData = {
|
|
3
|
+
default: Record<string, string> | Record<string, MessageFormatElement[]>;
|
|
4
|
+
};
|
|
5
|
+
export declare type MergedMessages = Record<string, string> | Record<string, MessageFormatElement[]>;
|
|
3
6
|
export default function loadI18n(locale: string): Promise<MergedMessages>;
|
|
4
|
-
export {};
|
|
@@ -2,5 +2,4 @@ import type { MessageFormatElement } from '@formatjs/icu-messageformat-parser';
|
|
|
2
2
|
export declare type TMessageTranslations = Record<string, string> | Record<string, MessageFormatElement[]>;
|
|
3
3
|
export declare const extractLanguageTagFromLocale: (locale: string) => string;
|
|
4
4
|
export declare const mergeMessages: (...messages: TMessageTranslations[]) => TMessageTranslations;
|
|
5
|
-
export declare const mapLocaleToMomentLocale: (locale: string) => string;
|
|
6
5
|
export declare const mapLocaleToIntlLocale: (locale: string) => string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@commercetools-frontend/i18n",
|
|
3
|
-
"version": "21.
|
|
3
|
+
"version": "21.9.0",
|
|
4
4
|
"description": "MC i18n messages",
|
|
5
5
|
"bugs": "https://github.com/commercetools/merchant-center-application-kit/issues",
|
|
6
6
|
"repository": {
|
|
@@ -29,25 +29,25 @@
|
|
|
29
29
|
"README.md"
|
|
30
30
|
],
|
|
31
31
|
"scripts": {
|
|
32
|
-
"compile-data": "
|
|
32
|
+
"compile-data": "./scripts/compile_data.sh"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@babel/runtime": "^7.
|
|
36
|
-
"@babel/runtime-corejs3": "^7.
|
|
35
|
+
"@babel/runtime": "^7.18.6",
|
|
36
|
+
"@babel/runtime-corejs3": "^7.18.6",
|
|
37
37
|
"@commercetools-community-kit/i18n": "^0.3.0",
|
|
38
|
-
"@commercetools-frontend/sentry": "21.
|
|
39
|
-
"@commercetools-uikit/i18n": "^15.
|
|
40
|
-
"@emotion/react": "11.9.
|
|
41
|
-
"@formatjs/icu-messageformat-parser": "2.1.
|
|
38
|
+
"@commercetools-frontend/sentry": "21.9.0",
|
|
39
|
+
"@commercetools-uikit/i18n": "^15.1.0",
|
|
40
|
+
"@emotion/react": "11.9.3",
|
|
41
|
+
"@formatjs/icu-messageformat-parser": "2.1.4",
|
|
42
42
|
"@types/prop-types": "^15.7.5",
|
|
43
|
-
"@types/react": "^17.0.
|
|
44
|
-
"moment": "^2.29.
|
|
43
|
+
"@types/react": "^17.0.47",
|
|
44
|
+
"moment": "^2.29.4",
|
|
45
45
|
"prop-types": "15.8.1"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@formatjs/cli": "4.8.4",
|
|
49
49
|
"react": "17.0.2",
|
|
50
|
-
"react-intl": "^5.25.
|
|
50
|
+
"react-intl": "^5.25.1"
|
|
51
51
|
},
|
|
52
52
|
"peerDependencies": {
|
|
53
53
|
"react": "17.x",
|