mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-11-30 02:59:04 +08:00
Locale/nb-NO (#7122)
* 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.
This commit is contained in:
parent
94d46e4c01
commit
b69a6886d7
@ -141,6 +141,7 @@ Tino D <ginodeis@gmail.com>
|
|||||||
Tyler <chaotyler@gmail.com>
|
Tyler <chaotyler@gmail.com>
|
||||||
Vadim Macagon <vadim.macagon@gmail.com>
|
Vadim Macagon <vadim.macagon@gmail.com>
|
||||||
Valentin Vichnal <valentin@vichnal.com>
|
Valentin Vichnal <valentin@vichnal.com>
|
||||||
|
Vemund Santi <veund@santi.no>
|
||||||
Vincent Zhang <vxzhong@qq.com>
|
Vincent Zhang <vxzhong@qq.com>
|
||||||
Walter Barbagallo <turbometalskater@gmail.com>
|
Walter Barbagallo <turbometalskater@gmail.com>
|
||||||
Warren Seymour <warren@fountainhead.tech>
|
Warren Seymour <warren@fountainhead.tech>
|
||||||
|
2
components/calendar/locale/nb_NO.tsx
Normal file
2
components/calendar/locale/nb_NO.tsx
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
import nb_NO from '../../date-picker/locale/nb_NO';
|
||||||
|
export default nb_NO;
|
19
components/date-picker/locale/nb_NO.tsx
Normal file
19
components/date-picker/locale/nb_NO.tsx
Normal file
@ -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;
|
@ -30,8 +30,9 @@ import viVN from '../vi_VN';
|
|||||||
import thTH from '../th_TH';
|
import thTH from '../th_TH';
|
||||||
import faIR from '../fa_IR';
|
import faIR from '../fa_IR';
|
||||||
import elGR from '../el_GR';
|
import elGR from '../el_GR';
|
||||||
|
import nbNO from '../nb_NO';
|
||||||
|
|
||||||
const locales = [enUS, ptBR, 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];
|
const locales = [enUS, ptBR, 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];
|
||||||
|
|
||||||
const Option = Select.Option;
|
const Option = Select.Option;
|
||||||
const RangePicker = DatePicker.RangePicker;
|
const RangePicker = DatePicker.RangePicker;
|
||||||
|
47
components/locale-provider/nb_NO.tsx
Normal file
47
components/locale-provider/nb_NO.tsx
Normal file
@ -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',
|
||||||
|
},
|
||||||
|
};
|
5
components/time-picker/locale/nb_NO.tsx
Normal file
5
components/time-picker/locale/nb_NO.tsx
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
const locale = {
|
||||||
|
placeholder: 'Velg tid',
|
||||||
|
};
|
||||||
|
|
||||||
|
export default locale;
|
@ -43,6 +43,7 @@ Supported languages:
|
|||||||
|Italian|it_IT|
|
|Italian|it_IT|
|
||||||
|Japanese|ja_JP|
|
|Japanese|ja_JP|
|
||||||
|Korean|ko_KR|
|
|Korean|ko_KR|
|
||||||
|
|Norwegian|nb_NO|
|
||||||
|Persian|fa_IR|
|
|Persian|fa_IR|
|
||||||
|Polish|pl_PL|
|
|Polish|pl_PL|
|
||||||
|Portuguese (Brazil)|pt_BR|
|
|Portuguese (Brazil)|pt_BR|
|
||||||
|
@ -41,6 +41,7 @@ return (
|
|||||||
|意大利语|it_IT|
|
|意大利语|it_IT|
|
||||||
|日语|ja_JP|
|
|日语|ja_JP|
|
||||||
|韩语/朝鲜语|ko_KR|
|
|韩语/朝鲜语|ko_KR|
|
||||||
|
|挪威|nb_NO|
|
||||||
|波斯语|fa_IR|
|
|波斯语|fa_IR|
|
||||||
|波兰语|pl_PL|
|
|波兰语|pl_PL|
|
||||||
|葡萄牙语|pt_BR|
|
|葡萄牙语|pt_BR|
|
||||||
|
@ -57,7 +57,7 @@
|
|||||||
"rc-input-number": "~3.6.0",
|
"rc-input-number": "~3.6.0",
|
||||||
"rc-menu": "~5.0.10",
|
"rc-menu": "~5.0.10",
|
||||||
"rc-notification": "~2.0.0",
|
"rc-notification": "~2.0.0",
|
||||||
"rc-pagination": "~1.10.0",
|
"rc-pagination": "~1.10.6",
|
||||||
"rc-progress": "~2.1.2",
|
"rc-progress": "~2.1.2",
|
||||||
"rc-rate": "~2.1.1",
|
"rc-rate": "~2.1.1",
|
||||||
"rc-select": "~6.8.6",
|
"rc-select": "~6.8.6",
|
||||||
|
Loading…
Reference in New Issue
Block a user