diff --git a/components/locale-provider/LocaleReceiver.jsx b/components/locale-provider/LocaleReceiver.jsx index b65196ae7..65b815dd6 100644 --- a/components/locale-provider/LocaleReceiver.jsx +++ b/components/locale-provider/LocaleReceiver.jsx @@ -1,9 +1,10 @@ import PropTypes from '../_util/vue-types' +import defaultLocaleData from './default' export default { props: { - componentName: PropTypes.string, + componentName: PropTypes.string.def('global'), defaultLocale: PropTypes.oneOfType([ PropTypes.object, PropTypes.func, @@ -16,10 +17,12 @@ export default { methods: { getLocale () { const { componentName, defaultLocale } = this + const locale = defaultLocale || defaultLocaleData[componentName || 'global'] const { antLocale } = this.localeData - const localeFromContext = antLocale && antLocale[componentName] + + const localeFromContext = componentName && antLocale ? antLocale[componentName] : {} return { - ...(typeof defaultLocale === 'function' ? defaultLocale() : defaultLocale), + ...(typeof locale === 'function' ? locale() : locale), ...(localeFromContext || {}), } }, @@ -29,7 +32,7 @@ export default { const localeCode = antLocale && antLocale.locale // Had use LocaleProvide but didn't set locale if (antLocale && antLocale.exist && !localeCode) { - return 'en-us' + return defaultLocaleData.locale } return localeCode }, diff --git a/components/locale-provider/__tests__/__snapshots__/index.test.js.snap b/components/locale-provider/__tests__/__snapshots__/index.test.js.snap index e3e4beed9..986aa1089 100644 --- a/components/locale-provider/__tests__/__snapshots__/index.test.js.snap +++ b/components/locale-provider/__tests__/__snapshots__/index.test.js.snap @@ -896,7 +896,39 @@ exports[`Locale Provider should display the text as ar 1`] = ` -
Name
Age
لا توجد بيانات
+
+
+
+
+
+ +
+ + + + + + + + + + + + +
+
Name
+
+
Age
+
+
+
لا توجد بيانات
+
+
+
+
+
`; @@ -1263,7 +1295,39 @@ exports[`Locale Provider should display the text as bg 1`] = ` -
Name
Age
Няма данни
+
+
+
+
+
+ +
+ + + + + + + + + + + + +
+
Name
+
+
Age
+
+
+
Няма данни
+
+
+
+
+
`; @@ -1630,7 +1694,39 @@ exports[`Locale Provider should display the text as ca 1`] = ` -
Name
Age
Sense dades
+
+
+
+
+
+ +
+ + + + + + + + + + + + +
+
Name
+
+
Age
+
+
+
Sense dades
+
+
+
+
+
`; @@ -1997,7 +2093,438 @@ exports[`Locale Provider should display the text as cs 1`] = ` -
Name
Age
Žádná data
+
+
+
+
+
+ +
+ + + + + + + + + + + + +
+
Name
+
+
Age
+
+
+
Žádná data
+
+
+
+
+
+ + +`; + +exports[`Locale Provider should display the text as da 1`] = ` +
+ +
+
+
+ +
+
+
~ Click to confirm +
+
+
0 element
+ +
+
+
+
0 element
+ +
+
+
+
+
+
+
+
2017
+
+
+
+
+
+
+
sep
+
+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
mationtofr
+
+
28
+
+
+
+
+
29
+
+
+
+
+
30
+
+
+
+
+
31
+
+
+
+
+
01
+
+
+
+
+
02
+
+
+
+
+
03
+
+
+
+
+
04
+
+
+
+
+
05
+
+
+
+
+
06
+
+
+
+
+
07
+
+
+
+
+
08
+
+
+
+
+
09
+
+
+
+
+
10
+
+
+
+
+
11
+
+
+
+
+
12
+
+
+
+
+
13
+
+
+
+
+
14
+
+
+
+
+
15
+
+
+
+
+
16
+
+
+
+
+
17
+
+
+
+
+
18
+
+
+
+
+
19
+
+
+
+
+
20
+
+
+
+
+
21
+
+
+
+
+
22
+
+
+
+
+
23
+
+
+
+
+
24
+
+
+
+
+
25
+
+
+
+
+
26
+
+
+
+
+
27
+
+
+
+
+
28
+
+
+
+
+
29
+
+
+
+
+
30
+
+
+
+
+
01
+
+
+
+
+
02
+
+
+
+
+
03
+
+
+
+
+
04
+
+
+
+
+
05
+
+
+
+
+
06
+
+
+
+
+
07
+
+
+
+
+
08
+
+
+
+
+
+
+
+
+
+
+
+ +
+ + + + + + + + + + + + +
+
Name
+
+
Age
+
+
+
Ingen data
+
+
+
+
+
`; @@ -2364,7 +2891,39 @@ exports[`Locale Provider should display the text as de 1`] = ` -
Name
Age
Keine Daten
+
+
+
+
+
+ +
+ + + + + + + + + + + + +
+
Name
+
+
Age
+
+
+
Keine Daten
+
+
+
+
+
`; @@ -2731,7 +3290,39 @@ exports[`Locale Provider should display the text as el 1`] = ` -
Name
Age
Δεν υπάρχουν δεδομένα
+
+
+
+
+
+ +
+ + + + + + + + + + + + +
+
Name
+
+
Age
+
+
+
Δεν υπάρχουν δεδομένα
+
+
+
+
+
`; @@ -3098,7 +3689,39 @@ exports[`Locale Provider should display the text as en 1`] = ` -
Name
Age
No data
+
+
+
+
+
+ +
+ + + + + + + + + + + + +
+
Name
+
+
Age
+
+
+
No data
+
+
+
+
+
`; @@ -3465,7 +4088,39 @@ exports[`Locale Provider should display the text as en-gb 1`] = ` -
Name
Age
No data
+
+
+
+
+
+ +
+ + + + + + + + + + + + +
+
Name
+
+
Age
+
+
+
No data
+
+
+
+
+
`; @@ -3832,7 +4487,39 @@ exports[`Locale Provider should display the text as es 1`] = ` -
Name
Age
No hay datos
+
+
+
+
+
+ +
+ + + + + + + + + + + + +
+
Name
+
+
Age
+
+
+
No hay datos
+
+
+
+
+
`; @@ -4199,7 +4886,39 @@ exports[`Locale Provider should display the text as et 1`] = ` -
Name
Age
Andmed puuduvad
+
+
+
+
+
+ +
+ + + + + + + + + + + + +
+
Name
+
+
Age
+
+
+
Andmed puuduvad
+
+
+
+
+
`; @@ -4566,7 +5285,39 @@ exports[`Locale Provider should display the text as fa 1`] = ` -
Name
Age
داده‌ای موجود نیست
+
+
+
+
+
+ +
+ + + + + + + + + + + + +
+
Name
+
+
Age
+
+
+
داده‌ای موجود نیست
+
+
+
+
+
`; @@ -4933,7 +5684,39 @@ exports[`Locale Provider should display the text as fi 1`] = ` -
Name
Age
Ei kohteita
+
+
+
+
+
+ +
+ + + + + + + + + + + + +
+
Name
+
+
Age
+
+
+
Ei kohteita
+
+
+
+
+
`; @@ -5300,7 +6083,39 @@ exports[`Locale Provider should display the text as fr 1`] = ` -
Name
Age
Aucune donnée
+
+
+
+
+
+ +
+ + + + + + + + + + + + +
+
Name
+
+
Age
+
+
+
Aucune donnée
+
+
+
+
+
`; @@ -5667,7 +6482,1236 @@ exports[`Locale Provider should display the text as fr 2`] = ` -
Name
Age
Aucune donnée
+
+
+
+
+
+ +
+ + + + + + + + + + + + +
+
Name
+
+
Age
+
+
+
Aucune donnée
+
+
+
+
+
+ + +`; + +exports[`Locale Provider should display the text as he 1`] = ` +
+ +
+
+
+ +
+
+
~ Click to confirm +
+
+
0 פריט
+ +
+
+
+
0 פריט
+ +
+
+
+
+
+
+
+
2017
+
+
+
+
+
+
+
ספט׳
+
+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
אבגדהוש
+
+
27
+
+
+
+
+
28
+
+
+
+
+
29
+
+
+
+
+
30
+
+
+
+
+
31
+
+
+
+
+
01
+
+
+
+
+
02
+
+
+
+
+
03
+
+
+
+
+
04
+
+
+
+
+
05
+
+
+
+
+
06
+
+
+
+
+
07
+
+
+
+
+
08
+
+
+
+
+
09
+
+
+
+
+
10
+
+
+
+
+
11
+
+
+
+
+
12
+
+
+
+
+
13
+
+
+
+
+
14
+
+
+
+
+
15
+
+
+
+
+
16
+
+
+
+
+
17
+
+
+
+
+
18
+
+
+
+
+
19
+
+
+
+
+
20
+
+
+
+
+
21
+
+
+
+
+
22
+
+
+
+
+
23
+
+
+
+
+
24
+
+
+
+
+
25
+
+
+
+
+
26
+
+
+
+
+
27
+
+
+
+
+
28
+
+
+
+
+
29
+
+
+
+
+
30
+
+
+
+
+
01
+
+
+
+
+
02
+
+
+
+
+
03
+
+
+
+
+
04
+
+
+
+
+
05
+
+
+
+
+
06
+
+
+
+
+
07
+
+
+
+
+
+
+
+
+
+
+
+ +
+ + + + + + + + + + + + +
+
Name
+
+
Age
+
+
+
אין מידע
+
+
+
+
+
+ +
+`; + +exports[`Locale Provider should display the text as hu 1`] = ` +
+ +
+
+
+ +
+
+
~ Click to confirm +
+
+
0 elem
+ +
+
+
+
0 elem
+ +
+
+
+
+
+
+
+
2017
+
+
+
+
+
+
+
szept
+
+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
hkszecspszov
+
+
28
+
+
+
+
+
29
+
+
+
+
+
30
+
+
+
+
+
31
+
+
+
+
+
01
+
+
+
+
+
02
+
+
+
+
+
03
+
+
+
+
+
04
+
+
+
+
+
05
+
+
+
+
+
06
+
+
+
+
+
07
+
+
+
+
+
08
+
+
+
+
+
09
+
+
+
+
+
10
+
+
+
+
+
11
+
+
+
+
+
12
+
+
+
+
+
13
+
+
+
+
+
14
+
+
+
+
+
15
+
+
+
+
+
16
+
+
+
+
+
17
+
+
+
+
+
18
+
+
+
+
+
19
+
+
+
+
+
20
+
+
+
+
+
21
+
+
+
+
+
22
+
+
+
+
+
23
+
+
+
+
+
24
+
+
+
+
+
25
+
+
+
+
+
26
+
+
+
+
+
27
+
+
+
+
+
28
+
+
+
+
+
29
+
+
+
+
+
30
+
+
+
+
+
01
+
+
+
+
+
02
+
+
+
+
+
03
+
+
+
+
+
04
+
+
+
+
+
05
+
+
+
+
+
06
+
+
+
+
+
07
+
+
+
+
+
08
+
+
+
+
+
+
+
+
+
+
+
+ +
+ + + + + + + + + + + + +
+
Name
+
+
Age
+
+
+
Nincs adat
+
+
+
+
+
+ +
+`; + +exports[`Locale Provider should display the text as id 1`] = ` +
+ +
+
+
+ +
+
+
~ Click to confirm +
+
+
0 barang
+ +
+
+
+
0 barang
+ +
+
+
+
+
+
+
+
2017
+
+
+
+
+
+
+
Sep
+
+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SnSlRbKmJmSbMg
+
+
28
+
+
+
+
+
29
+
+
+
+
+
30
+
+
+
+
+
31
+
+
+
+
+
01
+
+
+
+
+
02
+
+
+
+
+
03
+
+
+
+
+
04
+
+
+
+
+
05
+
+
+
+
+
06
+
+
+
+
+
07
+
+
+
+
+
08
+
+
+
+
+
09
+
+
+
+
+
10
+
+
+
+
+
11
+
+
+
+
+
12
+
+
+
+
+
13
+
+
+
+
+
14
+
+
+
+
+
15
+
+
+
+
+
16
+
+
+
+
+
17
+
+
+
+
+
18
+
+
+
+
+
19
+
+
+
+
+
20
+
+
+
+
+
21
+
+
+
+
+
22
+
+
+
+
+
23
+
+
+
+
+
24
+
+
+
+
+
25
+
+
+
+
+
26
+
+
+
+
+
27
+
+
+
+
+
28
+
+
+
+
+
29
+
+
+
+
+
30
+
+
+
+
+
01
+
+
+
+
+
02
+
+
+
+
+
03
+
+
+
+
+
04
+
+
+
+
+
05
+
+
+
+
+
06
+
+
+
+
+
07
+
+
+
+
+
08
+
+
+
+
+
+
+
+
+
+
+
+ +
+ + + + + + + + + + + + +
+
Name
+
+
Age
+
+
+
Tidak ada data
+
+
+
+
+
`; @@ -6034,7 +8078,39 @@ exports[`Locale Provider should display the text as is 1`] = ` -
Name
Age
Engin gögn
+
+
+
+
+
+ +
+ + + + + + + + + + + + +
+
Name
+
+
Age
+
+
+
Engin gögn
+
+
+
+
+
`; @@ -6401,7 +8477,39 @@ exports[`Locale Provider should display the text as it 1`] = ` -
Name
Age
Nessun dato
+
+
+
+
+
+ +
+ + + + + + + + + + + + +
+
Name
+
+
Age
+
+
+
Nessun dato
+
+
+
+
+
`; @@ -6768,7 +8876,39 @@ exports[`Locale Provider should display the text as ja 1`] = ` -
Name
Age
データがありません
+
+
+
+
+
+ +
+ + + + + + + + + + + + +
+
Name
+
+
Age
+
+
+
データがありません
+
+
+
+
+
`; @@ -7135,7 +9275,39 @@ exports[`Locale Provider should display the text as ko 1`] = ` -
Name
Age
데이터 없음
+
+
+
+
+
+ +
+ + + + + + + + + + + + +
+
Name
+
+
Age
+
+
+
데이터 없음
+
+
+
+
+
`; @@ -7502,7 +9674,39 @@ exports[`Locale Provider should display the text as ku-iq 1`] = ` -
Name
Age
Agahî tune
+
+
+
+
+
+ +
+ + + + + + + + + + + + +
+
Name
+
+
Age
+
+
+
Agahî tune
+
+
+
+
+
`; @@ -7869,7 +10073,39 @@ exports[`Locale Provider should display the text as mn-mn 1`] = ` -
Name
Age
Мэдээлэл байхгүй байна
+
+
+
+
+
+ +
+ + + + + + + + + + + + +
+
Name
+
+
Age
+
+
+
Мэдээлэл байхгүй байна
+
+
+
+
+
`; @@ -8236,7 +10472,438 @@ exports[`Locale Provider should display the text as nb 1`] = ` -
Name
Age
Ingen data
+
+
+
+
+
+ +
+ + + + + + + + + + + + +
+
Name
+
+
Age
+
+
+
Ingen data
+
+
+
+
+
+ + +`; + +exports[`Locale Provider should display the text as ne-np 1`] = ` +
+ +
+
+
+ +
+
+
~ Click to confirm +
+
+
0 वस्तु
+ +
+
+
+
0 वस्तु
+ +
+
+
+
+
+
+
+
2017
+
+
+
+
+
+
+
सेप्ट.
+
+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
आ.सो.मं.बु.बि.शु.श.
+
+
27
+
+
+
+
+
28
+
+
+
+
+
29
+
+
+
+
+
30
+
+
+
+
+
31
+
+
+
+
+
01
+
+
+
+
+
02
+
+
+
+
+
03
+
+
+
+
+
04
+
+
+
+
+
05
+
+
+
+
+
06
+
+
+
+
+
07
+
+
+
+
+
08
+
+
+
+
+
09
+
+
+
+
+
10
+
+
+
+
+
11
+
+
+
+
+
12
+
+
+
+
+
13
+
+
+
+
+
14
+
+
+
+
+
15
+
+
+
+
+
16
+
+
+
+
+
17
+
+
+
+
+
18
+
+
+
+
+
19
+
+
+
+
+
20
+
+
+
+
+
21
+
+
+
+
+
22
+
+
+
+
+
23
+
+
+
+
+
24
+
+
+
+
+
25
+
+
+
+
+
26
+
+
+
+
+
27
+
+
+
+
+
28
+
+
+
+
+
29
+
+
+
+
+
30
+
+
+
+
+
01
+
+
+
+
+
02
+
+
+
+
+
03
+
+
+
+
+
04
+
+
+
+
+
05
+
+
+
+
+
06
+
+
+
+
+
07
+
+
+
+
+
+
+
+
+
+
+
+ +
+ + + + + + + + + + + + +
+
Name
+
+
Age
+
+
+
डाटा छैन
+
+
+
+
+
`; @@ -8603,7 +11270,39 @@ exports[`Locale Provider should display the text as nl 1`] = ` -
Name
Age
Geen gegevens
+
+
+
+
+
+ +
+ + + + + + + + + + + + +
+
Name
+
+
Age
+
+
+
Geen gegevens
+
+
+
+
+
`; @@ -8970,7 +11669,39 @@ exports[`Locale Provider should display the text as nl-be 1`] = ` -
Name
Age
Geen gegevens
+
+
+
+
+
+ +
+ + + + + + + + + + + + +
+
Name
+
+
Age
+
+
+
Geen gegevens
+
+
+
+
+
`; @@ -9337,7 +12068,39 @@ exports[`Locale Provider should display the text as pl 1`] = ` -
Name
Age
Brak danych
+
+
+
+
+
+ +
+ + + + + + + + + + + + +
+
Name
+
+
Age
+
+
+
Brak danych
+
+
+
+
+
`; @@ -9704,7 +12467,39 @@ exports[`Locale Provider should display the text as pt 1`] = ` -
Name
Age
Sem resultados
+
+
+
+
+
+ +
+ + + + + + + + + + + + +
+
Name
+
+
Age
+
+
+
Sem resultados
+
+
+
+
+
`; @@ -10071,7 +12866,39 @@ exports[`Locale Provider should display the text as pt-br 1`] = ` -
Name
Age
Não há dados
+
+
+
+
+
+ +
+ + + + + + + + + + + + +
+
Name
+
+
Age
+
+
+
Não há dados
+
+
+
+
+
`; @@ -10438,7 +13265,39 @@ exports[`Locale Provider should display the text as ru 1`] = ` -
Name
Age
Нет данных
+
+
+
+
+
+ +
+ + + + + + + + + + + + +
+
Name
+
+
Age
+
+
+
Нет данных
+
+
+
+
+
`; @@ -10805,7 +13664,39 @@ exports[`Locale Provider should display the text as sk 1`] = ` -
Name
Age
Žiadne dáta
+
+
+
+
+
+ +
+ + + + + + + + + + + + +
+
Name
+
+
Age
+
+
+
Žiadne dáta
+
+
+
+
+
`; @@ -11172,7 +14063,39 @@ exports[`Locale Provider should display the text as sl 1`] = ` -
Name
Age
Ni podatkov
+
+
+
+
+
+ +
+ + + + + + + + + + + + +
+
Name
+
+
Age
+
+
+
Ni podatkov
+
+
+
+
+
`; @@ -11539,7 +14462,39 @@ exports[`Locale Provider should display the text as sr 1`] = ` -
Name
Age
Nema podataka
+
+
+
+
+
+ +
+ + + + + + + + + + + + +
+
Name
+
+
Age
+
+
+
Nema podataka
+
+
+
+
+
`; @@ -11906,7 +14861,39 @@ exports[`Locale Provider should display the text as sv 1`] = ` -
Name
Age
Ingen information
+
+
+
+
+
+ +
+ + + + + + + + + + + + +
+
Name
+
+
Age
+
+
+
Ingen information
+
+
+
+
+
`; @@ -12273,7 +15260,39 @@ exports[`Locale Provider should display the text as th 1`] = ` -
Name
Age
ไม่มีข้อมูล
+
+
+
+
+
+ +
+ + + + + + + + + + + + +
+
Name
+
+
Age
+
+
+
ไม่มีข้อมูล
+
+
+
+
+
`; @@ -12640,7 +15659,39 @@ exports[`Locale Provider should display the text as tr 1`] = ` -
Name
Age
Veri Yok
+
+
+
+
+
+ +
+ + + + + + + + + + + + +
+
Name
+
+
Age
+
+
+
Veri Yok
+
+
+
+
+
`; @@ -13007,7 +16058,39 @@ exports[`Locale Provider should display the text as uk 1`] = ` -
Name
Age
Даних немає
+
+
+
+
+
+ +
+ + + + + + + + + + + + +
+
Name
+
+
Age
+
+
+
Даних немає
+
+
+
+
+
`; @@ -13374,7 +16457,39 @@ exports[`Locale Provider should display the text as vi 1`] = ` -
Name
Age
Trống
+
+
+
+
+
+ +
+ + + + + + + + + + + + +
+
Name
+
+
Age
+
+
+
Trống
+
+
+
+
+
`; @@ -13741,7 +16856,39 @@ exports[`Locale Provider should display the text as zh-cn 1`] = ` -
Name
Age
暂无数据
+
+
+
+
+
+ +
+ + + + + + + + + + + + +
+
Name
+
+
Age
+
+
+
暂无数据
+
+
+
+
+
`; @@ -14108,7 +17255,39 @@ exports[`Locale Provider should display the text as zh-tw 1`] = ` -
Name
Age
目前尚無資料
+
+
+
+
+
+ +
+ + + + + + + + + + + + +
+
Name
+
+
Age
+
+
+
目前尚無資料
+
+
+
+
+
`; diff --git a/components/locale-provider/__tests__/index.test.js b/components/locale-provider/__tests__/index.test.js index f59baf29d..ac432f152 100644 --- a/components/locale-provider/__tests__/index.test.js +++ b/components/locale-provider/__tests__/index.test.js @@ -5,45 +5,93 @@ import moment from 'moment' import MockDate from 'mockdate' import { LocaleProvider, Pagination, DatePicker, TimePicker, Calendar, Popconfirm, Table, Modal, Select, Transfer } from '../..' +import arEG from '../ar_EG' +import bgBG from '../bg_BG' +import caES from '../ca_ES' +import csCZ from '../cs_CZ' +import daDK from '../da_DK' +import deDE from '../de_DE' +import elGR from '../el_GR' import enGB from '../en_GB' -import frFR from '../fr_FR' -import nlBE from '../nl_BE' -import itIT from '../it_IT' import enUS from '../en_US' +import esES from '../es_ES' +import etEE from '../et_EE' +import faIR from '../fa_IR' +import fiFI from '../fi_FI' +import frBE from '../fr_BE' +import frFR from '../fr_FR' +import heIL from '../he_IL' +import huHU from '../hu_HU' +import isIS from '../is_IS' +import itIT from '../it_IT' +import jaJP from '../ja_JP' +import koKR from '../ko_KR' +import kuIQ from '../ku_IQ' +import mnMN from '../mn_MN' +import nbNO from '../nb_NO' +import neNP from '../ne-NP' +import nlBE from '../nl_BE' +import nlNL from '../nl_NL' +import plPL from '../pl_PL' import ptBR from '../pt_BR' import ptPT from '../pt_PT' import ruRU from '../ru_RU' -import esES from '../es_ES' -import svSE from '../sv_SE' -import frBE from '../fr_BE' -import deDE from '../de_DE' -import nlNL from '../nl_NL' -import caES from '../ca_ES' -import csCZ from '../cs_CZ' -import koKR from '../ko_KR' -import etEE from '../et_EE' import skSK from '../sk_SK' -import jaJP from '../ja_JP' -import trTR from '../tr_TR' -import zhTW from '../zh_TW' -import fiFI from '../fi_FI' -import plPL from '../pl_PL' -import bgBG from '../bg_BG' -import viVN from '../vi_VN' -import thTH from '../th_TH' -import faIR from '../fa_IR' -import elGR from '../el_GR' -import nbNO from '../nb_NO' -import srRS from '../sr_RS' import slSI from '../sl_SI' -import isIS from '../is_IS' -import arEG from '../ar_EG' +import srRS from '../sr_RS' +import svSE from '../sv_SE' +import thTH from '../th_TH' +import trTR from '../tr_TR' import ukUA from '../uk_UA' +import viVN from '../vi_VN' +import idID from '../id_ID' import zhCN from '../zh_CN' -import kuIQ from '../ku_IQ' -import mnMN from '../mn_MN' +import zhTW from '../zh_TW' -const locales = [enUS, ptBR, ptPT, ruRU, esES, svSE, frBE, deDE, nlNL, caES, csCZ, koKR, etEE, skSK, jaJP, trTR, zhTW, fiFI, plPL, bgBG, enGB, frFR, nlBE, itIT, viVN, thTH, faIR, elGR, nbNO, srRS, slSI, isIS, arEG, ukUA, zhCN, kuIQ, mnMN] +const locales = [ + arEG, + bgBG, + caES, + csCZ, + daDK, + deDE, + elGR, + enGB, + enUS, + esES, + etEE, + faIR, + fiFI, + frBE, + frFR, + heIL, + huHU, + isIS, + itIT, + jaJP, + koKR, + kuIQ, + mnMN, + nbNO, + neNP, + nlBE, + nlNL, + plPL, + ptBR, + ptPT, + ruRU, + skSK, + slSI, + srRS, + svSE, + thTH, + trTR, + ukUA, + viVN, + idID, + zhCN, + zhTW, +] const { Option } = Select const { RangePicker } = DatePicker diff --git a/components/locale-provider/da_DK.js b/components/locale-provider/da_DK.js new file mode 100644 index 000000000..ea7540a53 --- /dev/null +++ b/components/locale-provider/da_DK.js @@ -0,0 +1,44 @@ +import Pagination from '../vc-pagination/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' + +export default { + locale: 'da', + DatePicker, + TimePicker, + Calendar, + Pagination, + Table: { + filterTitle: 'Filtermenu', + filterConfirm: 'OK', + filterReset: 'Nulstil', + emptyText: 'Ingen data', + selectAll: 'Vælg alle', + selectInvert: 'Inverter valg', + }, + Modal: { + okText: 'OK', + cancelText: 'Afbryd', + justOkText: 'OK', + }, + Popconfirm: { + okText: 'OK', + cancelText: 'Afbryd', + }, + Transfer: { + notFoundContent: 'Intet fundet', + searchPlaceholder: 'Søg her', + itemUnit: 'element', + itemsUnit: 'elementer', + }, + Select: { + notFoundContent: 'Intet fundet', + }, + Upload: { + uploading: 'Uploader...', + removeFile: 'Fjern fil', + uploadError: 'Fejl ved upload', + previewFile: 'Forhåndsvisning', + }, +} diff --git a/components/locale-provider/default.js b/components/locale-provider/default.js index b11a453e8..3c6bca897 100644 --- a/components/locale-provider/default.js +++ b/components/locale-provider/default.js @@ -9,6 +9,10 @@ export default { DatePicker, TimePicker, Calendar, + // locales for all comoponents + global: { + placeholder: 'Please select', + }, Table: { filterTitle: 'Filter menu', filterConfirm: 'OK', diff --git a/components/locale-provider/fi_FI.js b/components/locale-provider/fi_FI.js index 9bbfb6033..2b3279de0 100644 --- a/components/locale-provider/fi_FI.js +++ b/components/locale-provider/fi_FI.js @@ -16,6 +16,7 @@ export default { emptyText: 'Ei kohteita', selectAll: 'Valitse kaikki', selectInvert: 'Valitse päinvastoin', + sortTitle: 'Lajittele', }, Modal: { okText: 'OK', diff --git a/components/locale-provider/he_IL.js b/components/locale-provider/he_IL.js new file mode 100644 index 000000000..a90ad4dd6 --- /dev/null +++ b/components/locale-provider/he_IL.js @@ -0,0 +1,44 @@ +import Pagination from '../vc-pagination/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' + +export default { + locale: 'he', + Pagination, + DatePicker, + TimePicker, + Calendar, + Table: { + filterTitle: 'תפריט סינון', + filterConfirm: 'אישור', + filterReset: 'איפוס', + emptyText: 'אין מידע', + selectAll: 'בחר הכל', + selectInvert: 'הפוך בחירה', + }, + Modal: { + okText: 'אישור', + cancelText: 'ביטול', + justOkText: 'אישור', + }, + Popconfirm: { + okText: 'אישור', + cancelText: 'ביטול', + }, + Transfer: { + notFoundContent: 'לא נמצא', + searchPlaceholder: 'חפש כאן', + itemUnit: 'פריט', + itemsUnit: 'פריטים', + }, + Select: { + notFoundContent: 'לא נמצא', + }, + Upload: { + uploading: 'מעלה...', + removeFile: 'הסר קובץ', + uploadError: 'שגיאת העלאה', + previewFile: 'הצג קובץ', + }, +} diff --git a/components/locale-provider/hu_HU.js b/components/locale-provider/hu_HU.js new file mode 100644 index 000000000..b9c387529 --- /dev/null +++ b/components/locale-provider/hu_HU.js @@ -0,0 +1,45 @@ +import Pagination from '../vc-pagination/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' + +export default { + locale: 'hu', + Pagination, + DatePicker, + TimePicker, + Calendar, + Table: { + filterTitle: 'Szűrők', + filterConfirm: 'Alkalmazás', + filterReset: 'Visszaállítás', + emptyText: 'Nincs adat', + selectAll: 'Jelenlegi oldal kiválasztása', + selectInvert: 'Jelenlegi oldal inverze', + sortTitle: 'Rendezés', + }, + Modal: { + okText: 'Alkalmazás', + cancelText: 'Visszavonás', + justOkText: 'Alkalmazás', + }, + Popconfirm: { + okText: 'Alkalmazás', + cancelText: 'Visszavonás', + }, + Transfer: { + notFoundContent: 'Nem található', + searchPlaceholder: 'Keresés', + itemUnit: 'elem', + itemsUnit: 'elemek', + }, + Select: { + notFoundContent: 'Nem található', + }, + Upload: { + uploading: 'Feltöltés...', + removeFile: 'Fájl eltávolítása', + uploadError: 'Feltöltési hiba', + previewFile: 'Fájl előnézet', + }, +} diff --git a/components/locale-provider/id_ID.js b/components/locale-provider/id_ID.js new file mode 100644 index 000000000..1bc4d2d7a --- /dev/null +++ b/components/locale-provider/id_ID.js @@ -0,0 +1,46 @@ +import Pagination from '../vc-pagination/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' + +export default { + locale: 'id', + Pagination, + DatePicker, + TimePicker, + Calendar, + Table: { + filterTitle: 'Menu filter', + filterConfirm: 'baik', + filterReset: 'Setel ulang', + emptyText: 'Tidak ada data', + selectAll: 'Pilih halaman saat ini', + selectInvert: 'Balikkan halaman saat ini', + sortTitle: 'Menyortir', + }, + Modal: { + okText: 'baik', + cancelText: 'Membatalkan', + justOkText: 'baik', + }, + Popconfirm: { + okText: 'baik', + cancelText: 'Membatalkan', + }, + Transfer: { + titles: ['', ''], + notFoundContent: 'Tidak ditemukan', + searchPlaceholder: 'Cari di sini', + itemUnit: 'barang', + itemsUnit: 'item', + }, + Select: { + notFoundContent: 'Tidak ditemukan', + }, + Upload: { + uploading: 'Mengunggah...', + removeFile: 'Hapus file', + uploadError: 'Kesalahan pengunggahan', + previewFile: 'File pratinjau', + }, +} diff --git a/components/locale-provider/index.en-US.md b/components/locale-provider/index.en-US.md index a958034e1..049a64fff 100644 --- a/components/locale-provider/index.en-US.md +++ b/components/locale-provider/index.en-US.md @@ -15,7 +15,10 @@