From bc2e2cb142befa1e9e0e2d07898eda79c5837887 Mon Sep 17 00:00:00 2001 From: neverland Date: Wed, 26 Jan 2022 10:49:41 +0800 Subject: [PATCH] perf(Locale): remove startEnd (#10244) --- packages/vant/src/calendar/CalendarMonth.tsx | 2 +- packages/vant/src/locale/lang/de-DE-formal.ts | 1 - packages/vant/src/locale/lang/de-DE.ts | 1 - packages/vant/src/locale/lang/en-US.ts | 1 - packages/vant/src/locale/lang/es-ES.ts | 1 - packages/vant/src/locale/lang/fr-FR.ts | 1 - packages/vant/src/locale/lang/ja-JP.ts | 1 - packages/vant/src/locale/lang/ko-KR.ts | 1 - packages/vant/src/locale/lang/nb-NO.ts | 1 - packages/vant/src/locale/lang/pt-BR.ts | 1 - packages/vant/src/locale/lang/ro-RO.ts | 1 - packages/vant/src/locale/lang/ru-RU.ts | 1 - packages/vant/src/locale/lang/th-TH.ts | 1 - packages/vant/src/locale/lang/tr-TR.ts | 1 - packages/vant/src/locale/lang/zh-CN.ts | 1 - packages/vant/src/locale/lang/zh-HK.ts | 1 - packages/vant/src/locale/lang/zh-TW.ts | 1 - 17 files changed, 1 insertion(+), 17 deletions(-) diff --git a/packages/vant/src/calendar/CalendarMonth.tsx b/packages/vant/src/calendar/CalendarMonth.tsx index adef5d58b..b7f1e19a3 100644 --- a/packages/vant/src/calendar/CalendarMonth.tsx +++ b/packages/vant/src/calendar/CalendarMonth.tsx @@ -178,7 +178,7 @@ export default defineComponent({ return t(dayType); } if (dayType === 'start-end') { - return t('startEnd'); + return `${t('start')}/${t('end')}`; } } }; diff --git a/packages/vant/src/locale/lang/de-DE-formal.ts b/packages/vant/src/locale/lang/de-DE-formal.ts index ed6dc8494..f55c57a63 100644 --- a/packages/vant/src/locale/lang/de-DE-formal.ts +++ b/packages/vant/src/locale/lang/de-DE-formal.ts @@ -13,7 +13,6 @@ export default { end: 'Ende', start: 'Start', title: 'Kalender', - startEnd: 'Start/Ende', weekdays: ['So', 'Mo', 'Di', 'Mo', 'Do', 'Fr', 'Sa'], monthTitle: (year: number, month: number) => `${year}/${month}`, rangePrompt: (maxRange: number) => `Wähle nicht mehr als ${maxRange} Tage`, diff --git a/packages/vant/src/locale/lang/de-DE.ts b/packages/vant/src/locale/lang/de-DE.ts index 7047498fc..135554c82 100644 --- a/packages/vant/src/locale/lang/de-DE.ts +++ b/packages/vant/src/locale/lang/de-DE.ts @@ -13,7 +13,6 @@ export default { end: 'Ende', start: 'Start', title: 'Kalender', - startEnd: 'Start/Ende', weekdays: ['So', 'Mo', 'Di', 'Mo', 'Do', 'Fr', 'Sa'], monthTitle: (year: number, month: number) => `${year}/${month}`, rangePrompt: (maxRange: number) => `Wähle nicht mehr als ${maxRange} Tage`, diff --git a/packages/vant/src/locale/lang/en-US.ts b/packages/vant/src/locale/lang/en-US.ts index 03b856fbd..cf91d99af 100644 --- a/packages/vant/src/locale/lang/en-US.ts +++ b/packages/vant/src/locale/lang/en-US.ts @@ -13,7 +13,6 @@ export default { end: 'End', start: 'Start', title: 'Calendar', - startEnd: 'Start/End', weekdays: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'], monthTitle: (year: number, month: number) => `${year}/${month}`, rangePrompt: (maxRange: number) => `Choose no more than ${maxRange} days`, diff --git a/packages/vant/src/locale/lang/es-ES.ts b/packages/vant/src/locale/lang/es-ES.ts index 4e87cec1e..65abe9121 100644 --- a/packages/vant/src/locale/lang/es-ES.ts +++ b/packages/vant/src/locale/lang/es-ES.ts @@ -13,7 +13,6 @@ export default { end: 'Fin', start: 'Inicio', title: 'Calendario', - startEnd: 'Inicio/Fin', weekdays: ['Dom', 'Lun', 'Mar', 'Mié', 'Jue', 'Vie', 'Sáb'], monthTitle: (year: number, month: number) => `${year}/${month}`, rangePrompt: (maxRange: number) => `Elija no más de ${maxRange} días`, diff --git a/packages/vant/src/locale/lang/fr-FR.ts b/packages/vant/src/locale/lang/fr-FR.ts index b84aac8a6..9ef526951 100644 --- a/packages/vant/src/locale/lang/fr-FR.ts +++ b/packages/vant/src/locale/lang/fr-FR.ts @@ -13,7 +13,6 @@ export default { end: 'Fin', start: 'Début', title: 'Calendrier', - startEnd: 'Début/Fin', weekdays: ['Dim', 'Lun', 'Mar', 'Mer', 'Jeu', 'Ven', 'Sam'], monthTitle: (year: number, month: number) => `${year}/${month}`, rangePrompt: (maxRange: number) => `Choisir pas plus de ${maxRange} jours`, diff --git a/packages/vant/src/locale/lang/ja-JP.ts b/packages/vant/src/locale/lang/ja-JP.ts index f8e84daa8..b13c8f7c3 100644 --- a/packages/vant/src/locale/lang/ja-JP.ts +++ b/packages/vant/src/locale/lang/ja-JP.ts @@ -14,7 +14,6 @@ export default { start: '開始', title: '日付選択', confirm: '確認', - startEnd: '開始/終了', weekdays: ['日', '月', '火', '水', '木', '金', '土'], monthTitle: (year: number, month: number) => `${year}年${month}月`, rangePrompt: (maxRange: number) => `${maxRange}日まで選択`, diff --git a/packages/vant/src/locale/lang/ko-KR.ts b/packages/vant/src/locale/lang/ko-KR.ts index 4e2c125ab..b6b2ba793 100644 --- a/packages/vant/src/locale/lang/ko-KR.ts +++ b/packages/vant/src/locale/lang/ko-KR.ts @@ -13,7 +13,6 @@ export default { end: '끝', start: '시작', title: '달력', - startEnd: '시작/끝', weekdays: [ '일요일', '월요일', diff --git a/packages/vant/src/locale/lang/nb-NO.ts b/packages/vant/src/locale/lang/nb-NO.ts index e50bb1a98..4c6e4259b 100644 --- a/packages/vant/src/locale/lang/nb-NO.ts +++ b/packages/vant/src/locale/lang/nb-NO.ts @@ -13,7 +13,6 @@ export default { end: 'Slutt', start: 'Start', title: 'Kalendar', - startEnd: 'Start/Slutt', weekdays: ['Søn', 'Man', 'Tir', 'Ons', 'Tor', 'Fre', 'Lør'], monthTitle: (year: number, month: number) => `${year}/${month}`, rangePrompt: (maxRange: number) => `Maks. ${maxRange} dager`, diff --git a/packages/vant/src/locale/lang/pt-BR.ts b/packages/vant/src/locale/lang/pt-BR.ts index fb598b882..04d50f95d 100644 --- a/packages/vant/src/locale/lang/pt-BR.ts +++ b/packages/vant/src/locale/lang/pt-BR.ts @@ -13,7 +13,6 @@ export default { end: 'Fim', start: 'Início', title: 'Calendário', - startEnd: 'Início/Fim', weekdays: ['Dom', 'Seg', 'Ter', 'Qua', 'Qui', 'Sex', 'Sáb'], monthTitle: (year: number, month: number) => `${month}/${year}`, rangePrompt: (maxRange: number) => `Escolha no máximo ${maxRange} dias`, diff --git a/packages/vant/src/locale/lang/ro-RO.ts b/packages/vant/src/locale/lang/ro-RO.ts index 9372027df..5b52b02e6 100644 --- a/packages/vant/src/locale/lang/ro-RO.ts +++ b/packages/vant/src/locale/lang/ro-RO.ts @@ -13,7 +13,6 @@ export default { end: 'Sfârșit', start: 'Început', title: 'Calendar', - startEnd: 'Început/Sfârsit', weekdays: ['Dum', 'Lun', 'Mar', 'Mie', 'Joi', 'Vin', 'Sâm'], monthTitle: (year: number, month: number) => `${year}/${month}`, rangePrompt: (maxRange: number) => `Alege maxim ${maxRange} zile`, diff --git a/packages/vant/src/locale/lang/ru-RU.ts b/packages/vant/src/locale/lang/ru-RU.ts index 940f23e3f..01f7f1884 100644 --- a/packages/vant/src/locale/lang/ru-RU.ts +++ b/packages/vant/src/locale/lang/ru-RU.ts @@ -13,7 +13,6 @@ export default { end: 'Конец', start: 'Начало', title: 'Каленарь', - startEnd: 'Начало/Конец', weekdays: ['ВС', 'ПН', 'ВТ', 'СР', 'ЧТ', 'ПТ', 'СБ'], monthTitle: (year: number, month: number) => `${year}/${month}`, rangePrompt: (maxRange: number) => `Укажите более ${maxRange} дней`, diff --git a/packages/vant/src/locale/lang/th-TH.ts b/packages/vant/src/locale/lang/th-TH.ts index 59ebbceb3..2a1ca2e95 100644 --- a/packages/vant/src/locale/lang/th-TH.ts +++ b/packages/vant/src/locale/lang/th-TH.ts @@ -14,7 +14,6 @@ export default { start: 'เริ่ม', title: 'การเลือกวันที่', confirm: 'ตกลง', - startEnd: 'เริ่ม/เริ่ม', weekdays: ['อา', 'จ', 'อ', 'พ', 'พฤ', 'ศ', 'ส'], monthTitle: (year: number, month: number) => `${year}ปี${month}เดือน`, rangePrompt: (maxRange: number) => diff --git a/packages/vant/src/locale/lang/tr-TR.ts b/packages/vant/src/locale/lang/tr-TR.ts index 2961fab6f..30a09a1ac 100644 --- a/packages/vant/src/locale/lang/tr-TR.ts +++ b/packages/vant/src/locale/lang/tr-TR.ts @@ -13,7 +13,6 @@ export default { end: 'Son', start: 'Başlat', title: 'Takvim', - startEnd: 'Başlat/Son', weekdays: ['Paz', 'Pzt', 'Sal', 'Çar', 'Per', 'Cum', 'Cmt'], monthTitle: (year: number, month: number) => `${year}/${month}`, rangePrompt: (maxRange: number) => `En fazla ${maxRange} gün seçin`, diff --git a/packages/vant/src/locale/lang/zh-CN.ts b/packages/vant/src/locale/lang/zh-CN.ts index fcccbf1ec..32789e3b7 100644 --- a/packages/vant/src/locale/lang/zh-CN.ts +++ b/packages/vant/src/locale/lang/zh-CN.ts @@ -14,7 +14,6 @@ export default { start: '开始', title: '日期选择', confirm: '确定', - startEnd: '开始/结束', weekdays: ['日', '一', '二', '三', '四', '五', '六'], monthTitle: (year: number, month: number) => `${year}年${month}月`, rangePrompt: (maxRange: number) => `最多选择 ${maxRange} 天`, diff --git a/packages/vant/src/locale/lang/zh-HK.ts b/packages/vant/src/locale/lang/zh-HK.ts index 7b3719f23..610fe1c33 100644 --- a/packages/vant/src/locale/lang/zh-HK.ts +++ b/packages/vant/src/locale/lang/zh-HK.ts @@ -14,7 +14,6 @@ export default { start: '開始', title: '日期選擇', confirm: '確定', - startEnd: '開始/結束', weekdays: ['日', '一', '二', '三', '四', '五', '六'], monthTitle: (year: number, month: number) => `${year}年${month}月`, rangePrompt: (maxRange: number) => `最多選擇 ${maxRange} 天`, diff --git a/packages/vant/src/locale/lang/zh-TW.ts b/packages/vant/src/locale/lang/zh-TW.ts index 4eb814f51..714f55ede 100644 --- a/packages/vant/src/locale/lang/zh-TW.ts +++ b/packages/vant/src/locale/lang/zh-TW.ts @@ -14,7 +14,6 @@ export default { start: '開始', title: '日期選擇', confirm: '確定', - startEnd: '開始/結束', weekdays: ['日', '一', '二', '三', '四', '五', '六'], monthTitle: (year: number, month: number) => `${year}年${month}月`, rangePrompt: (maxRange: number) => `最多選擇 ${maxRange} 天`,