feat: Refine locale types (#22103)

This commit is contained in:
Gibson C 2020-03-11 14:56:01 +08:00 committed by GitHub
parent c8f437ea02
commit d2ef74b2ed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
54 changed files with 229 additions and 60 deletions

View File

@ -1,22 +1,34 @@
import * as React from 'react';
import * as PropTypes from 'prop-types';
import { ModalLocale, changeConfirmLocale } from '../modal/locale';
import warning from '../_util/warning';
import { ModalLocale, changeConfirmLocale } from '../modal/locale';
import { TransferLocale as TransferLocaleForEmpty } from '../empty';
import { PaginationLocale } from '../pagination/Pagination';
import { TableLocale } from '../table/interface';
import { PopconfirmLocale } from '../popconfirm';
import { UploadLocale } from '../upload/interface';
import { TransferLocale } from '../transfer';
export const ANT_MARK = 'internalMark';
export interface Locale {
locale: string;
Pagination?: Object;
Pagination?: PaginationLocale;
DatePicker?: Object;
TimePicker?: Object;
Calendar?: Object;
Table?: Object;
Table?: TableLocale;
Modal?: ModalLocale;
Popconfirm?: Object;
Transfer?: Object;
Popconfirm?: PopconfirmLocale;
Transfer?: Partial<TransferLocale>;
Select?: Object;
Upload?: Object;
Upload?: UploadLocale;
Empty?: TransferLocaleForEmpty;
global?: Object;
PageHeader?: Object;
Icon?: Object;
Text?: Object;
}
export interface LocaleProviderProps {

View File

@ -2,8 +2,9 @@ import Pagination from 'rc-pagination/lib/locale/ar_EG';
import DatePicker from '../date-picker/locale/ar_EG';
import TimePicker from '../time-picker/locale/ar_EG';
import Calendar from '../calendar/locale/ar_EG';
import { Locale } from '../locale-provider';
export default {
const localeValues: Locale = {
locale: 'ar',
Pagination,
DatePicker,
@ -41,3 +42,5 @@ export default {
description: 'لا توجد بيانات',
},
};
export default localeValues;

View File

@ -2,8 +2,9 @@ import Pagination from 'rc-pagination/lib/locale/az_AZ';
import DatePicker from '../date-picker/locale/az_AZ';
import TimePicker from '../time-picker/locale/az_AZ';
import Calendar from '../calendar/locale/az_AZ';
import { Locale } from '../locale-provider';
export default {
const localeValues: Locale = {
locale: 'az',
Pagination,
DatePicker,
@ -43,3 +44,5 @@ export default {
previewFile: 'Fayla önbaxış',
},
};
export default localeValues;

View File

@ -2,8 +2,9 @@ import Pagination from 'rc-pagination/lib/locale/bg_BG';
import DatePicker from '../date-picker/locale/bg_BG';
import TimePicker from '../time-picker/locale/bg_BG';
import Calendar from '../calendar/locale/bg_BG';
import { Locale } from '../locale-provider';
export default {
const localeValues: Locale = {
locale: 'bg',
Pagination,
DatePicker,
@ -41,3 +42,5 @@ export default {
description: 'Няма данни',
},
};
export default localeValues;

View File

@ -2,8 +2,9 @@ import Pagination from 'rc-pagination/lib/locale/ca_ES';
import DatePicker from '../date-picker/locale/ca_ES';
import TimePicker from '../time-picker/locale/ca_ES';
import Calendar from '../calendar/locale/ca_ES';
import { Locale } from '../locale-provider';
export default {
const localeValues: Locale = {
locale: 'ca',
Pagination,
DatePicker,
@ -39,3 +40,5 @@ export default {
description: 'Sense dades',
},
};
export default localeValues;

View File

@ -2,8 +2,9 @@ import Pagination from 'rc-pagination/lib/locale/cs_CZ';
import DatePicker from '../date-picker/locale/cs_CZ';
import TimePicker from '../time-picker/locale/cs_CZ';
import Calendar from '../calendar/locale/cs_CZ';
import { Locale } from '../locale-provider';
export default {
const localeValues: Locale = {
locale: 'cs',
Pagination,
DatePicker,
@ -39,3 +40,5 @@ export default {
description: 'Žádná data',
},
};
export default localeValues;

View File

@ -2,8 +2,9 @@ import Pagination from 'rc-pagination/lib/locale/da_DK';
import DatePicker from '../date-picker/locale/da_DK';
import TimePicker from '../time-picker/locale/da_DK';
import Calendar from '../calendar/locale/da_DK';
import { Locale } from '../locale-provider';
export default {
const localeValues: Locale = {
locale: 'da',
DatePicker,
TimePicker,
@ -41,3 +42,5 @@ export default {
description: 'Ingen data',
},
};
export default localeValues;

View File

@ -2,8 +2,9 @@ import Pagination from 'rc-pagination/lib/locale/de_DE';
import DatePicker from '../date-picker/locale/de_DE';
import TimePicker from '../time-picker/locale/de_DE';
import Calendar from '../calendar/locale/de_DE';
import { Locale } from '../locale-provider';
export default {
const localeValues: Locale = {
locale: 'de',
Pagination,
DatePicker,
@ -41,3 +42,5 @@ export default {
description: 'Keine Daten',
},
};
export default localeValues;

View File

@ -2,8 +2,9 @@ import Pagination from 'rc-pagination/lib/locale/en_US';
import DatePicker from '../date-picker/locale/en_US';
import TimePicker from '../time-picker/locale/en_US';
import Calendar from '../calendar/locale/en_US';
import { Locale } from '../locale-provider';
export default {
const localeValues: Locale = {
locale: 'en',
Pagination,
DatePicker,
@ -64,3 +65,5 @@ export default {
back: 'Back',
},
};
export default localeValues;

View File

@ -2,8 +2,9 @@ import Pagination from 'rc-pagination/lib/locale/el_GR';
import DatePicker from '../date-picker/locale/el_GR';
import TimePicker from '../time-picker/locale/el_GR';
import Calendar from '../calendar/locale/el_GR';
import { Locale } from '../locale-provider';
export default {
const localeValues: Locale = {
locale: 'el',
Pagination,
DatePicker,
@ -41,3 +42,5 @@ export default {
description: 'Δεν υπάρχουν δεδομένα',
},
};
export default localeValues;

View File

@ -2,8 +2,9 @@ import Pagination from 'rc-pagination/lib/locale/en_GB';
import DatePicker from '../date-picker/locale/en_GB';
import TimePicker from '../time-picker/locale/en_GB';
import Calendar from '../calendar/locale/en_GB';
import { Locale } from '../locale-provider';
export default {
const localeValues: Locale = {
locale: 'en-gb',
Pagination,
DatePicker,
@ -41,3 +42,5 @@ export default {
description: 'No data',
},
};
export default localeValues;

View File

@ -2,8 +2,9 @@ import Pagination from 'rc-pagination/lib/locale/es_ES';
import DatePicker from '../date-picker/locale/es_ES';
import TimePicker from '../time-picker/locale/es_ES';
import Calendar from '../calendar/locale/es_ES';
import { Locale } from '../locale-provider';
export default {
const localeValues: Locale = {
locale: 'es',
Pagination,
DatePicker,
@ -57,3 +58,5 @@ export default {
back: 'volver',
},
};
export default localeValues;

View File

@ -2,8 +2,9 @@ import Pagination from 'rc-pagination/lib/locale/et_EE';
import DatePicker from '../date-picker/locale/et_EE';
import TimePicker from '../time-picker/locale/et_EE';
import Calendar from '../calendar/locale/et_EE';
import { Locale } from '../locale-provider';
export default {
const localeValues: Locale = {
locale: 'et',
Pagination,
DatePicker,
@ -41,3 +42,5 @@ export default {
description: 'Andmed puuduvad',
},
};
export default localeValues;

View File

@ -2,8 +2,9 @@ import Pagination from 'rc-pagination/lib/locale/fa_IR';
import DatePicker from '../date-picker/locale/fa_IR';
import TimePicker from '../time-picker/locale/fa_IR';
import Calendar from '../calendar/locale/fa_IR';
import { Locale } from '../locale-provider';
export default {
const localeValues: Locale = {
locale: 'fa',
Pagination,
DatePicker,
@ -41,3 +42,5 @@ export default {
description: 'داده‌ای موجود نیست',
},
};
export default localeValues;

View File

@ -2,8 +2,9 @@ import Pagination from 'rc-pagination/lib/locale/fi_FI';
import DatePicker from '../date-picker/locale/fi_FI';
import TimePicker from '../time-picker/locale/fi_FI';
import Calendar from '../calendar/locale/fi_FI';
import { Locale } from '../locale-provider';
export default {
const localeValues: Locale = {
locale: 'fi',
Pagination,
DatePicker,
@ -42,3 +43,5 @@ export default {
description: 'Ei kohteita',
},
};
export default localeValues;

View File

@ -2,8 +2,9 @@ import Pagination from 'rc-pagination/lib/locale/fr_BE';
import DatePicker from '../date-picker/locale/fr_BE';
import TimePicker from '../time-picker/locale/fr_BE';
import Calendar from '../calendar/locale/fr_BE';
import { Locale } from '../locale-provider';
export default {
const localeValues: Locale = {
locale: 'fr',
Pagination,
DatePicker,
@ -45,3 +46,5 @@ export default {
expand: 'développer',
},
};
export default localeValues;

View File

@ -2,8 +2,9 @@ import Pagination from 'rc-pagination/lib/locale/fr_FR';
import DatePicker from '../date-picker/locale/fr_FR';
import TimePicker from '../time-picker/locale/fr_FR';
import Calendar from '../calendar/locale/fr_FR';
import { Locale } from '../locale-provider';
export default {
const localeValues: Locale = {
locale: 'fr',
Pagination,
DatePicker,
@ -45,3 +46,5 @@ export default {
expand: 'développer',
},
};
export default localeValues;

View File

@ -2,8 +2,9 @@ import Pagination from 'rc-pagination/lib/locale/he_IL';
import DatePicker from '../date-picker/locale/he_IL';
import TimePicker from '../time-picker/locale/he_IL';
import Calendar from '../calendar/locale/he_IL';
import { Locale } from '../locale-provider';
export default {
const localeValues: Locale = {
locale: 'he',
Pagination,
DatePicker,
@ -41,3 +42,5 @@ export default {
description: 'אין מידע',
},
};
export default localeValues;

View File

@ -2,8 +2,9 @@ import Pagination from 'rc-pagination/lib/locale/hi_IN';
import DatePicker from '../date-picker/locale/hi_IN';
import TimePicker from '../time-picker/locale/hi_IN';
import Calendar from '../calendar/locale/hi_IN';
import { Locale } from '../locale-provider';
export default {
const localeValues: Locale = {
locale: 'hi',
Pagination,
DatePicker,
@ -49,3 +50,5 @@ export default {
downloadFile: 'फ़ाइल डाउनलोड करें',
},
};
export default localeValues;

View File

@ -2,8 +2,9 @@ import Pagination from 'rc-pagination/lib/locale/hr_HR';
import DatePicker from '../date-picker/locale/hr_HR';
import TimePicker from '../time-picker/locale/hr_HR';
import Calendar from '../calendar/locale/hr_HR';
import { Locale } from '../locale-provider';
export default {
const localeValues: Locale = {
locale: 'hr',
Pagination,
DatePicker,
@ -55,3 +56,5 @@ export default {
expand: 'proširi',
},
};
export default localeValues;

View File

@ -2,8 +2,9 @@ import Pagination from 'rc-pagination/lib/locale/hu_HU';
import DatePicker from '../date-picker/locale/hu_HU';
import TimePicker from '../time-picker/locale/hu_HU';
import Calendar from '../calendar/locale/hu_HU';
import { Locale } from '../locale-provider';
export default {
const localeValues: Locale = {
locale: 'hu',
Pagination,
DatePicker,
@ -42,3 +43,5 @@ export default {
description: 'Nincs adat',
},
};
export default localeValues;

View File

@ -1,3 +1,5 @@
import { Locale } from '../locale-provider';
const datePickerLocale = {
lang: {
locale: 'hy-am',
@ -35,7 +37,7 @@ const datePickerLocale = {
},
};
export default {
const localeValues: Locale = {
locale: 'hy-am',
Pagination: {
// Options.jsx
@ -108,3 +110,5 @@ export default {
back: 'Հետ',
},
};
export default localeValues;

View File

@ -2,8 +2,9 @@ import Pagination from 'rc-pagination/lib/locale/id_ID';
import DatePicker from '../date-picker/locale/id_ID';
import TimePicker from '../time-picker/locale/id_ID';
import Calendar from '../calendar/locale/id_ID';
import { Locale } from '../locale-provider';
export default {
const localeValues: Locale = {
locale: 'id',
Pagination,
DatePicker,
@ -43,3 +44,5 @@ export default {
description: 'Tidak ada data',
},
};
export default localeValues;

View File

@ -2,8 +2,9 @@ import Pagination from 'rc-pagination/lib/locale/is_IS';
import DatePicker from '../date-picker/locale/is_IS';
import TimePicker from '../time-picker/locale/is_IS';
import Calendar from '../calendar/locale/is_IS';
import { Locale } from '../locale-provider';
export default {
const localeValues: Locale = {
locale: 'is',
Pagination,
DatePicker,
@ -41,3 +42,5 @@ export default {
description: 'Engin gögn',
},
};
export default localeValues;

View File

@ -2,8 +2,9 @@ import Pagination from 'rc-pagination/lib/locale/it_IT';
import DatePicker from '../date-picker/locale/it_IT';
import TimePicker from '../time-picker/locale/it_IT';
import Calendar from '../calendar/locale/it_IT';
import { Locale } from '../locale-provider';
export default {
const localeValues: Locale = {
locale: 'it',
Pagination,
DatePicker,
@ -54,3 +55,5 @@ export default {
expand: 'espandi',
},
};
export default localeValues;

View File

@ -2,8 +2,9 @@ import Pagination from 'rc-pagination/lib/locale/ja_JP';
import DatePicker from '../date-picker/locale/ja_JP';
import TimePicker from '../time-picker/locale/ja_JP';
import Calendar from '../calendar/locale/ja_JP';
import { Locale } from '../locale-provider';
export default {
const localeValues: Locale = {
locale: 'ja',
Pagination,
DatePicker,
@ -41,3 +42,5 @@ export default {
description: 'データがありません',
},
};
export default localeValues;

View File

@ -2,8 +2,9 @@ import Pagination from 'rc-pagination/lib/locale/kn_IN';
import DatePicker from '../date-picker/locale/kn_IN';
import TimePicker from '../time-picker/locale/kn_IN';
import Calendar from '../calendar/locale/kn_IN';
import { Locale } from '../locale-provider';
export default {
const localeValues: Locale = {
locale: 'kn',
Pagination,
DatePicker,
@ -49,3 +50,5 @@ export default {
downloadFile: 'ಫೈಲ್ ಡೌನ್‌ಲೋಡ್ ಮಾಡಿ',
},
};
export default localeValues;

View File

@ -2,8 +2,9 @@ import Pagination from 'rc-pagination/lib/locale/ko_KR';
import DatePicker from '../date-picker/locale/ko_KR';
import TimePicker from '../time-picker/locale/ko_KR';
import Calendar from '../calendar/locale/ko_KR';
import { Locale } from '../locale-provider';
export default {
const localeValues: Locale = {
locale: 'ko',
Pagination,
DatePicker,
@ -41,3 +42,5 @@ export default {
description: '데이터 없음',
},
};
export default localeValues;

View File

@ -2,8 +2,9 @@ import Pagination from 'rc-pagination/lib/locale/ku_IQ';
import DatePicker from '../date-picker/locale/ku_IQ';
import TimePicker from '../time-picker/locale/ku_IQ';
import Calendar from '../calendar/locale/ku_IQ';
import { Locale } from '../locale-provider';
export default {
const localeValues: Locale = {
locale: 'ku-iq',
Pagination,
DatePicker,
@ -41,3 +42,5 @@ export default {
description: 'Agahî tune',
},
};
export default localeValues;

View File

@ -2,8 +2,9 @@ import Pagination from 'rc-pagination/lib/locale/lv_LV';
import DatePicker from '../date-picker/locale/lv_LV';
import TimePicker from '../time-picker/locale/lv_LV';
import Calendar from '../calendar/locale/lv_LV';
import { Locale } from '../locale-provider';
export default {
const localeValues: Locale = {
locale: 'lv',
Pagination,
DatePicker,
@ -41,3 +42,5 @@ export default {
description: 'Nav datu',
},
};
export default localeValues;

View File

@ -2,8 +2,9 @@ import Pagination from 'rc-pagination/lib/locale/mk_MK';
import DatePicker from '../date-picker/locale/mk_MK';
import TimePicker from '../time-picker/locale/mk_MK';
import Calendar from '../calendar/locale/mk_MK';
import { Locale } from '../locale-provider';
export default {
const localeValues: Locale = {
locale: 'mk',
Pagination,
DatePicker,
@ -56,3 +57,5 @@ export default {
back: 'Назад',
},
};
export default localeValues;

View File

@ -2,8 +2,9 @@ import Pagination from 'rc-pagination/lib/locale/mn_MN';
import DatePicker from '../date-picker/locale/mn_MN';
import TimePicker from '../time-picker/locale/mn_MN';
import Calendar from '../calendar/locale/mn_MN';
import { Locale } from '../locale-provider';
export default {
const localeValues: Locale = {
locale: 'mn-mn',
Pagination,
DatePicker,
@ -41,3 +42,5 @@ export default {
description: 'Мэдээлэл байхгүй байна',
},
};
export default localeValues;

View File

@ -2,8 +2,9 @@ import Pagination from 'rc-pagination/lib/locale/ms_MY';
import DatePicker from '../date-picker/locale/ms_MY';
import TimePicker from '../time-picker/locale/ms_MY';
import Calendar from '../calendar/locale/ms_MY';
import { Locale } from '../locale-provider';
export default {
const localeValues: Locale = {
locale: 'ms-my',
Pagination,
DatePicker,
@ -61,3 +62,5 @@ export default {
downloadFile: 'Muat turun fail',
},
};
export default localeValues;

View File

@ -2,8 +2,9 @@ import Pagination from 'rc-pagination/lib/locale/nb_NO';
import DatePicker from '../date-picker/locale/nb_NO';
import TimePicker from '../time-picker/locale/nb_NO';
import Calendar from '../calendar/locale/nb_NO';
import { Locale } from '../locale-provider';
export default {
const localeValues: Locale = {
locale: 'nb',
DatePicker,
TimePicker,
@ -41,3 +42,5 @@ export default {
description: 'Ingen data',
},
};
export default localeValues;

View File

@ -2,8 +2,9 @@ import Pagination from 'rc-pagination/lib/locale/en_US';
import DatePicker from '../date-picker/locale/en_US';
import TimePicker from '../time-picker/locale/en_US';
import Calendar from '../calendar/locale/en_US';
import { Locale } from '../locale-provider';
export default {
const localeValues: Locale = {
locale: 'ne-np',
Pagination,
DatePicker,
@ -42,3 +43,5 @@ export default {
description: 'डाटा छैन',
},
};
export default localeValues;

View File

@ -2,8 +2,9 @@ import Pagination from 'rc-pagination/lib/locale/nl_BE';
import DatePicker from '../date-picker/locale/nl_BE';
import TimePicker from '../time-picker/locale/nl_BE';
import Calendar from '../calendar/locale/nl_BE';
import { Locale } from '../locale-provider';
export default {
const localeValues: Locale = {
locale: 'nl-be',
Pagination,
DatePicker,
@ -41,3 +42,5 @@ export default {
description: 'Geen gegevens',
},
};
export default localeValues;

View File

@ -2,8 +2,9 @@ import Pagination from 'rc-pagination/lib/locale/nl_NL';
import DatePicker from '../date-picker/locale/nl_NL';
import TimePicker from '../time-picker/locale/nl_NL';
import Calendar from '../calendar/locale/nl_NL';
import { Locale } from '../locale-provider';
export default {
const localeValues: Locale = {
locale: 'nl',
Pagination,
DatePicker,
@ -60,3 +61,5 @@ export default {
back: 'Terug',
},
};
export default localeValues;

View File

@ -2,8 +2,9 @@ import Pagination from 'rc-pagination/lib/locale/pl_PL';
import DatePicker from '../date-picker/locale/pl_PL';
import TimePicker from '../time-picker/locale/pl_PL';
import Calendar from '../calendar/locale/pl_PL';
import { Locale } from '../locale-provider';
export default {
const localeValues: Locale = {
locale: 'pl',
Pagination,
DatePicker,
@ -41,3 +42,5 @@ export default {
description: 'Brak danych',
},
};
export default localeValues;

View File

@ -2,8 +2,9 @@ import Pagination from 'rc-pagination/lib/locale/pt_BR';
import DatePicker from '../date-picker/locale/pt_BR';
import TimePicker from '../time-picker/locale/pt_BR';
import Calendar from '../calendar/locale/pt_BR';
import { Locale } from '../locale-provider';
export default {
const localeValues: Locale = {
locale: 'pt-br',
Pagination,
DatePicker,
@ -47,3 +48,5 @@ export default {
expand: 'expandir',
},
};
export default localeValues;

View File

@ -2,8 +2,9 @@ import Pagination from 'rc-pagination/lib/locale/pt_PT';
import DatePicker from '../date-picker/locale/pt_PT';
import TimePicker from '../time-picker/locale/pt_PT';
import Calendar from '../calendar/locale/pt_PT';
import { Locale } from '../locale-provider';
export default {
const localeValues: Locale = {
locale: 'pt',
Pagination,
DatePicker,
@ -42,3 +43,5 @@ export default {
description: 'Sem resultados',
},
};
export default localeValues;

View File

@ -2,8 +2,9 @@ import Pagination from 'rc-pagination/lib/locale/ro_RO';
import DatePicker from '../date-picker/locale/ro_RO';
import TimePicker from '../time-picker/locale/ro_RO';
import Calendar from '../calendar/locale/ro_RO';
import { Locale } from '../locale-provider';
export default {
const localeValues: Locale = {
locale: 'ro',
Pagination,
DatePicker,
@ -60,3 +61,5 @@ export default {
back: 'înapoi',
},
};
export default localeValues;

View File

@ -2,8 +2,9 @@ import Pagination from 'rc-pagination/lib/locale/ru_RU';
import DatePicker from '../date-picker/locale/ru_RU';
import TimePicker from '../time-picker/locale/ru_RU';
import Calendar from '../calendar/locale/ru_RU';
import { Locale } from '../locale-provider';
export default {
const localeValues: Locale = {
locale: 'ru',
Pagination,
DatePicker,
@ -51,3 +52,5 @@ export default {
back: 'назад',
},
};
export default localeValues;

View File

@ -2,8 +2,9 @@ import Pagination from 'rc-pagination/lib/locale/sk_SK';
import DatePicker from '../date-picker/locale/sk_SK';
import TimePicker from '../time-picker/locale/sk_SK';
import Calendar from '../calendar/locale/sk_SK';
import { Locale } from '../locale-provider';
export default {
const localeValues: Locale = {
locale: 'sk',
Pagination,
DatePicker,
@ -60,3 +61,5 @@ export default {
back: 'Späť',
},
};
export default localeValues;

View File

@ -2,8 +2,9 @@ import Pagination from 'rc-pagination/lib/locale/sl_SI';
import DatePicker from '../date-picker/locale/sl_SI';
import TimePicker from '../time-picker/locale/sl_SI';
import Calendar from '../calendar/locale/sl_SI';
import { Locale } from '../locale-provider';
export default {
const localeValues: Locale = {
locale: 'sl',
Pagination,
DatePicker,
@ -41,3 +42,5 @@ export default {
description: 'Ni podatkov',
},
};
export default localeValues;

View File

@ -2,8 +2,9 @@ import Pagination from 'rc-pagination/lib/locale/sr_RS';
import DatePicker from '../date-picker/locale/sr_RS';
import TimePicker from '../time-picker/locale/sr_RS';
import Calendar from '../calendar/locale/sr_RS';
import { Locale } from '../locale-provider';
export default {
const localeValues: Locale = {
locale: 'sr',
Pagination,
DatePicker,
@ -41,3 +42,5 @@ export default {
description: 'Nema podataka',
},
};
export default localeValues;

View File

@ -2,8 +2,9 @@ import Pagination from 'rc-pagination/lib/locale/sv_SE';
import DatePicker from '../date-picker/locale/sv_SE';
import TimePicker from '../time-picker/locale/sv_SE';
import Calendar from '../calendar/locale/sv_SE';
import { Locale } from '../locale-provider';
export default {
const localeValues: Locale = {
locale: 'sv',
Pagination,
DatePicker,
@ -45,3 +46,5 @@ export default {
downloadFile: 'Nedladdning fil',
},
};
export default localeValues;

View File

@ -2,8 +2,9 @@ import Pagination from 'rc-pagination/lib/locale/ta_IN';
import DatePicker from '../date-picker/locale/ta_IN';
import TimePicker from '../time-picker/locale/ta_IN';
import Calendar from '../calendar/locale/ta_IN';
import { Locale } from '../locale-provider';
export default {
const localeValues: Locale = {
locale: 'ta',
Pagination,
DatePicker,
@ -61,3 +62,5 @@ export default {
back: 'பின் செல்லவும்',
},
};
export default localeValues;

View File

@ -2,8 +2,9 @@ import Pagination from 'rc-pagination/lib/locale/th_TH';
import DatePicker from '../date-picker/locale/th_TH';
import TimePicker from '../time-picker/locale/th_TH';
import Calendar from '../calendar/locale/th_TH';
import { Locale } from '../locale-provider';
export default {
const localeValues: Locale = {
locale: 'th',
Pagination,
DatePicker,
@ -60,3 +61,5 @@ export default {
back: 'ย้อนกลับ',
},
};
export default localeValues;

View File

@ -2,8 +2,9 @@ import Pagination from 'rc-pagination/lib/locale/tr_TR';
import DatePicker from '../date-picker/locale/tr_TR';
import TimePicker from '../time-picker/locale/tr_TR';
import Calendar from '../calendar/locale/tr_TR';
import { Locale } from '../locale-provider';
export default {
const localeValues: Locale = {
locale: 'tr',
Pagination,
DatePicker,
@ -55,3 +56,5 @@ export default {
expand: 'genişlet',
},
};
export default localeValues;

View File

@ -2,8 +2,9 @@ import Pagination from 'rc-pagination/lib/locale/uk_UA';
import DatePicker from '../date-picker/locale/uk_UA';
import TimePicker from '../time-picker/locale/uk_UA';
import Calendar from '../calendar/locale/uk_UA';
import { Locale } from '../locale-provider';
export default {
const localeValues: Locale = {
locale: 'uk',
Pagination,
DatePicker,
@ -41,3 +42,5 @@ export default {
description: 'Даних немає',
},
};
export default localeValues;

View File

@ -2,8 +2,9 @@ import Pagination from 'rc-pagination/lib/locale/vi_VN';
import DatePicker from '../date-picker/locale/vi_VN';
import TimePicker from '../time-picker/locale/vi_VN';
import Calendar from '../calendar/locale/vi_VN';
import { Locale } from '../locale-provider';
export default {
const localeValues: Locale = {
locale: 'vi',
Pagination,
DatePicker,
@ -41,3 +42,5 @@ export default {
description: 'Trống',
},
};
export default localeValues;

View File

@ -2,8 +2,9 @@ import Pagination from 'rc-pagination/lib/locale/zh_CN';
import DatePicker from '../date-picker/locale/zh_CN';
import TimePicker from '../time-picker/locale/zh_CN';
import Calendar from '../calendar/locale/zh_CN';
import { Locale } from '../locale-provider';
export default {
const localeValues: Locale = {
locale: 'zh-cn',
Pagination,
DatePicker,
@ -64,3 +65,5 @@ export default {
back: '返回',
},
};
export default localeValues;

View File

@ -2,8 +2,9 @@ import Pagination from 'rc-pagination/lib/locale/zh_TW';
import DatePicker from '../date-picker/locale/zh_TW';
import TimePicker from '../time-picker/locale/zh_TW';
import Calendar from '../calendar/locale/zh_TW';
import { Locale } from '../locale-provider';
export default {
const localeValues: Locale = {
locale: 'zh-tw',
Pagination,
DatePicker,
@ -44,3 +45,5 @@ export default {
back: '返回',
},
};
export default localeValues;

View File

@ -7,7 +7,7 @@ export interface ModalLocale {
}
let runtimeLocale: ModalLocale = {
...defaultLocale.Modal,
...(defaultLocale.Modal as ModalLocale),
};
export function changeConfirmLocale(newLocale?: ModalLocale) {
@ -18,7 +18,7 @@ export function changeConfirmLocale(newLocale?: ModalLocale) {
};
} else {
runtimeLocale = {
...defaultLocale.Modal,
...(defaultLocale.Modal as ModalLocale),
};
}
}