Skip to content

Commit

Permalink
fix locale that does not have plural form
Browse files Browse the repository at this point in the history
  • Loading branch information
arrizalamin committed Dec 18, 2018
1 parent fedec50 commit bfa1af4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
20 changes: 10 additions & 10 deletions src/locale/id.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@ const locale = {
future: 'dalam %s',
past: '%s yang lalu',
s: 'beberapa detik',
m: 'semenit',
mm: '%d menit',
h: 'sejam',
hh: '%d jam',
d: 'sehari',
dd: '%d hari',
M: 'sebulan',
MM: '%d bulan',
y: 'setahun',
yy: '%d tahun'
m: '%d menit',
mm: '',
h: '%d jam',
hh: '',
d: '%d hari',
dd: '',
M: '%d bulan',
MM: '',
y: '%d tahun',
yy: ''
},
ordinal: n => `${n}.`
}
Expand Down
2 changes: 1 addition & 1 deletion src/plugin/relativeTime/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ export default (o, c, d) => {
const key = t.l
if (key.length === 1) {
// Handle singular using a special text without any number
out = loc[key]
out = loc[key].replace('%d', 1)
} else {
// Choose the plural form using the index decided by the plural rule
const pluralForms = loc[key]
Expand Down

0 comments on commit bfa1af4

Please sign in to comment.