@brightspace-ui/intl 3.40.0 → 3.41.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/lib/common.js +8 -2
- package/lib/dateTime.js +202 -324
- package/lib/document-locale-settings.js +1 -1
- package/lib/locale-data/current.js +54 -0
- package/lib/locale-data/locales/ar.js +430 -0
- package/lib/locale-data/locales/ca.js +427 -0
- package/lib/locale-data/locales/cy.js +419 -0
- package/lib/locale-data/locales/da.js +414 -0
- package/lib/locale-data/locales/de.js +421 -0
- package/lib/locale-data/locales/en-CA.js +453 -0
- package/lib/locale-data/locales/en-GB.js +458 -0
- package/lib/locale-data/locales/en.js +452 -0
- package/lib/locale-data/locales/es-419.js +426 -0
- package/lib/locale-data/locales/es.js +425 -0
- package/lib/locale-data/locales/fr-CA-u-sd-caon.js +422 -0
- package/lib/locale-data/locales/fr-CA.js +422 -0
- package/lib/locale-data/locales/fr.js +419 -0
- package/lib/locale-data/locales/haw.js +371 -0
- package/lib/locale-data/locales/hi.js +424 -0
- package/lib/locale-data/locales/ja.js +431 -0
- package/lib/locale-data/locales/ko.js +435 -0
- package/lib/locale-data/locales/mi.js +384 -0
- package/lib/locale-data/locales/nl.js +417 -0
- package/lib/locale-data/locales/pl.js +421 -0
- package/lib/locale-data/locales/pt.js +423 -0
- package/lib/locale-data/locales/ru.js +421 -0
- package/lib/locale-data/locales/sv.js +426 -0
- package/lib/locale-data/locales/th.js +440 -0
- package/lib/locale-data/locales/tr.js +432 -0
- package/lib/locale-data/locales/ur.js +270 -0
- package/lib/locale-data/locales/vi.js +425 -0
- package/lib/locale-data/locales/zh-Hant.js +430 -0
- package/lib/locale-data/locales/zh.js +425 -0
- package/lib/locale-data/supported.js +14 -9
- package/lib/localize.js +3 -2
- package/package.json +1 -3
|
@@ -0,0 +1,425 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
languageDisplayName: "中文",
|
|
3
|
+
territoryDisplayName: "",
|
|
4
|
+
scriptDisplayName: "",
|
|
5
|
+
localeDisplayName: "中文",
|
|
6
|
+
sourceLocale: "zh",
|
|
7
|
+
localeCode: "zh",
|
|
8
|
+
likelySubtag: "zh-Hans-CN",
|
|
9
|
+
layout: {
|
|
10
|
+
orientation: {
|
|
11
|
+
characterOrder: "left-to-right",
|
|
12
|
+
lineOrder: "top-to-bottom"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
pluralClass: {
|
|
16
|
+
cardinal: [
|
|
17
|
+
"other"
|
|
18
|
+
],
|
|
19
|
+
ordinal: [
|
|
20
|
+
"other"
|
|
21
|
+
]
|
|
22
|
+
},
|
|
23
|
+
localeDisplayPattern: {
|
|
24
|
+
localePattern: "{0} ({1})",
|
|
25
|
+
localeSeparator: "{0}, {1}",
|
|
26
|
+
localeKeyTypePattern: "{0}: {1}"
|
|
27
|
+
},
|
|
28
|
+
dateFormats: {
|
|
29
|
+
full: "y年M月d日",
|
|
30
|
+
long: "y年M月d日",
|
|
31
|
+
medium: "y年M月d日",
|
|
32
|
+
short: "y/M/d"
|
|
33
|
+
},
|
|
34
|
+
dateFormatItems: {
|
|
35
|
+
Bh: "Bh时",
|
|
36
|
+
Bhm: "Bh:mm",
|
|
37
|
+
Bhms: "Bh:mm:ss",
|
|
38
|
+
d: "d日",
|
|
39
|
+
EBh: "EBh时",
|
|
40
|
+
EBhm: "EBh:mm",
|
|
41
|
+
EBhms: "EBh:mm:ss",
|
|
42
|
+
Ed: "d日E",
|
|
43
|
+
Eh: "Eah时",
|
|
44
|
+
Ehm: "Eah:mm",
|
|
45
|
+
EHm: "EHH:mm",
|
|
46
|
+
Ehms: "Eah:mm:ss",
|
|
47
|
+
EHms: "EHH:mm:ss",
|
|
48
|
+
Gy: "Gy年",
|
|
49
|
+
GyM: "Gy年M月",
|
|
50
|
+
GyMd: "Gy-MM-dd",
|
|
51
|
+
GyMEd: "Gy-MM-ddE",
|
|
52
|
+
GyMMM: "Gy年M月",
|
|
53
|
+
GyMMMd: "Gy年M月d日",
|
|
54
|
+
GyMMMEd: "Gy年M月d日E",
|
|
55
|
+
h: "ah时",
|
|
56
|
+
H: "H时",
|
|
57
|
+
hm: "a h:mm",
|
|
58
|
+
hms: "ah:mm:ss",
|
|
59
|
+
hmsv: "vah:mm:ss",
|
|
60
|
+
Hmsv: "vHH:mm:ss",
|
|
61
|
+
hmv: "vah:mm",
|
|
62
|
+
Hmv: "v HH:mm",
|
|
63
|
+
hv: "vah时",
|
|
64
|
+
Hv: "vH时",
|
|
65
|
+
M: "M月",
|
|
66
|
+
Md: "M/d",
|
|
67
|
+
MEd: "M/dE",
|
|
68
|
+
MMdd: "MM/dd",
|
|
69
|
+
MMMd: "M月d日",
|
|
70
|
+
MMMEd: "M月d日E",
|
|
71
|
+
MMMMd: "M月d日",
|
|
72
|
+
MMMMW: "MMMM第W周",
|
|
73
|
+
y: "y年",
|
|
74
|
+
yM: "y/M",
|
|
75
|
+
yMd: "y/M/d",
|
|
76
|
+
yMEd: "y/M/dE",
|
|
77
|
+
yMEEEEd: "y年M月d日EEEE",
|
|
78
|
+
yMM: "y年M月",
|
|
79
|
+
yMMM: "y年M月",
|
|
80
|
+
yMMMd: "y年M月d日",
|
|
81
|
+
yMMMEd: "y年M月d日E",
|
|
82
|
+
yMMMM: "y年M月",
|
|
83
|
+
yQQQ: "y年第Q季度",
|
|
84
|
+
yQQQQ: "y年第Q季度",
|
|
85
|
+
yw: "Y年第w周",
|
|
86
|
+
E: "ccc",
|
|
87
|
+
Hm: "HH:mm",
|
|
88
|
+
Hms: "HH:mm:ss",
|
|
89
|
+
MMM: "LLL",
|
|
90
|
+
ms: "mm:ss"
|
|
91
|
+
},
|
|
92
|
+
timeFormats: {
|
|
93
|
+
full: "zzzz HH:mm:ss",
|
|
94
|
+
long: "z HH:mm:ss",
|
|
95
|
+
medium: "HH:mm:ss",
|
|
96
|
+
short: "H:mm"
|
|
97
|
+
},
|
|
98
|
+
dayPeriods: {
|
|
99
|
+
format: {
|
|
100
|
+
abbreviated: {
|
|
101
|
+
midnight: "午夜",
|
|
102
|
+
am: "上午",
|
|
103
|
+
pm: "下午",
|
|
104
|
+
morning1: "早上",
|
|
105
|
+
morning2: "上午",
|
|
106
|
+
afternoon1: "中午",
|
|
107
|
+
afternoon2: "下午",
|
|
108
|
+
evening1: "晚上",
|
|
109
|
+
night1: "凌晨"
|
|
110
|
+
},
|
|
111
|
+
narrow: {
|
|
112
|
+
midnight: "午夜",
|
|
113
|
+
am: "上午",
|
|
114
|
+
pm: "下午",
|
|
115
|
+
morning1: "早上",
|
|
116
|
+
morning2: "上午",
|
|
117
|
+
afternoon1: "中午",
|
|
118
|
+
afternoon2: "下午",
|
|
119
|
+
evening1: "晚上",
|
|
120
|
+
night1: "凌晨"
|
|
121
|
+
},
|
|
122
|
+
wide: {
|
|
123
|
+
midnight: "午夜",
|
|
124
|
+
morning1: "清晨",
|
|
125
|
+
morning2: "上午",
|
|
126
|
+
afternoon1: "中午",
|
|
127
|
+
afternoon2: "下午",
|
|
128
|
+
evening1: "晚上",
|
|
129
|
+
night1: "凌晨",
|
|
130
|
+
am: "上午",
|
|
131
|
+
pm: "下午"
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
standAlone: {
|
|
135
|
+
abbreviated: {
|
|
136
|
+
midnight: "午夜",
|
|
137
|
+
am: "上午",
|
|
138
|
+
pm: "下午",
|
|
139
|
+
morning1: "早上",
|
|
140
|
+
morning2: "上午",
|
|
141
|
+
afternoon1: "中午",
|
|
142
|
+
afternoon2: "下午",
|
|
143
|
+
evening1: "晚上",
|
|
144
|
+
night1: "凌晨"
|
|
145
|
+
},
|
|
146
|
+
narrow: {
|
|
147
|
+
midnight: "午夜",
|
|
148
|
+
am: "上午",
|
|
149
|
+
pm: "下午",
|
|
150
|
+
morning1: "早上",
|
|
151
|
+
morning2: "上午",
|
|
152
|
+
afternoon1: "中午",
|
|
153
|
+
afternoon2: "下午",
|
|
154
|
+
evening1: "晚上",
|
|
155
|
+
night1: "凌晨"
|
|
156
|
+
},
|
|
157
|
+
wide: {
|
|
158
|
+
midnight: "午夜",
|
|
159
|
+
am: "上午",
|
|
160
|
+
pm: "下午",
|
|
161
|
+
morning1: "早上",
|
|
162
|
+
morning2: "上午",
|
|
163
|
+
afternoon1: "中午",
|
|
164
|
+
afternoon2: "下午",
|
|
165
|
+
evening1: "晚上",
|
|
166
|
+
night1: "凌晨"
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
},
|
|
170
|
+
dayNames: {
|
|
171
|
+
format: {
|
|
172
|
+
abbreviated: [
|
|
173
|
+
"周日",
|
|
174
|
+
"周一",
|
|
175
|
+
"週二",
|
|
176
|
+
"周三",
|
|
177
|
+
"周四",
|
|
178
|
+
"周五",
|
|
179
|
+
"周六"
|
|
180
|
+
],
|
|
181
|
+
narrow: [
|
|
182
|
+
"日",
|
|
183
|
+
"一",
|
|
184
|
+
"二",
|
|
185
|
+
"三",
|
|
186
|
+
"四",
|
|
187
|
+
"五",
|
|
188
|
+
"六"
|
|
189
|
+
],
|
|
190
|
+
wide: [
|
|
191
|
+
"星期日",
|
|
192
|
+
"星期一",
|
|
193
|
+
"週二",
|
|
194
|
+
"星期三",
|
|
195
|
+
"星期四",
|
|
196
|
+
"星期五",
|
|
197
|
+
"星期六"
|
|
198
|
+
],
|
|
199
|
+
short: [
|
|
200
|
+
"周日",
|
|
201
|
+
"周一",
|
|
202
|
+
"週二",
|
|
203
|
+
"周三",
|
|
204
|
+
"周四",
|
|
205
|
+
"周五",
|
|
206
|
+
"周六"
|
|
207
|
+
]
|
|
208
|
+
},
|
|
209
|
+
standAlone: {
|
|
210
|
+
abbreviated: [
|
|
211
|
+
"周日",
|
|
212
|
+
"周一",
|
|
213
|
+
"週二",
|
|
214
|
+
"周三",
|
|
215
|
+
"周四",
|
|
216
|
+
"周五",
|
|
217
|
+
"周六"
|
|
218
|
+
],
|
|
219
|
+
narrow: [
|
|
220
|
+
"日",
|
|
221
|
+
"一",
|
|
222
|
+
"二",
|
|
223
|
+
"三",
|
|
224
|
+
"四",
|
|
225
|
+
"五",
|
|
226
|
+
"六"
|
|
227
|
+
],
|
|
228
|
+
wide: [
|
|
229
|
+
"星期日",
|
|
230
|
+
"星期一",
|
|
231
|
+
"週二",
|
|
232
|
+
"星期三",
|
|
233
|
+
"星期四",
|
|
234
|
+
"星期五",
|
|
235
|
+
"星期六"
|
|
236
|
+
],
|
|
237
|
+
short: [
|
|
238
|
+
"周日",
|
|
239
|
+
"周一",
|
|
240
|
+
"週二",
|
|
241
|
+
"周三",
|
|
242
|
+
"周四",
|
|
243
|
+
"周五",
|
|
244
|
+
"周六"
|
|
245
|
+
]
|
|
246
|
+
}
|
|
247
|
+
},
|
|
248
|
+
weekData: {
|
|
249
|
+
firstDay: 1,
|
|
250
|
+
weekendStart: 6,
|
|
251
|
+
weekendEnd: 0
|
|
252
|
+
},
|
|
253
|
+
months: {
|
|
254
|
+
format: {
|
|
255
|
+
abbreviated: [
|
|
256
|
+
"一月",
|
|
257
|
+
"二月",
|
|
258
|
+
"三月",
|
|
259
|
+
"四月",
|
|
260
|
+
"五月",
|
|
261
|
+
"六月",
|
|
262
|
+
"七月",
|
|
263
|
+
"八月",
|
|
264
|
+
"九月",
|
|
265
|
+
"十月",
|
|
266
|
+
"十一月",
|
|
267
|
+
"十二月"
|
|
268
|
+
],
|
|
269
|
+
narrow: [
|
|
270
|
+
"1",
|
|
271
|
+
"2",
|
|
272
|
+
"3",
|
|
273
|
+
"4",
|
|
274
|
+
"5",
|
|
275
|
+
"6",
|
|
276
|
+
"7",
|
|
277
|
+
"8",
|
|
278
|
+
"9",
|
|
279
|
+
"10",
|
|
280
|
+
"11",
|
|
281
|
+
"12"
|
|
282
|
+
],
|
|
283
|
+
wide: [
|
|
284
|
+
"一月",
|
|
285
|
+
"二月",
|
|
286
|
+
"三月",
|
|
287
|
+
"四月",
|
|
288
|
+
"五月",
|
|
289
|
+
"六月",
|
|
290
|
+
"七月",
|
|
291
|
+
"八月",
|
|
292
|
+
"九月",
|
|
293
|
+
"十月",
|
|
294
|
+
"十一月",
|
|
295
|
+
"十二月"
|
|
296
|
+
]
|
|
297
|
+
},
|
|
298
|
+
standAlone: {
|
|
299
|
+
abbreviated: [
|
|
300
|
+
"一月",
|
|
301
|
+
"二月",
|
|
302
|
+
"三月",
|
|
303
|
+
"四月",
|
|
304
|
+
"五月",
|
|
305
|
+
"六月",
|
|
306
|
+
"七月",
|
|
307
|
+
"八月",
|
|
308
|
+
"九月",
|
|
309
|
+
"十月",
|
|
310
|
+
"十一月",
|
|
311
|
+
"十二月"
|
|
312
|
+
],
|
|
313
|
+
narrow: [
|
|
314
|
+
"1",
|
|
315
|
+
"2",
|
|
316
|
+
"3",
|
|
317
|
+
"4",
|
|
318
|
+
"5",
|
|
319
|
+
"6",
|
|
320
|
+
"7",
|
|
321
|
+
"8",
|
|
322
|
+
"9",
|
|
323
|
+
"10",
|
|
324
|
+
"11",
|
|
325
|
+
"12"
|
|
326
|
+
],
|
|
327
|
+
wide: [
|
|
328
|
+
"一月",
|
|
329
|
+
"二月",
|
|
330
|
+
"三月",
|
|
331
|
+
"四月",
|
|
332
|
+
"五月",
|
|
333
|
+
"六月",
|
|
334
|
+
"七月",
|
|
335
|
+
"八月",
|
|
336
|
+
"九月",
|
|
337
|
+
"十月",
|
|
338
|
+
"十一月",
|
|
339
|
+
"十二月"
|
|
340
|
+
]
|
|
341
|
+
},
|
|
342
|
+
transforms: {
|
|
343
|
+
titleCase: {}
|
|
344
|
+
}
|
|
345
|
+
},
|
|
346
|
+
numberingSystemId: "latn",
|
|
347
|
+
numberingSystem: {
|
|
348
|
+
type: "numeric",
|
|
349
|
+
digits: [
|
|
350
|
+
"0",
|
|
351
|
+
"1",
|
|
352
|
+
"2",
|
|
353
|
+
"3",
|
|
354
|
+
"4",
|
|
355
|
+
"5",
|
|
356
|
+
"6",
|
|
357
|
+
"7",
|
|
358
|
+
"8",
|
|
359
|
+
"9"
|
|
360
|
+
]
|
|
361
|
+
},
|
|
362
|
+
numberSymbols: {
|
|
363
|
+
latn: {
|
|
364
|
+
decimal: ".",
|
|
365
|
+
group: ",",
|
|
366
|
+
list: ";",
|
|
367
|
+
percentSign: "%",
|
|
368
|
+
plusSign: "+",
|
|
369
|
+
minusSign: "-",
|
|
370
|
+
approximatelySign: "~",
|
|
371
|
+
exponential: "E",
|
|
372
|
+
superscriptingExponent: "×",
|
|
373
|
+
perMille: "‰",
|
|
374
|
+
infinity: "∞",
|
|
375
|
+
nan: "NaN",
|
|
376
|
+
timeSeparator: ":"
|
|
377
|
+
},
|
|
378
|
+
default: {
|
|
379
|
+
decimal: ".",
|
|
380
|
+
group: ",",
|
|
381
|
+
list: ";",
|
|
382
|
+
percentSign: "%",
|
|
383
|
+
plusSign: "+",
|
|
384
|
+
minusSign: "-",
|
|
385
|
+
approximatelySign: "~",
|
|
386
|
+
exponential: "E",
|
|
387
|
+
superscriptingExponent: "×",
|
|
388
|
+
perMille: "‰",
|
|
389
|
+
infinity: "∞",
|
|
390
|
+
nan: "NaN",
|
|
391
|
+
timeSeparator: ":"
|
|
392
|
+
}
|
|
393
|
+
},
|
|
394
|
+
delimiters: {
|
|
395
|
+
quotationStart: "“",
|
|
396
|
+
quotationEnd: "”",
|
|
397
|
+
alternateQuotationStart: "‘",
|
|
398
|
+
alternateQuotationEnd: "’",
|
|
399
|
+
apostrophe: "’"
|
|
400
|
+
},
|
|
401
|
+
listPatterns: {
|
|
402
|
+
default: {
|
|
403
|
+
2: "{0}和{1}",
|
|
404
|
+
start: "{0}、{1}",
|
|
405
|
+
middle: "{0}、{1}",
|
|
406
|
+
end: "{0}和{1}"
|
|
407
|
+
},
|
|
408
|
+
or: {
|
|
409
|
+
2: "{0}或{1}",
|
|
410
|
+
start: "{0}、{1}",
|
|
411
|
+
middle: "{0}、{1}",
|
|
412
|
+
end: "{0}或{1}"
|
|
413
|
+
},
|
|
414
|
+
standardNarrow: {
|
|
415
|
+
2: "{0}、{1}",
|
|
416
|
+
end: "{0}、{1}"
|
|
417
|
+
},
|
|
418
|
+
unitShort: {
|
|
419
|
+
2: "{0}{1}",
|
|
420
|
+
start: "{0}{1}",
|
|
421
|
+
middle: "{0}{1}",
|
|
422
|
+
end: "{0}{1}"
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
};
|
|
@@ -14,7 +14,7 @@ export const supportedLocalesDetails = [
|
|
|
14
14
|
{ id: 18, code: 'es-mx', source: 'es-MX', pack: 'es', overrideCode: 'es-419', dir: 'ltr', name: 'Español (Latinoamérica)' },
|
|
15
15
|
{ id: 2, code: 'fr-ca', source: 'fr-CA', pack: 'fr', dir: 'ltr', name: 'Français (Canada)' },
|
|
16
16
|
{ id: 29, code: 'fr-fr', source: 'fr', pack: 'fr-fr', dir: 'ltr', name: 'Français (France)' },
|
|
17
|
-
{ id: 32, code: 'fr-on', source: 'fr-CA', pack: 'fr-on', overrideCode: 'fr-CA-
|
|
17
|
+
{ id: 32, code: 'fr-on', source: 'fr-CA', pack: 'fr-on', overrideCode: 'fr-CA-u-sd-caon', dir: 'ltr', name: 'Français (Ontario)' },
|
|
18
18
|
{ id: 35, code: 'haw-us', source: 'haw', pack: 'haw', dir: 'ltr', name: 'ʻŌlelo Hawaiʻi (ʻAmelika Hui Pū ʻIa)' },
|
|
19
19
|
{ id: 33, code: 'hi-in', source: 'hi', pack: 'hi', dir: 'ltr', name: 'हिंदी (भारत)' },
|
|
20
20
|
{ id: 21, code: 'ja-jp', source: 'ja', pack: 'ja', dir: 'ltr', name: '日本語 (日本)' },
|
|
@@ -26,7 +26,7 @@ export const supportedLocalesDetails = [
|
|
|
26
26
|
{ id: 37, code: 'th-th', source: 'th', pack: 'th', dir: 'ltr', name: 'ไทย (ไทย)' },
|
|
27
27
|
{ id: 23, code: 'tr-tr', source: 'tr', pack: 'tr', dir: 'ltr', name: 'Türkçe (Türkiye)' },
|
|
28
28
|
{ id: 36, code: 'vi-vn', source: 'vi', pack: 'vi', dir: 'ltr', name: 'Tiếng Việt (Việt Nam)' },
|
|
29
|
-
{ id: 17, code: 'zh-cn', source: 'zh', pack: 'zh-cn', overrideCode: 'zh
|
|
29
|
+
{ id: 17, code: 'zh-cn', source: 'zh', pack: 'zh-cn', overrideCode: 'zh', dir: 'ltr', name: '中文(简体)' },
|
|
30
30
|
{ id: 20, code: 'zh-tw', source: 'zh-Hant', pack: 'zh-tw', overrideCode: 'zh-Hant', dir: 'ltr', name: '中文(繁体)' },
|
|
31
31
|
{ id: 39, code: 'ru', source: 'ru', pack: 'ru', dir: 'ltr', name: 'русский' },
|
|
32
32
|
{ id: 40, code: 'pl', source: 'pl', pack: 'pl', dir: 'ltr', name: 'polski' },
|
|
@@ -39,15 +39,20 @@ export const supportedLocales = supportedLocalesDetails.map(l => l.code);
|
|
|
39
39
|
export function resolveSupportedLocale(localeTags) {
|
|
40
40
|
localeTags = [].concat(localeTags);
|
|
41
41
|
|
|
42
|
-
const localeTag
|
|
43
|
-
|
|
44
|
-
|
|
42
|
+
for (const localeTag of localeTags) {
|
|
43
|
+
const localeTagLower = localeTag.toLowerCase();
|
|
44
|
+
const locale = supportedLocalesDetails.find(l => [l.overrideCode, l.code].includes(localeTagLower));
|
|
45
|
+
if (locale) {
|
|
46
|
+
return locale.overrideCode || locale.source;
|
|
45
47
|
}
|
|
48
|
+
}
|
|
46
49
|
|
|
50
|
+
for (const localeTag of localeTags) {
|
|
47
51
|
const lang = localeTag.split('-')[0];
|
|
48
|
-
|
|
49
|
-
|
|
52
|
+
const locale = supportedLocalesDetails.find(l => l.source === lang);
|
|
53
|
+
if (locale) {
|
|
54
|
+
return locale.overrideCode || locale.source;
|
|
50
55
|
}
|
|
51
|
-
}
|
|
52
|
-
return
|
|
56
|
+
}
|
|
57
|
+
return defaultLocale;
|
|
53
58
|
}
|
package/lib/localize.js
CHANGED
|
@@ -238,8 +238,9 @@ export const getLocalizeClass = (superclass = class {}) => class LocalizeClass e
|
|
|
238
238
|
if (osloCollection) {
|
|
239
239
|
const oslo = this.documentLocaleSettings.oslo;
|
|
240
240
|
let languageId = 0;
|
|
241
|
-
|
|
242
|
-
|
|
241
|
+
const doc = document.documentElement;
|
|
242
|
+
if (doc.hasAttribute('data-custom-lang') && oslo.collection) {
|
|
243
|
+
languageId = Number(doc.dataset.languageId) || supportedLocalesDetails.find(l => l.code === osloLang || l.pack === osloLang)?.id;
|
|
243
244
|
if (languageId) {
|
|
244
245
|
const batch = oslo.batch && new URL(oslo.batch, self.origin);
|
|
245
246
|
if (batch && languageId !== batch.searchParams.get('languageId')) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@brightspace-ui/intl",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.41.0",
|
|
4
4
|
"description": "Internationalization APIs for number, date, time and file size formatting and parsing in D2L Brightspace.",
|
|
5
5
|
"main": "lib/number.js",
|
|
6
6
|
"type": "module",
|
|
@@ -13,8 +13,6 @@
|
|
|
13
13
|
"files": [
|
|
14
14
|
"/lang",
|
|
15
15
|
"/lib",
|
|
16
|
-
"!/lib/locale-data/",
|
|
17
|
-
"/lib/locale-data/supported.js",
|
|
18
16
|
"/helpers"
|
|
19
17
|
],
|
|
20
18
|
"publishConfig": {
|