Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix locale that does not have plural form #8

Open
wants to merge 1 commit into
base: combined
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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