Browse Source
* locale: Add Norwegian Bokmål locales to Ant Design * Add Vemund Santi to authors. * docs: add Norwegian to list of i18n language examples * test: add tests for Norwegian Bokmål * Update dependencies. Use locales from rc-pagination.pull/7129/merge
Vemund Santi
7 years ago
committed by
偏右
9 changed files with 79 additions and 2 deletions
@ -0,0 +1,2 @@ |
|||
import nb_NO from '../../date-picker/locale/nb_NO'; |
|||
export default nb_NO; |
@ -0,0 +1,19 @@ |
|||
import CalendarLocale from 'rc-calendar/lib/locale/nb_NO'; |
|||
import TimePickerLocale from '../../time-picker/locale/nb_NO'; |
|||
|
|||
// Merge into a locale object
|
|||
const locale = { |
|||
lang: { |
|||
placeholder: 'Velg dato', |
|||
rangePlaceholder: ['Startdato', 'Sluttdato'], |
|||
...CalendarLocale, |
|||
}, |
|||
timePickerLocale: { |
|||
...TimePickerLocale, |
|||
}, |
|||
}; |
|||
|
|||
// All settings at:
|
|||
// https://github.com/ant-design/ant-design/blob/master/components/date-picker/locale/example.json
|
|||
|
|||
export default locale; |
@ -0,0 +1,47 @@ |
|||
import moment from 'moment'; |
|||
moment.locale('nb'); |
|||
|
|||
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'; |
|||
|
|||
export default { |
|||
locale: 'nb', |
|||
DatePicker, |
|||
TimePicker, |
|||
Calendar, |
|||
Pagination, |
|||
Table: { |
|||
filterTitle: 'Filtermeny', |
|||
filterConfirm: 'OK', |
|||
filterReset: 'Nullstill', |
|||
emptyText: 'Ingen data', |
|||
selectAll: 'Velg alle', |
|||
selectInvert: 'Inverter valg', |
|||
}, |
|||
Modal: { |
|||
okText: 'OK', |
|||
cancelText: 'Avbryt', |
|||
justOkText: 'OK', |
|||
}, |
|||
Popconfirm: { |
|||
okText: 'OK', |
|||
cancelText: 'Avbryt', |
|||
}, |
|||
Transfer: { |
|||
notFoundContent: 'Ingen treff', |
|||
searchPlaceholder: 'Søk her', |
|||
itemUnit: 'element', |
|||
itemsUnit: 'elementer', |
|||
}, |
|||
Select: { |
|||
notFoundContent: 'Ingen treff', |
|||
}, |
|||
Upload: { |
|||
uploading: 'Laster opp...', |
|||
removeFile: 'Fjern fil', |
|||
uploadError: 'Feil ved opplastning', |
|||
previewFile: 'Forhåndsvisning', |
|||
}, |
|||
}; |
@ -0,0 +1,5 @@ |
|||
const locale = { |
|||
placeholder: 'Velg tid', |
|||
}; |
|||
|
|||
export default locale; |
Loading…
Reference in new issue