mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-11-30 11:08:45 +08:00
Merge pull request #6344 from damiangreen/master
Add en-GB, it-IT, fr-FR + nl_BE locales
This commit is contained in:
commit
920b32e94c
2
components/calendar/locale/en_GB.tsx
Normal file
2
components/calendar/locale/en_GB.tsx
Normal file
@ -0,0 +1,2 @@
|
||||
import en_GB from '../../date-picker/locale/en_GB';
|
||||
export default en_GB;
|
2
components/calendar/locale/fr_FR.tsx
Normal file
2
components/calendar/locale/fr_FR.tsx
Normal file
@ -0,0 +1,2 @@
|
||||
import fr_FR from '../../date-picker/locale/fr_FR';
|
||||
export default fr_FR;
|
2
components/calendar/locale/it_IT.tsx
Normal file
2
components/calendar/locale/it_IT.tsx
Normal file
@ -0,0 +1,2 @@
|
||||
import it_IT from '../../date-picker/locale/it_IT';
|
||||
export default it_IT;
|
2
components/calendar/locale/nl_BE.tsx
Normal file
2
components/calendar/locale/nl_BE.tsx
Normal file
@ -0,0 +1,2 @@
|
||||
import nl_BE from '../../date-picker/locale/nl_BE';
|
||||
export default nl_BE;
|
17
components/date-picker/locale/en_GB.tsx
Normal file
17
components/date-picker/locale/en_GB.tsx
Normal file
@ -0,0 +1,17 @@
|
||||
import CalendarLocale from 'rc-calendar/lib/locale/en_GB';
|
||||
import TimePickerLocale from '../../time-picker/locale/en_GB';
|
||||
import assign from 'object-assign';
|
||||
|
||||
// Merge into a locale object
|
||||
const locale = {
|
||||
lang: assign({
|
||||
placeholder: 'Select date',
|
||||
rangePlaceholder: ['Start date', 'End date'],
|
||||
}, CalendarLocale),
|
||||
timePickerLocale: assign({}, TimePickerLocale),
|
||||
};
|
||||
|
||||
// All settings at:
|
||||
// https://github.com/ant-design/ant-design/blob/master/components/date-picker/locale/example.json
|
||||
|
||||
export default locale;
|
17
components/date-picker/locale/fr_FR.tsx
Normal file
17
components/date-picker/locale/fr_FR.tsx
Normal file
@ -0,0 +1,17 @@
|
||||
import CalendarLocale from 'rc-calendar/lib/locale/fr_FR';
|
||||
import TimePickerLocale from '../../time-picker/locale/fr_FR';
|
||||
import assign from 'object-assign';
|
||||
|
||||
// Merge into a locale object
|
||||
const locale = {
|
||||
lang: assign({
|
||||
placeholder: 'Sélectionner une date',
|
||||
rangePlaceholder: ['Date de début', 'Date de fin'],
|
||||
}, CalendarLocale),
|
||||
timePickerLocale: assign({}, TimePickerLocale),
|
||||
};
|
||||
|
||||
// All settings at:
|
||||
// https://github.com/ant-design/ant-design/issues/424
|
||||
|
||||
export default locale;
|
17
components/date-picker/locale/it_IT.tsx
Normal file
17
components/date-picker/locale/it_IT.tsx
Normal file
@ -0,0 +1,17 @@
|
||||
import CalendarLocale from 'rc-calendar/lib/locale/it_IT';
|
||||
import TimePickerLocale from '../../time-picker/locale/it_IT';
|
||||
import assign from 'object-assign';
|
||||
|
||||
// Merge into a locale object
|
||||
const locale = {
|
||||
lang: assign({
|
||||
placeholder: 'Selezionare la data',
|
||||
rangePlaceholder: ['Data d\'inizio', 'Data di fine'],
|
||||
}, CalendarLocale),
|
||||
timePickerLocale: assign({}, TimePickerLocale),
|
||||
};
|
||||
|
||||
// All settings at:
|
||||
// https://github.com/ant-design/ant-design/issues/424
|
||||
|
||||
export default locale;
|
17
components/date-picker/locale/nl_BE.tsx
Normal file
17
components/date-picker/locale/nl_BE.tsx
Normal file
@ -0,0 +1,17 @@
|
||||
import CalendarLocale from 'rc-calendar/lib/locale/nl_BE';
|
||||
import TimePickerLocale from '../../time-picker/locale/nl_BE';
|
||||
import assign from 'object-assign';
|
||||
|
||||
// Merge into a locale object
|
||||
const locale = {
|
||||
lang: assign({
|
||||
placeholder: 'Selecteer datum',
|
||||
rangePlaceholder: ['Begin datum', 'Eind datum'],
|
||||
}, CalendarLocale),
|
||||
timePickerLocale: assign({}, TimePickerLocale),
|
||||
};
|
||||
|
||||
// All settings at:
|
||||
// https://github.com/ant-design/ant-design/issues/424
|
||||
|
||||
export default locale;
|
@ -3,6 +3,10 @@ import { mount } from 'enzyme';
|
||||
import moment from 'moment';
|
||||
import { LocaleProvider, Pagination, DatePicker, TimePicker, Calendar,
|
||||
Popconfirm, Table, Modal, Select, Transfer } from '../../';
|
||||
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 ptBR from '../pt_BR';
|
||||
import ruRU from '../ru_RU';
|
||||
@ -22,7 +26,7 @@ import zhTW from '../zh_TW';
|
||||
import fiFI from '../fi_FI';
|
||||
import bgBG from '../bg_BG';
|
||||
|
||||
const locales = [enUS, ptBR, ruRU, esES, svSE, frBE, deDE, nlNL, caES, csCZ, koKR, etEE, skSK, jaJP, trTR, zhTW, fiFI, bgBG];
|
||||
const locales = [enUS, ptBR, ruRU, esES, svSE, frBE, deDE, nlNL, caES, csCZ, koKR, etEE, skSK, jaJP, trTR, zhTW, fiFI, bgBG, enGB, frFR, nlBE, itIT];
|
||||
|
||||
const Option = Select.Option;
|
||||
const RangePicker = DatePicker.RangePicker;
|
||||
|
47
components/locale-provider/en_GB.tsx
Normal file
47
components/locale-provider/en_GB.tsx
Normal file
@ -0,0 +1,47 @@
|
||||
import moment from 'moment';
|
||||
moment.locale('en-gb');
|
||||
|
||||
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';
|
||||
|
||||
export default {
|
||||
locale: 'en-gb',
|
||||
Pagination,
|
||||
DatePicker,
|
||||
TimePicker,
|
||||
Calendar,
|
||||
Table: {
|
||||
filterTitle: 'Filter Menu',
|
||||
filterConfirm: 'OK',
|
||||
filterReset: 'Reset',
|
||||
emptyText: 'No Data',
|
||||
selectAll: 'Select Current Page',
|
||||
selectInvert: 'Select Invert',
|
||||
},
|
||||
Modal: {
|
||||
okText: 'OK',
|
||||
cancelText: 'Cancel',
|
||||
justOkText: 'OK',
|
||||
},
|
||||
Popconfirm: {
|
||||
okText: 'OK',
|
||||
cancelText: 'Cancel',
|
||||
},
|
||||
Transfer: {
|
||||
notFoundContent: 'Not Found',
|
||||
searchPlaceholder: 'Search here',
|
||||
itemUnit: 'item',
|
||||
itemsUnit: 'items',
|
||||
},
|
||||
Select: {
|
||||
notFoundContent: 'Not Found',
|
||||
},
|
||||
Upload: {
|
||||
uploading: 'Uploading...',
|
||||
removeFile: 'Remove file',
|
||||
uploadError: 'Upload error',
|
||||
previewFile: 'Preview file',
|
||||
},
|
||||
};
|
39
components/locale-provider/fr_FR.tsx
Normal file
39
components/locale-provider/fr_FR.tsx
Normal file
@ -0,0 +1,39 @@
|
||||
import moment from 'moment';
|
||||
moment.locale('fr');
|
||||
|
||||
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';
|
||||
|
||||
export default {
|
||||
locale: 'fr',
|
||||
Pagination,
|
||||
DatePicker,
|
||||
TimePicker,
|
||||
Calendar,
|
||||
Table: {
|
||||
filterTitle: 'Filtrer',
|
||||
filterConfirm: 'OK',
|
||||
filterReset: 'Réinitialiser',
|
||||
emptyText: 'Aucune donnée',
|
||||
},
|
||||
Modal: {
|
||||
okText: 'OK',
|
||||
cancelText: 'Annuler',
|
||||
justOkText: 'OK',
|
||||
},
|
||||
Popconfirm: {
|
||||
okText: 'OK',
|
||||
cancelText: 'Annuler',
|
||||
},
|
||||
Transfer: {
|
||||
notFoundContent: 'Pas de résultat',
|
||||
searchPlaceholder: 'Recherche',
|
||||
itemUnit: 'élément',
|
||||
itemsUnit: 'éléments',
|
||||
},
|
||||
Select: {
|
||||
notFoundContent: 'Pas de résultat',
|
||||
},
|
||||
};
|
47
components/locale-provider/it_IT.tsx
Normal file
47
components/locale-provider/it_IT.tsx
Normal file
@ -0,0 +1,47 @@
|
||||
import moment from 'moment';
|
||||
moment.locale('it');
|
||||
|
||||
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';
|
||||
|
||||
export default {
|
||||
locale: 'it',
|
||||
Pagination,
|
||||
DatePicker,
|
||||
TimePicker,
|
||||
Calendar,
|
||||
Table: {
|
||||
filterTitle: 'Menu Filtro',
|
||||
filterConfirm: 'OK',
|
||||
filterReset: 'Reset',
|
||||
emptyText: 'Nessun dato',
|
||||
selectAll: 'Seleziona pagina corrente',
|
||||
selectInvert: 'Selezionare Inverti',
|
||||
},
|
||||
Modal: {
|
||||
okText: 'OK',
|
||||
cancelText: 'Annulla',
|
||||
justOkText: 'OK',
|
||||
},
|
||||
Popconfirm: {
|
||||
okText: 'OK',
|
||||
cancelText: 'Annulla',
|
||||
},
|
||||
Transfer: {
|
||||
notFoundContent: 'Non trovato',
|
||||
searchPlaceholder: 'Cerca qui',
|
||||
itemUnit: 'articolo',
|
||||
itemsUnit: 'elementi',
|
||||
},
|
||||
Select: {
|
||||
notFoundContent: 'Non trovato',
|
||||
},
|
||||
Upload: {
|
||||
uploading: 'Caricamento...',
|
||||
removeFile: 'Rimuovi il file',
|
||||
uploadError: 'Errore di caricamento',
|
||||
previewFile: 'Anteprima file',
|
||||
},
|
||||
};
|
47
components/locale-provider/nl_BE.tsx
Normal file
47
components/locale-provider/nl_BE.tsx
Normal file
@ -0,0 +1,47 @@
|
||||
import moment from 'moment';
|
||||
moment.locale('nl-be');
|
||||
|
||||
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';
|
||||
|
||||
export default {
|
||||
locale: 'nl-be',
|
||||
Pagination,
|
||||
DatePicker,
|
||||
TimePicker,
|
||||
Calendar,
|
||||
Table: {
|
||||
filterTitle: 'FilterMenu',
|
||||
filterConfirm: 'OK',
|
||||
filterReset: 'Reset',
|
||||
emptyText: 'Geen gegevens',
|
||||
selectAll: 'Selecteer huidige pagina',
|
||||
selectInvert: 'Selecteer huidige pagina',
|
||||
},
|
||||
Modal: {
|
||||
okText: 'OK',
|
||||
cancelText: 'Annuleer',
|
||||
justOkText: 'OK',
|
||||
},
|
||||
Popconfirm: {
|
||||
okText: 'OK',
|
||||
cancelText: 'Annuleer',
|
||||
},
|
||||
Transfer: {
|
||||
notFoundContent: 'Niet gevonden',
|
||||
searchPlaceholder: 'Zoek hier',
|
||||
itemUnit: 'item',
|
||||
itemsUnit: 'items',
|
||||
},
|
||||
Select: {
|
||||
notFoundContent: 'Niet gevonden',
|
||||
},
|
||||
Upload: {
|
||||
uploading: 'Uploaden...',
|
||||
removeFile: 'Bestand verwijderen',
|
||||
uploadError: 'Upload fout',
|
||||
previewFile: 'Preview bestand',
|
||||
},
|
||||
};
|
5
components/time-picker/locale/en_GB.tsx
Normal file
5
components/time-picker/locale/en_GB.tsx
Normal file
@ -0,0 +1,5 @@
|
||||
const locale = {
|
||||
placeholder: 'Select time',
|
||||
};
|
||||
|
||||
export default locale;
|
5
components/time-picker/locale/fr_FR.tsx
Normal file
5
components/time-picker/locale/fr_FR.tsx
Normal file
@ -0,0 +1,5 @@
|
||||
const locale = {
|
||||
placeholder: 'Sélectionner l\'heure',
|
||||
};
|
||||
|
||||
export default locale;
|
5
components/time-picker/locale/it_IT.tsx
Normal file
5
components/time-picker/locale/it_IT.tsx
Normal file
@ -0,0 +1,5 @@
|
||||
const locale = {
|
||||
placeholder: 'Selezionare il tempo',
|
||||
};
|
||||
|
||||
export default locale;
|
5
components/time-picker/locale/nl_BE.tsx
Normal file
5
components/time-picker/locale/nl_BE.tsx
Normal file
@ -0,0 +1,5 @@
|
||||
const locale = {
|
||||
placeholder: 'Selecteer tijd',
|
||||
};
|
||||
|
||||
export default locale;
|
@ -58,7 +58,7 @@
|
||||
"rc-input-number": "~3.4.4",
|
||||
"rc-menu": "~5.0.9",
|
||||
"rc-notification": "~1.4.0",
|
||||
"rc-pagination": "~1.9.2",
|
||||
"rc-pagination": "~1.9.4",
|
||||
"rc-progress": "~2.1.0",
|
||||
"rc-rate": "~2.1.0",
|
||||
"rc-select": "~6.8.0",
|
||||
|
Loading…
Reference in New Issue
Block a user