perf(Locale): simplify locale configs (#9329)

This commit is contained in:
neverland 2021-08-25 11:25:20 +08:00 committed by GitHub
parent 65067262e0
commit ce015ea1f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
18 changed files with 19 additions and 75 deletions

View File

@ -331,7 +331,7 @@ export default defineComponent({
v-model={data.name}
clearable
label={t('name')}
placeholder={t('namePlaceholder')}
placeholder={t('name')}
errorMessage={errorInfo.name}
onFocus={() => onFocus('name')}
/>
@ -341,7 +341,7 @@ export default defineComponent({
type="tel"
label={t('tel')}
maxlength={props.telMaxlength}
placeholder={t('telPlaceholder')}
placeholder={t('tel')}
errorMessage={errorInfo.tel}
onFocus={() => onFocus('tel')}
/>
@ -351,7 +351,7 @@ export default defineComponent({
label={t('area')}
is-link={!disableArea}
modelValue={areaText.value}
placeholder={props.areaPlaceholder || t('areaPlaceholder')}
placeholder={props.areaPlaceholder || t('area')}
errorMessage={errorInfo.areaCode}
onFocus={() => onFocus('areaCode')}
onClick={() => {

View File

@ -293,7 +293,7 @@ export default {
| 参数 | 说明 | 类型 | 默认值 |
| --- | --- | --- | --- |
| max-range | 日期区间最多可选天数 | _number \| string_ | 无限制 |
| range-prompt | 范围选择超过最多可选天数时的提示文案 | _string_ | `选择天数不能超过 xx 天` |
| range-prompt | 范围选择超过最多可选天数时的提示文案 | _string_ | `最多选择 xx 天` |
| show-range-prompt | 范围选择超过最多可选天数时,是否展示提示文案 | _boolean_ | `true` |
| allow-same-day | 是否允许日期范围的起止时间为同一天 | _boolean_ | `false` |
@ -304,7 +304,7 @@ export default {
| 参数 | 说明 | 类型 | 默认值 |
| --- | --- | --- | --- |
| max-range | 日期最多可选天数 | _number \| string_ | 无限制 |
| range-prompt | 选择超过最多可选天数时的提示文案 | _string_ | `选择天数不能超过 xx 天` |
| range-prompt | 选择超过最多可选天数时的提示文案 | _string_ | `最多选择 xx 天` |
### Day 数据结构

View File

@ -117,7 +117,7 @@ export default defineComponent({
v-model={contact.name}
clearable
label={t('name')}
rules={[{ required: true, message: t('nameInvalid') }]}
rules={[{ required: true, message: t('nameEmpty') }]}
maxlength="30"
placeholder={t('nameEmpty')}
/>

View File

@ -2,7 +2,7 @@
exports[`should validate contact name before submitting form 1`] = `
<div class="van-field__error-message">
Malformed name
Please fill in the name
</div>
`;

View File

@ -9,7 +9,6 @@ export default {
loading: 'Laden...',
telEmpty: 'Bitte füllen Sie das Telefon aus',
nameEmpty: 'Bitte geben Sie den Name an',
nameInvalid: 'Ungültiger Name',
confirmDelete: 'Sind Sie sicher, dass Sie löschen möchten?',
telInvalid: 'Ungültige Telefonnummer',
vanCalendar: {
@ -66,9 +65,6 @@ export default {
addressEmpty: 'Adresse darf nicht leer sein',
postalEmpty: 'Falsche Postleitzahl',
defaultAddress: 'Als Standardadresse festgelegen',
telPlaceholder: 'Telefon',
namePlaceholder: 'Name',
areaPlaceholder: 'Ort',
},
vanAddressEditDetail: {
label: 'Adresse',

View File

@ -9,7 +9,6 @@ export default {
loading: 'Laden...',
telEmpty: 'Bitte das Telefon ausfüllen',
nameEmpty: 'Bitte den Name angeben',
nameInvalid: 'Ungültiger Name',
confirmDelete: 'Bist du sicher, dass du löschen möchtest?',
telInvalid: 'Ungültige Telefonnummer',
vanCalendar: {
@ -66,9 +65,6 @@ export default {
addressEmpty: 'Adresse darf nicht leer sein',
postalEmpty: 'Falsche Postleitzahl',
defaultAddress: 'Als Standardadresse festgelegen',
telPlaceholder: 'Telefon',
namePlaceholder: 'Name',
areaPlaceholder: 'Ort',
},
vanAddressEditDetail: {
label: 'Adresse',

View File

@ -9,7 +9,6 @@ export default {
loading: 'Loading...',
telEmpty: 'Please fill in the tel',
nameEmpty: 'Please fill in the name',
nameInvalid: 'Malformed name',
confirmDelete: 'Are you sure you want to delete?',
telInvalid: 'Malformed phone number',
vanCalendar: {
@ -66,9 +65,6 @@ export default {
addressEmpty: 'Address can not be empty',
postalEmpty: 'Wrong postal code',
defaultAddress: 'Set as the default address',
telPlaceholder: 'Phone',
namePlaceholder: 'Name',
areaPlaceholder: 'Area',
},
vanAddressEditDetail: {
label: 'Address',

View File

@ -9,7 +9,6 @@ export default {
loading: 'Cargando...',
telEmpty: 'Por favor rellena el teléfono',
nameEmpty: 'Por favor rellena el nombre',
nameInvalid: 'nombre inválido',
confirmDelete: 'Estás seguro de eliminarlo?',
telInvalid: 'Teléfono inválido',
vanCalendar: {
@ -66,9 +65,6 @@ export default {
addressEmpty: 'La dirección no puede estar vacia',
postalEmpty: 'Código postal inválido',
defaultAddress: 'Establecer como dirección por defecto',
telPlaceholder: 'Teléfono',
namePlaceholder: 'Nombre',
areaPlaceholder: 'Área',
},
vanAddressEditDetail: {
label: 'Dirección',

View File

@ -9,7 +9,6 @@ export default {
loading: 'Chargement...',
telEmpty: 'Veuillez remplir le tel',
nameEmpty: 'Veuillez remplir le nom',
nameInvalid: 'Nom incorrect',
confirmDelete: 'Êtes-vous sûr de vouloir supprimer?',
telInvalid: 'Numéro de téléphone incorrect',
vanCalendar: {
@ -66,9 +65,6 @@ export default {
addressEmpty: "L'adresse ne peut pas être vide",
postalEmpty: 'Mauvais code postal',
defaultAddress: 'Définir comme adresse par défaut',
telPlaceholder: 'Téléphone',
namePlaceholder: 'Nom',
areaPlaceholder: 'Zone',
},
vanAddressEditDetail: {
label: 'Adresse',

View File

@ -9,7 +9,6 @@ export default {
loading: '読み込み中...',
telEmpty: '電話番号を入力してください',
nameEmpty: '名前を入力してください',
nameInvalid: '正しい名前を入力してください',
confirmDelete: '本当に削除しますか',
telInvalid: '正しい電話番号を入力してください',
vanCalendar: {
@ -20,7 +19,7 @@ export default {
startEnd: '開始/終了',
weekdays: ['日', '月', '火', '水', '木', '金', '土'],
monthTitle: (year: number, month: number) => `${year}${month}`,
rangePrompt: (maxRange: number) => `${maxRange}以内を選択してください`,
rangePrompt: (maxRange: number) => `${maxRange}まで選択`,
},
vanCascader: {
select: '選択する',
@ -65,11 +64,8 @@ export default {
postal: '郵便番号',
areaEmpty: '地域を選択してください',
addressEmpty: '詳しい住所を入力してください',
postalEmpty: '邮政编码格式不正确',
postalEmpty: '間違った郵便番号',
defaultAddress: 'デフォルトの住所に設定',
telPlaceholder: '荷受人の携帯番号',
namePlaceholder: '荷受人の名前',
areaPlaceholder: '县 / 市 / 町を選択',
},
vanAddressEditDetail: {
label: '詳しい住所',

View File

@ -9,7 +9,6 @@ export default {
loading: 'Laster...',
telEmpty: 'Vennligst fyll inn telefonnummer',
nameEmpty: 'Vennligst fyll inn navn',
nameInvalid: 'Ugyldig navn',
confirmDelete: 'Er du sikker på at du vil slette?',
telInvalid: 'Ugyldig telefonnummer',
vanCalendar: {
@ -66,9 +65,6 @@ export default {
addressEmpty: 'Addresse kan ikke være tomt',
postalEmpty: 'Feil postkode',
defaultAddress: 'Sett som standard adresse',
telPlaceholder: 'Telefon',
namePlaceholder: 'Navn',
areaPlaceholder: 'Område',
},
vanAddressEditDetail: {
label: 'Adresse',

View File

@ -9,7 +9,6 @@ export default {
loading: 'Încărcare...',
telEmpty: 'Te rugăm să completezi telefonul',
nameEmpty: 'Te rugăm să completezi numele',
nameInvalid: 'Nume incorect',
confirmDelete: 'Ești sigur ca vrei sa stergi?',
telInvalid: 'Număr de telefon invalid',
vanCalendar: {
@ -66,9 +65,6 @@ export default {
addressEmpty: 'Adresa nu poate fi goală',
postalEmpty: 'Cod postal invalid',
defaultAddress: 'Setează ca adresă de pornire',
telPlaceholder: 'Telefon',
namePlaceholder: 'Nume',
areaPlaceholder: 'Zonă',
},
vanAddressEditDetail: {
label: 'Adresă',

View File

@ -9,7 +9,6 @@ export default {
loading: 'Загрузка...',
telEmpty: 'Пожалуйста укажите телефон',
nameEmpty: 'Пожалуйста укажите имя',
nameInvalid: 'Некорректное имя',
confirmDelete: 'Вы уверены, что хотите удалить?',
telInvalid: 'Некорректный номер телефона',
vanCalendar: {
@ -66,9 +65,6 @@ export default {
addressEmpty: 'Адрес не может быть пустым',
postalEmpty: 'Некорректный индекс',
defaultAddress: 'Сделать адресом по умолчанию',
telPlaceholder: 'Телефон',
namePlaceholder: 'Имя',
areaPlaceholder: 'Область',
},
vanAddressEditDetail: {
label: 'Адрес',

View File

@ -9,7 +9,6 @@ export default {
loading: 'กำลังโหลด...',
telEmpty: 'กรุณากรอกข้อมูลในโทรศัพท์',
nameEmpty: 'กรุณากรอกชื่อของคุณ',
nameInvalid: 'กรุณากรอกชื่อที่ถูกต้อง',
confirmDelete: 'คุณแน่ใจว่าต้องการลบ',
telInvalid: 'กรุณากรอกหมายเลขโทรศัพท์ที่ถูกต้อง',
vanCalendar: {
@ -68,9 +67,6 @@ export default {
addressEmpty: 'กรุณากรอกที่อยู่โดยละเอียด',
postalEmpty: 'รูปแบบรหัสไปรษณีย์ไม่ถูกต้อง',
defaultAddress: 'ตั้งเป็นที่อยู่จัดส่งเริ่มต้น',
telPlaceholder: 'หมายเลขโทรศัพท์มือถือของผู้รับสินค้า',
namePlaceholder: 'ชื่อผู้รับ',
areaPlaceholder: 'เลือกจังหวัด / เมือง / อำเภอ',
},
vanAddressEditDetail: {
label: 'ที่อยู่',

View File

@ -9,7 +9,6 @@ export default {
loading: 'Yükleniyor...',
telEmpty: 'Lütfen tel. no giriniz',
nameEmpty: 'Lütfen isim giriniz',
nameInvalid: 'Geçersiz isim',
confirmDelete: 'Silmek istediğinize emin misiniz?',
telInvalid: 'Geçersiz tel. numarası',
vanCalendar: {
@ -66,9 +65,6 @@ export default {
addressEmpty: 'Adres boş olamaz!',
postalEmpty: 'Yanlış posta kodu',
defaultAddress: 'Varsayılan adres olarak ayarla',
telPlaceholder: 'Telefone',
namePlaceholder: 'İsim',
areaPlaceholder: 'Alan',
},
vanAddressEditDetail: {
label: 'Adres',

View File

@ -9,9 +9,8 @@ export default {
loading: '加载中...',
telEmpty: '请填写电话',
nameEmpty: '请填写姓名',
nameInvalid: '请输入正确的姓名',
confirmDelete: '确定要删除吗',
telInvalid: '请输入正确的手机号',
telInvalid: '请输入正确的电话',
vanCalendar: {
end: '结束',
start: '开始',
@ -20,7 +19,7 @@ export default {
startEnd: '开始/结束',
weekdays: ['日', '一', '二', '三', '四', '五', '六'],
monthTitle: (year: number, month: number) => `${year}${month}`,
rangePrompt: (maxRange: number) => `选择天数不能超过 ${maxRange}`,
rangePrompt: (maxRange: number) => `最多选择 ${maxRange}`,
},
vanCascader: {
select: '请选择',
@ -65,15 +64,12 @@ export default {
postal: '邮政编码',
areaEmpty: '请选择地区',
addressEmpty: '请填写详细地址',
postalEmpty: '邮政编码格式不正确',
postalEmpty: '邮政编码不正确',
defaultAddress: '设为默认收货地址',
telPlaceholder: '收货人手机号',
namePlaceholder: '收货人姓名',
areaPlaceholder: '选择省 / 市 / 区',
},
vanAddressEditDetail: {
label: '详细地址',
placeholder: '街道门牌、楼层房间号等信息',
placeholder: '街道门牌信息',
},
vanAddressList: {
add: '新增地址',

View File

@ -9,7 +9,6 @@ export default {
loading: '加載中...',
telEmpty: '請填寫電話',
nameEmpty: '請填寫姓名',
nameInvalid: '請輸入正確的姓名',
confirmDelete: '確定要刪除嗎',
telInvalid: '請填寫正確的電話',
vanCalendar: {
@ -20,7 +19,7 @@ export default {
startEnd: '開始/結束',
weekdays: ['日', '一', '二', '三', '四', '五', '六'],
monthTitle: (year: number, month: number) => `${year}${month}`,
rangePrompt: (maxRange: number) => `選擇天數不能超過 ${maxRange}`,
rangePrompt: (maxRange: number) => `最多選擇 ${maxRange}`,
},
vanCascader: {
select: '請選擇',
@ -65,15 +64,12 @@ export default {
postal: '郵政編碼',
areaEmpty: '請選擇地區',
addressEmpty: '請填寫詳細地址',
postalEmpty: '郵政編碼格式不正確',
postalEmpty: '郵政編碼不正確',
defaultAddress: '設為默認收貨地址',
telPlaceholder: '收貨人手機號',
namePlaceholder: '收貨人姓名',
areaPlaceholder: '選擇省 / 市 / 區',
},
vanAddressEditDetail: {
label: '詳細地址',
placeholder: '街道門牌、樓層房間號等信息',
placeholder: '街道門牌信息',
},
vanAddressList: {
add: '新增地址',

View File

@ -9,7 +9,6 @@ export default {
loading: '載入中...',
telEmpty: '請填寫電話',
nameEmpty: '請填寫姓名',
nameInvalid: '請輸入正確的姓名',
confirmDelete: '確定要刪除嗎',
telInvalid: '請填寫正確的電話',
vanCalendar: {
@ -20,7 +19,7 @@ export default {
startEnd: '開始/結束',
weekdays: ['日', '一', '二', '三', '四', '五', '六'],
monthTitle: (year: number, month: number) => `${year}${month}`,
rangePrompt: (maxRange: number) => `選擇天數不能超過 ${maxRange}`,
rangePrompt: (maxRange: number) => `最多選擇 ${maxRange}`,
},
vanCascader: {
select: '請選擇',
@ -65,15 +64,12 @@ export default {
postal: '郵遞區號',
areaEmpty: '請選擇地區',
addressEmpty: '請填寫詳細地址',
postalEmpty: '郵遞區號格式不正確',
postalEmpty: '郵遞區號不正確',
defaultAddress: '設為預設收貨地址',
telPlaceholder: '收貨人手機號碼',
namePlaceholder: '收貨人姓名',
areaPlaceholder: '選擇縣 / 市',
},
vanAddressEditDetail: {
label: '詳細地址',
placeholder: '街道門牌、樓層房號等資訊',
placeholder: '街道門牌資訊',
},
vanAddressList: {
add: '新增地址',