@brightspace-ui/intl 3.42.0 → 3.42.2
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/lang/ca.js +4 -4
- package/lib/locale-data/current.js +2 -3
- package/lib/locale-data/supported.js +13 -11
- package/package.json +1 -1
package/lang/ca.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
export default {
|
|
2
2
|
"intl-common:actions:add": "Afegir", // add action (in Title Case)
|
|
3
3
|
"intl-common:actions:apply": "Aplicar", // apply action (in Title Case)
|
|
4
|
-
"intl-common:actions:browse": "
|
|
4
|
+
"intl-common:actions:browse": "Navegar", // browse action (in Title Case)
|
|
5
5
|
"intl-common:actions:cancel": "Cancel·lar", // cancel action (in Title Case)
|
|
6
6
|
"intl-common:actions:clear": "Esborrar", // clear action (in Title Case)
|
|
7
7
|
"intl-common:actions:close": "Tancar", // close action (in Title Case)
|
|
8
|
-
"intl-common:actions:confirm": "
|
|
8
|
+
"intl-common:actions:confirm": "Confirmar", // confirm action (in Title Case)
|
|
9
9
|
"intl-common:actions:copy": "Copiar", // copy action (in Title Case)
|
|
10
10
|
"intl-common:actions:create": "Crear", // create action (in Title Case)
|
|
11
11
|
"intl-common:actions:delete": "Eliminar", // delete action (in Title Case)
|
|
@@ -19,7 +19,7 @@ export default {
|
|
|
19
19
|
"intl-common:actions:save": "Desar", // save action (in Title Case)
|
|
20
20
|
"intl-common:actions:saveAndClose": "Desar i tancar", // save and close action (in Title Case)
|
|
21
21
|
"intl-common:actions:saveAndNew": "Desar i nou", // save and new action (in Title Case)
|
|
22
|
-
"intl-common:actions:search": "
|
|
22
|
+
"intl-common:actions:search": "Cercar", // search action (in Title Case)
|
|
23
23
|
"intl-common:actions:submit": "Lliurar", // submit action (in Title Case)
|
|
24
24
|
"intl-common:actions:update": "Actualitzar", // update action (in Title Case)
|
|
25
25
|
"intl-common:characters:ampersand": "signe «&»", // short name or description of the "&" character
|
|
@@ -39,7 +39,7 @@ export default {
|
|
|
39
39
|
"intl-common:confirm:ok": "D’acord", // okay response to a question
|
|
40
40
|
"intl-common:confirm:yes": "Sí", // yes response to a question (in Title Case)
|
|
41
41
|
"intl-common:navigation:back:title": "Enrere", // term for navigating back to the previous page (in Title Case)
|
|
42
|
-
"intl-common:navigation:continue:title": "
|
|
42
|
+
"intl-common:navigation:continue:title": "Continuar", // continue action (in Title Case)
|
|
43
43
|
"intl-common:navigation:next:title": "Següent", // term for navigating to the next page or item (in Title Case)
|
|
44
44
|
"intl-common:navigation:previous:title": "Anterior", // term for navigating to the previous page or item (in Title Case)
|
|
45
45
|
};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
+
import { defaultLocale, resolveSupportedLocale } from './supported.js';
|
|
1
2
|
import { getDocumentLocaleSettings } from '../common.js';
|
|
2
3
|
|
|
3
|
-
import { resolveSupportedLocale } from './supported.js';
|
|
4
|
-
|
|
5
4
|
const localeDataTarget = {};
|
|
6
5
|
|
|
7
6
|
// block deletions and existing property redefinitions
|
|
@@ -21,7 +20,7 @@ Object.defineProperty(localeDataTarget, 'finally', { value: (...args) => localeD
|
|
|
21
20
|
|
|
22
21
|
async function setLocaleData() {
|
|
23
22
|
if (currentLocale === documentLocaleSettings.language) return;
|
|
24
|
-
const resolvedLanguage = resolveSupportedLocale(documentLocaleSettings.language);
|
|
23
|
+
const resolvedLanguage = resolveSupportedLocale(documentLocaleSettings.language || documentLocaleSettings.fallbackLanguage || defaultLocale);
|
|
25
24
|
const newData = deepFreeze((await import(`./locales/${resolvedLanguage}.js`)).default);
|
|
26
25
|
|
|
27
26
|
Object.keys(newData).forEach(k => localeDataTarget[k] = newData[k]);
|
|
@@ -39,19 +39,21 @@ export const supportedLocales = supportedLocalesDetails.map(l => l.code);
|
|
|
39
39
|
export function resolveSupportedLocale(localeTags) {
|
|
40
40
|
localeTags = [].concat(localeTags);
|
|
41
41
|
|
|
42
|
-
|
|
43
|
-
const
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
42
|
+
if (localeTags.length) {
|
|
43
|
+
for (const localeTag of localeTags) {
|
|
44
|
+
const localeTagLower = localeTag.toLowerCase();
|
|
45
|
+
const locale = supportedLocalesDetails.find(l => [l.overrideCode, l.code].includes(localeTagLower));
|
|
46
|
+
if (locale) {
|
|
47
|
+
return locale.overrideCode || locale.source;
|
|
48
|
+
}
|
|
47
49
|
}
|
|
48
|
-
}
|
|
49
50
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
51
|
+
for (const localeTag of localeTags) {
|
|
52
|
+
const lang = localeTag.split('-')[0];
|
|
53
|
+
const locale = supportedLocalesDetails.find(l => l.source === lang);
|
|
54
|
+
if (locale) {
|
|
55
|
+
return locale.overrideCode || locale.source;
|
|
56
|
+
}
|
|
55
57
|
}
|
|
56
58
|
}
|
|
57
59
|
return defaultLocale;
|
package/package.json
CHANGED