@brightspace-ui/intl 3.34.4 → 3.36.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/lang/ca.js +44 -0
- package/lib/common.js +3 -2
- package/lib/dateTime.js +19 -4
- package/lib/number.js +2 -0
- package/package.json +1 -1
package/lang/ca.js
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
"intl-common:actions:add": "Add", // add action (in Title Case)
|
|
3
|
+
"intl-common:actions:apply": "Apply", // apply action (in Title Case)
|
|
4
|
+
"intl-common:actions:browse": "Browse", // browse action (in Title Case)
|
|
5
|
+
"intl-common:actions:cancel": "Cancel", // cancel action (in Title Case)
|
|
6
|
+
"intl-common:actions:clear": "Clear", // clear action (in Title Case)
|
|
7
|
+
"intl-common:actions:close": "Close", // close action (in Title Case)
|
|
8
|
+
"intl-common:actions:confirm": "Confirm", // confirm action (in Title Case)
|
|
9
|
+
"intl-common:actions:copy": "Copy", // copy action (in Title Case)
|
|
10
|
+
"intl-common:actions:create": "Create", // create action (in Title Case)
|
|
11
|
+
"intl-common:actions:delete": "Delete", // delete action (in Title Case)
|
|
12
|
+
"intl-common:actions:done": "Done", // done action (in Title Case)
|
|
13
|
+
"intl-common:actions:edit": "Edit", // edit action (in Title Case)
|
|
14
|
+
"intl-common:actions:finish": "Finish", // finish action (in Title Case)
|
|
15
|
+
"intl-common:actions:more": "More", // more action (in Title Case)
|
|
16
|
+
"intl-common:actions:print": "Print", // print action (in Title Case)
|
|
17
|
+
"intl-common:actions:remove": "Remove", // remove action (in Title Case)
|
|
18
|
+
"intl-common:actions:save": "Save", // save action (in Title Case)
|
|
19
|
+
"intl-common:actions:saveAndClose": "Save and Close", // save and close action (in Title Case)
|
|
20
|
+
"intl-common:actions:saveAndNew": "Save and New", // save and new action (in Title Case)
|
|
21
|
+
"intl-common:actions:search": "Search", // search action (in Title Case)
|
|
22
|
+
"intl-common:actions:submit": "Submit", // submit action (in Title Case)
|
|
23
|
+
"intl-common:actions:update": "Update", // update action (in Title Case)
|
|
24
|
+
"intl-common:characters:ampersand": "et", // short name or description of the "&" character
|
|
25
|
+
"intl-common:characters:apostrophe": "apòstrof tipogràfic", // short name or description of the "'" character
|
|
26
|
+
"intl-common:characters:asterisk": "asterisc", // short name or description of the "*" character
|
|
27
|
+
"intl-common:characters:backslash": "barra inversa", // short name or description of the "\" character
|
|
28
|
+
"intl-common:characters:colon": "dos punts", // short name or description of the ":" character
|
|
29
|
+
"intl-common:characters:comma": "coma", // short name or description of the "," character
|
|
30
|
+
"intl-common:characters:greaterThan": "major que", // short name or description of the ">" character
|
|
31
|
+
"intl-common:characters:lessThan": "menor que", // short name or description of the "<" character
|
|
32
|
+
"intl-common:characters:numberSign": "coixinet", // short name or description of the "#" character
|
|
33
|
+
"intl-common:characters:percentSign": "tant per cent", // short name or description of the "%" character
|
|
34
|
+
"intl-common:characters:pipe": "barra vertical", // short name or description of the "|" character
|
|
35
|
+
"intl-common:characters:questionMark": "signe d’interrogació", // short name or description of the "?" character
|
|
36
|
+
"intl-common:characters:quotationMark": "cometa doble", // short name or description of the '"' character
|
|
37
|
+
"intl-common:confirm:no": "No", // no response to a question (in Title Case)
|
|
38
|
+
"intl-common:confirm:ok": "OK", // okay response to a question
|
|
39
|
+
"intl-common:confirm:yes": "Yes", // yes response to a question (in Title Case)
|
|
40
|
+
"intl-common:navigation:back:title": "Back", // term for navigating back to the previous page (in Title Case)
|
|
41
|
+
"intl-common:navigation:continue:title": "Continue", // continue action (in Title Case)
|
|
42
|
+
"intl-common:navigation:next:title": "Next", // term for navigating to the next page or item (in Title Case)
|
|
43
|
+
"intl-common:navigation:previous:title": "Previous", // term for navigating to the previous page or item (in Title Case)
|
|
44
|
+
};
|
package/lib/common.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { DocumentLocaleSettings } from './document-locale-settings.js';
|
|
2
2
|
|
|
3
3
|
export const defaultLocale = 'en';
|
|
4
|
-
export const supportedBaseLocales = ['ar', 'cy', 'da', 'de', 'en', 'es', 'fr', 'haw', 'hi', 'ja', 'ko', 'mi', 'nl', 'pt', 'sv', 'th', 'tr', 'vi', 'zh'];
|
|
5
|
-
export const supportedLangpacks = ['ar', 'cy', 'da', 'de', 'en', 'en-gb', 'es', 'es-es', 'fr', 'fr-fr', 'fr-on', 'haw', 'hi', 'ja', 'ko', 'mi', 'nl', 'pt', 'sv', 'th', 'tr', 'vi', 'zh-cn', 'zh-tw'];
|
|
4
|
+
export const supportedBaseLocales = ['ar', 'ca', 'cy', 'da', 'de', 'en', 'es', 'fr', 'haw', 'hi', 'ja', 'ko', 'mi', 'nl', 'pt', 'sv', 'th', 'tr', 'vi', 'zh'];
|
|
5
|
+
export const supportedLangpacks = ['ar', 'ca', 'cy', 'da', 'de', 'en', 'en-gb', 'es', 'es-es', 'fr', 'fr-fr', 'fr-on', 'haw', 'hi', 'ja', 'ko', 'mi', 'nl', 'pt', 'sv', 'th', 'tr', 'vi', 'zh-cn', 'zh-tw'];
|
|
6
6
|
|
|
7
7
|
export const supportedLocalesDetails = [
|
|
8
8
|
{ id: 16, code: 'ar-sa', pack: 'ar', dir: 'rtl', name: 'العربية (المملكة العربية السعودية)' },
|
|
9
|
+
{ id: 38, code: 'ca-es', pack: 'ca', dir: 'ltr', name: 'Català (Espanya)' },
|
|
9
10
|
{ id: 31, code: 'cy-gb', pack: 'cy', dir: 'ltr', name: 'Cymraeg (Y Deyrnas Unedig)' },
|
|
10
11
|
{ id: 28, code: 'da-dk', pack: 'da', dir: 'ltr', name: 'Dansk (danmark)' },
|
|
11
12
|
{ id: 26, code: 'de-de', pack: 'de', dir: 'ltr', name: 'Deutsch (Deutschland)' },
|
package/lib/dateTime.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { getDocumentLocaleSettings, getLanguage, merge } from './common.js';
|
|
2
2
|
|
|
3
3
|
// to-do: These should be based on region, not language
|
|
4
|
-
const hour24locales = ['cy', 'da', 'de', 'es', 'fr', 'nl', 'pt', 'sv', 'tr', 'zh'];
|
|
5
|
-
const mondayFirstDayLocales = ['cy', 'da', 'de', 'fr', 'hi', 'mi', 'nl', 'sv', 'tr'];
|
|
4
|
+
const hour24locales = ['ca', 'cy', 'da', 'de', 'es', 'fr', 'nl', 'pt', 'sv', 'tr', 'zh'];
|
|
5
|
+
const mondayFirstDayLocales = ['ca', 'cy', 'da', 'de', 'fr', 'hi', 'mi', 'nl', 'sv', 'tr'];
|
|
6
6
|
|
|
7
7
|
// timezone abbreviations and offsets from https://www.timeanddate.com/time/zones/
|
|
8
8
|
const timezoneOffsetMap = {
|
|
@@ -367,6 +367,7 @@ function getParts() {
|
|
|
367
367
|
result.push('M');
|
|
368
368
|
break;
|
|
369
369
|
case 'yyyy':
|
|
370
|
+
case 'yy':
|
|
370
371
|
result.push('yyyy');
|
|
371
372
|
break;
|
|
372
373
|
}
|
|
@@ -400,7 +401,7 @@ function getTimeFormat(hour24, language, baseLanguage) {
|
|
|
400
401
|
let timeFormat = hour24 ? 'HH:mm' : 'h:mm';
|
|
401
402
|
|
|
402
403
|
// non-zero padded 24-hour clocks and zero-padded 12-hour clocks
|
|
403
|
-
if (hour24 && (baseLanguage === 'ja' || language === 'pt-br' || (baseLanguage === 'zh' && language !== 'zh-tw'))) {
|
|
404
|
+
if (hour24 && (baseLanguage === 'ca' || baseLanguage === 'ja' || language === 'pt-br' || (baseLanguage === 'zh' && language !== 'zh-tw'))) {
|
|
404
405
|
timeFormat = 'H:mm';
|
|
405
406
|
} else if (!hour24 && language === 'zh-tw') {
|
|
406
407
|
timeFormat = 'hh:mm';
|
|
@@ -739,6 +740,19 @@ export function getDateTimeDescriptor() {
|
|
|
739
740
|
weekendStartDay = 4;
|
|
740
741
|
weekendEndDay = 5;
|
|
741
742
|
break;
|
|
743
|
+
case 'ca':
|
|
744
|
+
dateFormats = ['dddd, d MMMM\' del \'yyyy', 'd MMMM\' del \'yyyy', 'd/M/yy', 'MMMM\' del \'yyyy', 'd MMMM', 'd MMM'];
|
|
745
|
+
dayPeriods = ['a. m.', 'p. m.'];
|
|
746
|
+
months = [
|
|
747
|
+
['de gener', 'de febrer', 'de març', 'd’abril', 'de maig', 'de juny', 'de juliol', 'd’agost', 'de setembre', 'd’octubre', 'de novembre', 'de desembre'],
|
|
748
|
+
['de gen.', 'de febr.', 'de març', 'd’abr.', 'de maig', 'de juny', 'de jul.', 'd’ag.', 'de set.', 'd’oct.', 'de nov.', 'de des.']
|
|
749
|
+
];
|
|
750
|
+
days = [
|
|
751
|
+
['diumenge', 'dilluns', 'dimarts', 'dimecres', 'dijous', 'divendres', 'dissabte'],
|
|
752
|
+
['dg.', 'dl.', 'dt.', 'dc.', 'dj.', 'dv.', 'ds.'],
|
|
753
|
+
['dg.', 'dl.', 'dt.', 'dc.', 'dj.', 'dv.', 'ds.'],
|
|
754
|
+
];
|
|
755
|
+
break;
|
|
742
756
|
case 'cy':
|
|
743
757
|
dateFormats = ['dddd, d MMMM yyyy', 'dd MMMM yyyy', 'dd/MM/yyyy', 'MMMM yyyy', 'd MMMM', 'd MMM'];
|
|
744
758
|
months = [
|
|
@@ -1099,7 +1113,8 @@ export function formatDate(date, options) {
|
|
|
1099
1113
|
'MMM': descriptor.calendar.months.short[date.getMonth()],
|
|
1100
1114
|
'MM': prePadByZero((date.getMonth() + 1), 2),
|
|
1101
1115
|
'M': (date.getMonth() + 1).toString(),
|
|
1102
|
-
'yyyy': date.getFullYear().toString()
|
|
1116
|
+
'yyyy': date.getFullYear().toString(),
|
|
1117
|
+
'yy': date.getFullYear().toString().substr(2, 2)
|
|
1103
1118
|
};
|
|
1104
1119
|
|
|
1105
1120
|
const value = processPattern(format, replacements);
|
package/lib/number.js
CHANGED
|
@@ -109,6 +109,7 @@ export function getNumberDescriptor() {
|
|
|
109
109
|
let percentPattern = '{number} %';
|
|
110
110
|
let percentNegativePattern = '-{number} %';
|
|
111
111
|
switch (baseLanguage) {
|
|
112
|
+
case 'ca':
|
|
112
113
|
case 'es':
|
|
113
114
|
case 'hi':
|
|
114
115
|
case 'ja':
|
|
@@ -127,6 +128,7 @@ export function getNumberDescriptor() {
|
|
|
127
128
|
let decimalSymbol = '.';
|
|
128
129
|
let groupSymbol = ',';
|
|
129
130
|
switch (baseLanguage) {
|
|
131
|
+
case 'ca':
|
|
130
132
|
case 'da':
|
|
131
133
|
case 'de':
|
|
132
134
|
case 'es':
|
package/package.json
CHANGED