mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-18 03:14:07 +08:00
feat: Added Dutch locale and bumped dep versions so they include Dutch locales (#4785)
* Added Dutch locale and bumped dep versions so they include Dutch locales Bumped versions so they include Dutch locales - rc-calendar to ~7.6.2 - rc-pagination to ~1.6.6 * Added dutch locale to LocaleProvider test
This commit is contained in:
parent
c670ff2448
commit
28961856aa
2
components/calendar/locale/nl_NL.tsx
Normal file
2
components/calendar/locale/nl_NL.tsx
Normal file
@ -0,0 +1,2 @@
|
||||
import nl_NL from '../../date-picker/locale/nl_NL';
|
||||
export default nl_NL;
|
17
components/date-picker/locale/nl_NL.tsx
Normal file
17
components/date-picker/locale/nl_NL.tsx
Normal file
@ -0,0 +1,17 @@
|
||||
import CalendarLocale from 'rc-calendar/lib/locale/nl_NL';
|
||||
import TimePickerLocale from '../../time-picker/locale/nl_NL';
|
||||
import assign from 'object-assign';
|
||||
|
||||
// 统一合并为完整的 Locale
|
||||
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;
|
@ -10,6 +10,7 @@ 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';
|
||||
|
||||
const Option = Select.Option;
|
||||
const RangePicker = DatePicker.RangePicker;
|
||||
@ -55,7 +56,7 @@ const App = () => (
|
||||
|
||||
describe('Locale Provider', () => {
|
||||
it('should display the text as locale changed', () => {
|
||||
[enUS, ptBR, ruRU, esES, svSE, frBE, deDE].forEach((locale) => {
|
||||
[enUS, ptBR, ruRU, esES, svSE, frBE, deDE, nlNL].forEach((locale) => {
|
||||
const wrapper = mount(
|
||||
<LocaleProvider locale={locale}>
|
||||
<App />
|
||||
|
39
components/locale-provider/nl_NL.tsx
Normal file
39
components/locale-provider/nl_NL.tsx
Normal file
@ -0,0 +1,39 @@
|
||||
import moment from 'moment';
|
||||
moment.locale('nl');
|
||||
|
||||
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';
|
||||
|
||||
export default {
|
||||
locale: 'nl',
|
||||
Pagination,
|
||||
DatePicker,
|
||||
TimePicker,
|
||||
Calendar,
|
||||
Table: {
|
||||
filterTitle: 'Filter Menu',
|
||||
filterConfirm: 'OK',
|
||||
filterReset: 'Reset',
|
||||
emptyText: 'Geen gegevens',
|
||||
},
|
||||
Modal: {
|
||||
okText: 'OK',
|
||||
cancelText: 'Annuleren',
|
||||
justOkText: 'OK',
|
||||
},
|
||||
Popconfirm: {
|
||||
okText: 'OK',
|
||||
cancelText: 'Annuleren',
|
||||
},
|
||||
Transfer: {
|
||||
notFoundContent: 'Niet gevonden',
|
||||
searchPlaceholder: 'Zoeken',
|
||||
itemUnit: 'item',
|
||||
itemsUnit: 'items',
|
||||
},
|
||||
Select: {
|
||||
notFoundContent: 'Niet gevonden',
|
||||
},
|
||||
};
|
5
components/time-picker/locale/nl_NL.tsx
Normal file
5
components/time-picker/locale/nl_NL.tsx
Normal file
@ -0,0 +1,5 @@
|
||||
const locale = {
|
||||
placeholder: 'Selecteer tijd',
|
||||
};
|
||||
|
||||
export default locale;
|
@ -41,7 +41,7 @@
|
||||
"object-assign": "~4.1.0",
|
||||
"omit.js": "^0.1.0",
|
||||
"rc-animate": "~2.3.0",
|
||||
"rc-calendar": "~7.6.0",
|
||||
"rc-calendar": "~7.6.2",
|
||||
"rc-cascader": "~0.11.0",
|
||||
"rc-checkbox": "~1.4.0",
|
||||
"rc-collapse": "~1.6.4",
|
||||
@ -52,7 +52,7 @@
|
||||
"rc-input-number": "~3.0.0",
|
||||
"rc-menu": "~5.0.9",
|
||||
"rc-notification": "~1.3.4",
|
||||
"rc-pagination": "~1.6.0",
|
||||
"rc-pagination": "~1.6.6",
|
||||
"rc-progress": "~2.0.1",
|
||||
"rc-radio": "~2.0.0",
|
||||
"rc-rate": "~1.1.2",
|
||||
|
Loading…
Reference in New Issue
Block a user