@seafile/seafile-calendar 1.0.3-alpha.1 → 1.0.3-alpha.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/es/Calendar.js +1 -0
- package/es/locale/cs_CZ.js +4 -4
- package/es/locale/de_DE.js +4 -4
- package/es/locale/en_US.js +4 -4
- package/es/locale/es_ES.js +4 -4
- package/es/locale/fr_FR.js +4 -4
- package/es/locale/pl_PL.js +4 -4
- package/es/locale/ru_RU.js +4 -4
- package/es/locale/zh_CN.js +4 -4
- package/es/locale/zh_TW.js +4 -4
- package/lib/Calendar.js +1 -0
- package/lib/locale/cs_CZ.js +4 -4
- package/lib/locale/de_DE.js +4 -4
- package/lib/locale/en_US.js +4 -4
- package/lib/locale/es_ES.js +4 -4
- package/lib/locale/fr_FR.js +4 -4
- package/lib/locale/pl_PL.js +4 -4
- package/lib/locale/ru_RU.js +4 -4
- package/lib/locale/zh_CN.js +4 -4
- package/lib/locale/zh_TW.js +4 -4
- package/package.json +1 -1
- package/es/util/platform.js +0 -39
- package/lib/util/platform.js +0 -49
package/es/Calendar.js
CHANGED
package/es/locale/cs_CZ.js
CHANGED
|
@@ -16,10 +16,10 @@ export default {
|
|
|
16
16
|
dayFormat: 'D',
|
|
17
17
|
dateTimeFormat: 'D.M.YYYY HH:mm:ss',
|
|
18
18
|
monthBeforeYear: true,
|
|
19
|
-
previousMonth: 'Předchozí měsíc
|
|
20
|
-
nextMonth: 'Následující
|
|
21
|
-
previousYear: 'Předchozí rok
|
|
22
|
-
nextYear: 'Následující rok
|
|
19
|
+
previousMonth: 'Předchozí měsíc',
|
|
20
|
+
nextMonth: 'Následující',
|
|
21
|
+
previousYear: 'Předchozí rok',
|
|
22
|
+
nextYear: 'Následující rok',
|
|
23
23
|
previousDecade: 'Předchozí dekáda',
|
|
24
24
|
nextDecade: 'Následující dekáda',
|
|
25
25
|
previousCentury: 'Předchozí století',
|
package/es/locale/de_DE.js
CHANGED
|
@@ -16,10 +16,10 @@ export default {
|
|
|
16
16
|
dayFormat: 'D',
|
|
17
17
|
dateTimeFormat: 'D.M.YYYY HH:mm:ss',
|
|
18
18
|
monthBeforeYear: true,
|
|
19
|
-
previousMonth: 'Vorheriger Monat
|
|
20
|
-
nextMonth: 'Nächster Monat
|
|
21
|
-
previousYear: 'Vorheriges Jahr
|
|
22
|
-
nextYear: 'Nächstes Jahr
|
|
19
|
+
previousMonth: 'Vorheriger Monat',
|
|
20
|
+
nextMonth: 'Nächster Monat',
|
|
21
|
+
previousYear: 'Vorheriges Jahr',
|
|
22
|
+
nextYear: 'Nächstes Jahr',
|
|
23
23
|
previousDecade: 'Vorheriges Jahrzehnt',
|
|
24
24
|
nextDecade: 'Nächstes Jahrzehnt',
|
|
25
25
|
previousCentury: 'Vorheriges Jahrhundert',
|
package/es/locale/en_US.js
CHANGED
|
@@ -17,10 +17,10 @@ export default {
|
|
|
17
17
|
dayFormat: 'D',
|
|
18
18
|
dateTimeFormat: 'M/D/YYYY HH:mm:ss',
|
|
19
19
|
monthBeforeYear: true,
|
|
20
|
-
previousMonth: 'Previous month
|
|
21
|
-
nextMonth: 'Next month
|
|
22
|
-
previousYear: 'Last year
|
|
23
|
-
nextYear: 'Next year
|
|
20
|
+
previousMonth: 'Previous month',
|
|
21
|
+
nextMonth: 'Next month',
|
|
22
|
+
previousYear: 'Last year',
|
|
23
|
+
nextYear: 'Next year',
|
|
24
24
|
previousDecade: 'Last decade',
|
|
25
25
|
nextDecade: 'Next decade',
|
|
26
26
|
previousCentury: 'Last century',
|
package/es/locale/es_ES.js
CHANGED
|
@@ -16,10 +16,10 @@ export default {
|
|
|
16
16
|
dayFormat: 'D',
|
|
17
17
|
dateTimeFormat: 'D/M/YYYY HH:mm:ss',
|
|
18
18
|
monthBeforeYear: true,
|
|
19
|
-
previousMonth: 'Mes anterior
|
|
20
|
-
nextMonth: 'Mes siguiente
|
|
21
|
-
previousYear: 'Año anterior
|
|
22
|
-
nextYear: 'Año siguiente
|
|
19
|
+
previousMonth: 'Mes anterior',
|
|
20
|
+
nextMonth: 'Mes siguiente',
|
|
21
|
+
previousYear: 'Año anterior',
|
|
22
|
+
nextYear: 'Año siguiente',
|
|
23
23
|
previousDecade: 'Década anterior',
|
|
24
24
|
nextDecade: 'Década siguiente',
|
|
25
25
|
previousCentury: 'Siglo anterior',
|
package/es/locale/fr_FR.js
CHANGED
|
@@ -16,10 +16,10 @@ export default {
|
|
|
16
16
|
dayFormat: 'DD',
|
|
17
17
|
dateTimeFormat: 'DD/MM/YYYY HH:mm:ss',
|
|
18
18
|
monthBeforeYear: true,
|
|
19
|
-
previousMonth: 'Mois précédent
|
|
20
|
-
nextMonth: 'Mois suivant
|
|
21
|
-
previousYear: 'Année précédente
|
|
22
|
-
nextYear: 'Année prochaine
|
|
19
|
+
previousMonth: 'Mois précédent',
|
|
20
|
+
nextMonth: 'Mois suivant',
|
|
21
|
+
previousYear: 'Année précédente',
|
|
22
|
+
nextYear: 'Année prochaine',
|
|
23
23
|
previousDecade: 'Décennie précédente',
|
|
24
24
|
nextDecade: 'Décennie suivante',
|
|
25
25
|
previousCentury: 'Siècle précédent',
|
package/es/locale/pl_PL.js
CHANGED
|
@@ -16,10 +16,10 @@ export default {
|
|
|
16
16
|
dayFormat: 'D',
|
|
17
17
|
dateTimeFormat: 'D/M/YYYY HH:mm:ss',
|
|
18
18
|
monthBeforeYear: true,
|
|
19
|
-
previousMonth: 'Poprzedni miesiąc
|
|
20
|
-
nextMonth: 'Następny miesiąc
|
|
21
|
-
previousYear: 'Ostatni rok
|
|
22
|
-
nextYear: 'Następny rok
|
|
19
|
+
previousMonth: 'Poprzedni miesiąc',
|
|
20
|
+
nextMonth: 'Następny miesiąc',
|
|
21
|
+
previousYear: 'Ostatni rok',
|
|
22
|
+
nextYear: 'Następny rok',
|
|
23
23
|
previousDecade: 'Ostatnia dekada',
|
|
24
24
|
nextDecade: 'Następna dekada',
|
|
25
25
|
previousCentury: 'Ostatni wiek',
|
package/es/locale/ru_RU.js
CHANGED
|
@@ -16,10 +16,10 @@ export default {
|
|
|
16
16
|
dayFormat: 'D',
|
|
17
17
|
dateTimeFormat: 'D-M-YYYY HH:mm:ss',
|
|
18
18
|
monthBeforeYear: true,
|
|
19
|
-
previousMonth: 'Предыдущий месяц
|
|
20
|
-
nextMonth: 'Следующий месяц
|
|
21
|
-
previousYear: 'Предыдущий год
|
|
22
|
-
nextYear: 'Следующий год
|
|
19
|
+
previousMonth: 'Предыдущий месяц',
|
|
20
|
+
nextMonth: 'Следующий месяц',
|
|
21
|
+
previousYear: 'Предыдущий год',
|
|
22
|
+
nextYear: 'Следующий год',
|
|
23
23
|
previousDecade: 'Предыдущее десятилетие',
|
|
24
24
|
nextDecade: 'Следущее десятилетие',
|
|
25
25
|
previousCentury: 'Предыдущий век',
|
package/es/locale/zh_CN.js
CHANGED
|
@@ -9,8 +9,8 @@ export default {
|
|
|
9
9
|
clear: '清除',
|
|
10
10
|
month: '月',
|
|
11
11
|
year: '年',
|
|
12
|
-
previousMonth: '上个月
|
|
13
|
-
nextMonth: '下个月
|
|
12
|
+
previousMonth: '上个月',
|
|
13
|
+
nextMonth: '下个月',
|
|
14
14
|
monthSelect: '选择月份',
|
|
15
15
|
yearSelect: '选择年份',
|
|
16
16
|
decadeSelect: '选择年代',
|
|
@@ -18,8 +18,8 @@ export default {
|
|
|
18
18
|
dayFormat: 'D日',
|
|
19
19
|
dateFormat: 'YYYY年M月D日',
|
|
20
20
|
dateTimeFormat: 'YYYY年M月D日 HH时mm分ss秒',
|
|
21
|
-
previousYear: '上一年
|
|
22
|
-
nextYear: '下一年
|
|
21
|
+
previousYear: '上一年',
|
|
22
|
+
nextYear: '下一年',
|
|
23
23
|
previousDecade: '上一年代',
|
|
24
24
|
nextDecade: '下一年代',
|
|
25
25
|
previousCentury: '上一世纪',
|
package/es/locale/zh_TW.js
CHANGED
|
@@ -8,8 +8,8 @@ export default {
|
|
|
8
8
|
clear: '清除',
|
|
9
9
|
month: '月',
|
|
10
10
|
year: '年',
|
|
11
|
-
previousMonth: '上個月
|
|
12
|
-
nextMonth: '下個月
|
|
11
|
+
previousMonth: '上個月',
|
|
12
|
+
nextMonth: '下個月',
|
|
13
13
|
monthSelect: '選擇月份',
|
|
14
14
|
yearSelect: '選擇年份',
|
|
15
15
|
decadeSelect: '選擇年代',
|
|
@@ -17,8 +17,8 @@ export default {
|
|
|
17
17
|
dayFormat: 'D日',
|
|
18
18
|
dateFormat: 'YYYY年M月D日',
|
|
19
19
|
dateTimeFormat: 'YYYY年M月D日 HH時mm分ss秒',
|
|
20
|
-
previousYear: '上一年
|
|
21
|
-
nextYear: '下一年
|
|
20
|
+
previousYear: '上一年',
|
|
21
|
+
nextYear: '下一年',
|
|
22
22
|
previousDecade: '上一年代',
|
|
23
23
|
nextDecade: '下一年代',
|
|
24
24
|
previousCentury: '上一世紀',
|
package/lib/Calendar.js
CHANGED
package/lib/locale/cs_CZ.js
CHANGED
|
@@ -19,10 +19,10 @@ exports['default'] = {
|
|
|
19
19
|
dayFormat: 'D',
|
|
20
20
|
dateTimeFormat: 'D.M.YYYY HH:mm:ss',
|
|
21
21
|
monthBeforeYear: true,
|
|
22
|
-
previousMonth: 'Předchozí měsíc
|
|
23
|
-
nextMonth: 'Následující
|
|
24
|
-
previousYear: 'Předchozí rok
|
|
25
|
-
nextYear: 'Následující rok
|
|
22
|
+
previousMonth: 'Předchozí měsíc',
|
|
23
|
+
nextMonth: 'Následující',
|
|
24
|
+
previousYear: 'Předchozí rok',
|
|
25
|
+
nextYear: 'Následující rok',
|
|
26
26
|
previousDecade: 'Předchozí dekáda',
|
|
27
27
|
nextDecade: 'Následující dekáda',
|
|
28
28
|
previousCentury: 'Předchozí století',
|
package/lib/locale/de_DE.js
CHANGED
|
@@ -19,10 +19,10 @@ exports['default'] = {
|
|
|
19
19
|
dayFormat: 'D',
|
|
20
20
|
dateTimeFormat: 'D.M.YYYY HH:mm:ss',
|
|
21
21
|
monthBeforeYear: true,
|
|
22
|
-
previousMonth: 'Vorheriger Monat
|
|
23
|
-
nextMonth: 'Nächster Monat
|
|
24
|
-
previousYear: 'Vorheriges Jahr
|
|
25
|
-
nextYear: 'Nächstes Jahr
|
|
22
|
+
previousMonth: 'Vorheriger Monat',
|
|
23
|
+
nextMonth: 'Nächster Monat',
|
|
24
|
+
previousYear: 'Vorheriges Jahr',
|
|
25
|
+
nextYear: 'Nächstes Jahr',
|
|
26
26
|
previousDecade: 'Vorheriges Jahrzehnt',
|
|
27
27
|
nextDecade: 'Nächstes Jahrzehnt',
|
|
28
28
|
previousCentury: 'Vorheriges Jahrhundert',
|
package/lib/locale/en_US.js
CHANGED
|
@@ -20,10 +20,10 @@ exports['default'] = {
|
|
|
20
20
|
dayFormat: 'D',
|
|
21
21
|
dateTimeFormat: 'M/D/YYYY HH:mm:ss',
|
|
22
22
|
monthBeforeYear: true,
|
|
23
|
-
previousMonth: 'Previous month
|
|
24
|
-
nextMonth: 'Next month
|
|
25
|
-
previousYear: 'Last year
|
|
26
|
-
nextYear: 'Next year
|
|
23
|
+
previousMonth: 'Previous month',
|
|
24
|
+
nextMonth: 'Next month',
|
|
25
|
+
previousYear: 'Last year',
|
|
26
|
+
nextYear: 'Next year',
|
|
27
27
|
previousDecade: 'Last decade',
|
|
28
28
|
nextDecade: 'Next decade',
|
|
29
29
|
previousCentury: 'Last century',
|
package/lib/locale/es_ES.js
CHANGED
|
@@ -19,10 +19,10 @@ exports['default'] = {
|
|
|
19
19
|
dayFormat: 'D',
|
|
20
20
|
dateTimeFormat: 'D/M/YYYY HH:mm:ss',
|
|
21
21
|
monthBeforeYear: true,
|
|
22
|
-
previousMonth: 'Mes anterior
|
|
23
|
-
nextMonth: 'Mes siguiente
|
|
24
|
-
previousYear: 'Año anterior
|
|
25
|
-
nextYear: 'Año siguiente
|
|
22
|
+
previousMonth: 'Mes anterior',
|
|
23
|
+
nextMonth: 'Mes siguiente',
|
|
24
|
+
previousYear: 'Año anterior',
|
|
25
|
+
nextYear: 'Año siguiente',
|
|
26
26
|
previousDecade: 'Década anterior',
|
|
27
27
|
nextDecade: 'Década siguiente',
|
|
28
28
|
previousCentury: 'Siglo anterior',
|
package/lib/locale/fr_FR.js
CHANGED
|
@@ -19,10 +19,10 @@ exports['default'] = {
|
|
|
19
19
|
dayFormat: 'DD',
|
|
20
20
|
dateTimeFormat: 'DD/MM/YYYY HH:mm:ss',
|
|
21
21
|
monthBeforeYear: true,
|
|
22
|
-
previousMonth: 'Mois précédent
|
|
23
|
-
nextMonth: 'Mois suivant
|
|
24
|
-
previousYear: 'Année précédente
|
|
25
|
-
nextYear: 'Année prochaine
|
|
22
|
+
previousMonth: 'Mois précédent',
|
|
23
|
+
nextMonth: 'Mois suivant',
|
|
24
|
+
previousYear: 'Année précédente',
|
|
25
|
+
nextYear: 'Année prochaine',
|
|
26
26
|
previousDecade: 'Décennie précédente',
|
|
27
27
|
nextDecade: 'Décennie suivante',
|
|
28
28
|
previousCentury: 'Siècle précédent',
|
package/lib/locale/pl_PL.js
CHANGED
|
@@ -19,10 +19,10 @@ exports['default'] = {
|
|
|
19
19
|
dayFormat: 'D',
|
|
20
20
|
dateTimeFormat: 'D/M/YYYY HH:mm:ss',
|
|
21
21
|
monthBeforeYear: true,
|
|
22
|
-
previousMonth: 'Poprzedni miesiąc
|
|
23
|
-
nextMonth: 'Następny miesiąc
|
|
24
|
-
previousYear: 'Ostatni rok
|
|
25
|
-
nextYear: 'Następny rok
|
|
22
|
+
previousMonth: 'Poprzedni miesiąc',
|
|
23
|
+
nextMonth: 'Następny miesiąc',
|
|
24
|
+
previousYear: 'Ostatni rok',
|
|
25
|
+
nextYear: 'Następny rok',
|
|
26
26
|
previousDecade: 'Ostatnia dekada',
|
|
27
27
|
nextDecade: 'Następna dekada',
|
|
28
28
|
previousCentury: 'Ostatni wiek',
|
package/lib/locale/ru_RU.js
CHANGED
|
@@ -19,10 +19,10 @@ exports['default'] = {
|
|
|
19
19
|
dayFormat: 'D',
|
|
20
20
|
dateTimeFormat: 'D-M-YYYY HH:mm:ss',
|
|
21
21
|
monthBeforeYear: true,
|
|
22
|
-
previousMonth: 'Предыдущий месяц
|
|
23
|
-
nextMonth: 'Следующий месяц
|
|
24
|
-
previousYear: 'Предыдущий год
|
|
25
|
-
nextYear: 'Следующий год
|
|
22
|
+
previousMonth: 'Предыдущий месяц',
|
|
23
|
+
nextMonth: 'Следующий месяц',
|
|
24
|
+
previousYear: 'Предыдущий год',
|
|
25
|
+
nextYear: 'Следующий год',
|
|
26
26
|
previousDecade: 'Предыдущее десятилетие',
|
|
27
27
|
nextDecade: 'Следущее десятилетие',
|
|
28
28
|
previousCentury: 'Предыдущий век',
|
package/lib/locale/zh_CN.js
CHANGED
|
@@ -12,8 +12,8 @@ exports['default'] = {
|
|
|
12
12
|
clear: '清除',
|
|
13
13
|
month: '月',
|
|
14
14
|
year: '年',
|
|
15
|
-
previousMonth: '上个月
|
|
16
|
-
nextMonth: '下个月
|
|
15
|
+
previousMonth: '上个月',
|
|
16
|
+
nextMonth: '下个月',
|
|
17
17
|
monthSelect: '选择月份',
|
|
18
18
|
yearSelect: '选择年份',
|
|
19
19
|
decadeSelect: '选择年代',
|
|
@@ -21,8 +21,8 @@ exports['default'] = {
|
|
|
21
21
|
dayFormat: 'D日',
|
|
22
22
|
dateFormat: 'YYYY年M月D日',
|
|
23
23
|
dateTimeFormat: 'YYYY年M月D日 HH时mm分ss秒',
|
|
24
|
-
previousYear: '上一年
|
|
25
|
-
nextYear: '下一年
|
|
24
|
+
previousYear: '上一年',
|
|
25
|
+
nextYear: '下一年',
|
|
26
26
|
previousDecade: '上一年代',
|
|
27
27
|
nextDecade: '下一年代',
|
|
28
28
|
previousCentury: '上一世纪',
|
package/lib/locale/zh_TW.js
CHANGED
|
@@ -11,8 +11,8 @@ exports['default'] = {
|
|
|
11
11
|
clear: '清除',
|
|
12
12
|
month: '月',
|
|
13
13
|
year: '年',
|
|
14
|
-
previousMonth: '上個月
|
|
15
|
-
nextMonth: '下個月
|
|
14
|
+
previousMonth: '上個月',
|
|
15
|
+
nextMonth: '下個月',
|
|
16
16
|
monthSelect: '選擇月份',
|
|
17
17
|
yearSelect: '選擇年份',
|
|
18
18
|
decadeSelect: '選擇年代',
|
|
@@ -20,8 +20,8 @@ exports['default'] = {
|
|
|
20
20
|
dayFormat: 'D日',
|
|
21
21
|
dateFormat: 'YYYY年M月D日',
|
|
22
22
|
dateTimeFormat: 'YYYY年M月D日 HH時mm分ss秒',
|
|
23
|
-
previousYear: '上一年
|
|
24
|
-
nextYear: '下一年
|
|
23
|
+
previousYear: '上一年',
|
|
24
|
+
nextYear: '下一年',
|
|
25
25
|
previousDecade: '上一年代',
|
|
26
26
|
nextDecade: '下一年代',
|
|
27
27
|
previousCentury: '上一世紀',
|
package/package.json
CHANGED
package/es/util/platform.js
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import _extends from 'babel-runtime/helpers/extends';
|
|
2
|
-
// calendar/src/util/platform.js
|
|
3
|
-
export var isMac = function isMac() {
|
|
4
|
-
return typeof navigator !== 'undefined' && navigator.platform.toUpperCase().indexOf('MAC') >= 0;
|
|
5
|
-
};
|
|
6
|
-
|
|
7
|
-
export var getModifierSymbol = function getModifierSymbol() {
|
|
8
|
-
return isMac() ? '⌘' : 'Ctrl';
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
// Enhance locale strings with platform-specific modifier keys
|
|
12
|
-
export var enhanceLocaleWithPlatformKeys = function enhanceLocaleWithPlatformKeys(locale) {
|
|
13
|
-
if (!locale) return locale;
|
|
14
|
-
|
|
15
|
-
var isMacOS = isMac();
|
|
16
|
-
|
|
17
|
-
// Don't modify if already correct platform or no modification needed
|
|
18
|
-
if (!isMacOS) return locale;
|
|
19
|
-
|
|
20
|
-
var enhanced = _extends({}, locale);
|
|
21
|
-
|
|
22
|
-
// Replace in relevant fields for Mac users
|
|
23
|
-
['previousYear', 'nextYear', 'previousMonth', 'nextMonth'].forEach(function (key) {
|
|
24
|
-
if (enhanced[key] && typeof enhanced[key] === 'string') {
|
|
25
|
-
// Replace Chinese/Traditional Chinese pattern: Control键 -> Command键
|
|
26
|
-
enhanced[key] = enhanced[key].replace(/Control键/g, 'Command键');
|
|
27
|
-
|
|
28
|
-
// Replace patterns with space: "Control + " or "Ctrl + " -> "⌘ + "
|
|
29
|
-
enhanced[key] = enhanced[key].replace(/Control \+/g, '⌘ +');
|
|
30
|
-
enhanced[key] = enhanced[key].replace(/Ctrl \+/g, '⌘ +');
|
|
31
|
-
|
|
32
|
-
// Replace standalone Control/Ctrl without space (fallback)
|
|
33
|
-
enhanced[key] = enhanced[key].replace(/\bControl\b/g, 'Command');
|
|
34
|
-
enhanced[key] = enhanced[key].replace(/\bCtrl\b/g, '⌘');
|
|
35
|
-
}
|
|
36
|
-
});
|
|
37
|
-
|
|
38
|
-
return enhanced;
|
|
39
|
-
};
|
package/lib/util/platform.js
DELETED
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
exports.__esModule = true;
|
|
4
|
-
exports.enhanceLocaleWithPlatformKeys = exports.getModifierSymbol = exports.isMac = undefined;
|
|
5
|
-
|
|
6
|
-
var _extends2 = require('babel-runtime/helpers/extends');
|
|
7
|
-
|
|
8
|
-
var _extends3 = _interopRequireDefault(_extends2);
|
|
9
|
-
|
|
10
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
|
|
11
|
-
|
|
12
|
-
// calendar/src/util/platform.js
|
|
13
|
-
var isMac = exports.isMac = function isMac() {
|
|
14
|
-
return typeof navigator !== 'undefined' && navigator.platform.toUpperCase().indexOf('MAC') >= 0;
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
var getModifierSymbol = exports.getModifierSymbol = function getModifierSymbol() {
|
|
18
|
-
return isMac() ? '⌘' : 'Ctrl';
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
// Enhance locale strings with platform-specific modifier keys
|
|
22
|
-
var enhanceLocaleWithPlatformKeys = exports.enhanceLocaleWithPlatformKeys = function enhanceLocaleWithPlatformKeys(locale) {
|
|
23
|
-
if (!locale) return locale;
|
|
24
|
-
|
|
25
|
-
var isMacOS = isMac();
|
|
26
|
-
|
|
27
|
-
// Don't modify if already correct platform or no modification needed
|
|
28
|
-
if (!isMacOS) return locale;
|
|
29
|
-
|
|
30
|
-
var enhanced = (0, _extends3['default'])({}, locale);
|
|
31
|
-
|
|
32
|
-
// Replace in relevant fields for Mac users
|
|
33
|
-
['previousYear', 'nextYear', 'previousMonth', 'nextMonth'].forEach(function (key) {
|
|
34
|
-
if (enhanced[key] && typeof enhanced[key] === 'string') {
|
|
35
|
-
// Replace Chinese/Traditional Chinese pattern: Control键 -> Command键
|
|
36
|
-
enhanced[key] = enhanced[key].replace(/Control键/g, 'Command键');
|
|
37
|
-
|
|
38
|
-
// Replace patterns with space: "Control + " or "Ctrl + " -> "⌘ + "
|
|
39
|
-
enhanced[key] = enhanced[key].replace(/Control \+/g, '⌘ +');
|
|
40
|
-
enhanced[key] = enhanced[key].replace(/Ctrl \+/g, '⌘ +');
|
|
41
|
-
|
|
42
|
-
// Replace standalone Control/Ctrl without space (fallback)
|
|
43
|
-
enhanced[key] = enhanced[key].replace(/\bControl\b/g, 'Command');
|
|
44
|
-
enhanced[key] = enhanced[key].replace(/\bCtrl\b/g, '⌘');
|
|
45
|
-
}
|
|
46
|
-
});
|
|
47
|
-
|
|
48
|
-
return enhanced;
|
|
49
|
-
};
|