Skip to content

Commit

Permalink
temp(*): change locale keys
Browse files Browse the repository at this point in the history
  • Loading branch information
myronliu347 committed Feb 22, 2019
1 parent ecd4a15 commit d6a9afc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/locale/ja-jp.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ export default {
prevMonth: '前の月',
nextMonth: '来月',
prevDecade: '前の十年',
nextDecade: '次の十年'
nextDecade: '次の十年',
yearSelectAriaLabel: '年を選んで',
monthSelectAriaLabel: '月を選択し'
},
DatePicker: {
placeholder: '日付けの選択',
Expand Down Expand Up @@ -57,9 +59,7 @@ export default {
labelNext: '次のページ、当面の第{current}ページ',
inputAriaLabel: '数ページまでジャンプしてください',
selectAriaLabel: 'ページごとに数本表示してください',
pageSize: 'ページサイズ:',
yearSelectAriaLabel: '年を選んで',
monthSelectAriaLabel: '月を選択し'
pageSize: 'ページサイズ:'
},
Input: {
clear: 'クリア'
Expand Down
3 changes: 2 additions & 1 deletion test/locale/index-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,15 @@ describe('Locale', () => {
const jpKeys = getKeys(JP);
const cnKeys = getKeys(CN);
const twKeys = getKeys(TW);

assert(usKeys === jpKeys && jpKeys === cnKeys && cnKeys === twKeys);
});
});

function getKeys(object, parent = '') {
const keys = [];
for (const key in object) {
if (!object.hasOwnProperty(key) || key === 'momentLocale') return;
if (!object.hasOwnProperty(key) || key === 'momentLocale') continue;
const value = object[key];
keys.push(parent ? `${parent}.${key}`: key);

Expand Down

0 comments on commit d6a9afc

Please sign in to comment.