Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
feat: add is_IS locale (#7561)
  • Loading branch information
paunovic-stefan authored and benjycui committed Sep 12, 2017
1 parent 7bee69a commit 0ac7cca
Show file tree
Hide file tree
Showing 6 changed files with 76 additions and 1 deletion.
2 changes: 2 additions & 0 deletions components/calendar/locale/is_IS.tsx
@@ -0,0 +1,2 @@
import is_IS from '../../date-picker/locale/is_IS';
export default is_IS;
19 changes: 19 additions & 0 deletions components/date-picker/locale/is_IS.tsx
@@ -0,0 +1,19 @@
import CalendarLocale from 'rc-calendar/lib/locale/is_IS';
import TimePickerLocale from '../../time-picker/locale/is_IS';

// Merge into a locale object
const locale = {
lang: {
placeholder: 'Veldu dag',
rangePlaceholder: ['Upphafsdagur', 'Lokadagur'],
...CalendarLocale,
},
timePickerLocale: {
...TimePickerLocale,
},
};

// All settings at:
// https://github.com/ant-design/ant-design/blob/master/components/date-picker/locale/example.json

export default locale;
3 changes: 2 additions & 1 deletion components/locale-provider/__tests__/index.test.js
Expand Up @@ -32,8 +32,9 @@ import faIR from '../fa_IR';
import elGR from '../el_GR';
import nbNO from '../nb_NO';
import srRS from '../sr_RS';
import isIS from '../is_IS';

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, srRS];
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, srRS, isIS];

const Option = Select.Option;
const RangePicker = DatePicker.RangePicker;
Expand Down
47 changes: 47 additions & 0 deletions components/locale-provider/is_IS.tsx
@@ -0,0 +1,47 @@
import moment from 'moment';
moment.locale('is');

import Pagination from 'rc-pagination/lib/locale/is_IS';
import DatePicker from '../date-picker/locale/is_IS';
import TimePicker from '../time-picker/locale/is_IS';
import Calendar from '../calendar/locale/is_IS';

export default {
locale: 'is',
Pagination,
DatePicker,
TimePicker,
Calendar,
Table: {
filterTitle: 'Afmarkanir',
filterConfirm: 'Staðfesta',
filterReset: 'Núllstilla',
emptyText: 'Engin gögn',
selectAll: 'Velja allt',
selectInvert: 'Viðsnúa vali',
},
Modal: {
okText: 'Áfram',
cancelText: 'Hætta við',
justOkText: 'Í lagi',
},
Popconfirm: {
okText: 'Áfram',
cancelText: 'Hætta við',
},
Transfer: {
notFoundContent: 'Engar færslur',
searchPlaceholder: 'Leita hér',
itemUnit: 'færsla',
itemsUnit: 'færslur',
},
Select: {
notFoundContent: 'Ekkert finnst',
},
Upload: {
uploading: 'Hleð upp...',
removeFile: 'Fjarlægja skrá',
uploadError: 'Villa við að hlaða upp',
previewFile: 'Forskoða skrá',
},
};
5 changes: 5 additions & 0 deletions components/time-picker/locale/is_IS.tsx
@@ -0,0 +1,5 @@
const locale = {
placeholder: 'Velja tíma',
};

export default locale;
1 change: 1 addition & 0 deletions docs/react/i18n.en-US.md
Expand Up @@ -40,6 +40,7 @@ Supported languages:
|French (Belgium)|fr_BE|
|French (France)|fr_FR|
|German|de_DE|
|Icelandic|is_IS|
|Italian|it_IT|
|Japanese|ja_JP|
|Korean|ko_KR|
Expand Down

0 comments on commit 0ac7cca

Please sign in to comment.