Merge pull request #6344 from damiangreen/master

Add en-GB, it-IT, fr-FR + nl_BE locales
This commit is contained in:
偏右 2017-06-05 18:05:22 +08:00 committed by GitHub
commit 920b32e94c
18 changed files with 282 additions and 2 deletions

View File

@ -0,0 +1,2 @@
import en_GB from '../../date-picker/locale/en_GB';
export default en_GB;

View File

@ -0,0 +1,2 @@
import fr_FR from '../../date-picker/locale/fr_FR';
export default fr_FR;

View File

@ -0,0 +1,2 @@
import it_IT from '../../date-picker/locale/it_IT';
export default it_IT;

View File

@ -0,0 +1,2 @@
import nl_BE from '../../date-picker/locale/nl_BE';
export default nl_BE;

View 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;

View 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;

View 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;

View 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;

View File

@ -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;

View 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',
},
};

View 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',
},
};

View 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',
},
};

View 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',
},
};

View File

@ -0,0 +1,5 @@
const locale = {
placeholder: 'Select time',
};
export default locale;

View File

@ -0,0 +1,5 @@
const locale = {
placeholder: 'Sélectionner l\'heure',
};
export default locale;

View File

@ -0,0 +1,5 @@
const locale = {
placeholder: 'Selezionare il tempo',
};
export default locale;

View File

@ -0,0 +1,5 @@
const locale = {
placeholder: 'Selecteer tijd',
};
export default locale;

View File

@ -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",