-
Notifications
You must be signed in to change notification settings - Fork 181
Use "de" in Romanian for numbers >= 20 #235
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
Conversation
|
I'll review this in the next two weeks or so. Thank you.
|
EvanHahn
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This mostly looks good, but I have a few small requests. Thank you!
humanize-duration.js
Outdated
| ["minut", "minute"], | ||
| ["secundă", "secunde"], | ||
| ["milisecundă", "milisecunde"], | ||
| ro: romanianLanguage( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpick: I'd prefer if this could use language() instead, and remove the romanianLanguage() function. It should just be a matter of inlining the contents of romanianLanguage().
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
test/humanizer.js
Outdated
| assert.strictEqual(h(123), "Zero.OneTwoThree seconds"); | ||
| }); | ||
|
|
||
| it("handles Romanian plural forms with 'de' correctly", function () { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a way to test this inside of test/definitions/ro.tsv instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I put here whatever I couldn't test using the tsv because numbers are too big and would roll into the next unit, e.g. 100 days would be 3 months etc. I can remove these tests if you want, I'm OK with the coverage from ro.tsv.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I'd prefer if these tests were removed. Happy to discuss further if you disagree.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed.
humanize-duration.js
Outdated
| if (c === 1) { | ||
| return unit[0]; | ||
| } | ||
| // Non-integers and 0 use plural without "de" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpick: could you remove this comment?
| // Non-integers and 0 use plural without "de" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
|
I'll take another look soon. |
EvanHahn
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good other than one small comment! Thank you!
test/humanizer.js
Outdated
| assert.strictEqual(h(123), "Zero.OneTwoThree seconds"); | ||
| }); | ||
|
|
||
| it("handles Romanian plural forms with 'de' correctly", function () { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I'd prefer if these tests were removed. Happy to discuss further if you disagree.
|
Thanks! I'll deploy this soon. |
|
This has been released in |
|
Hey @EvanHahn, is there a process for updating the code used in the demo page? It looks like the version in the |
|
I always forget to update that. I'll fix in the next few days. |
|
Updated! |
|
Thanks! |
The current Romanian translation is slightly wrong. Similar to Slavic languages, Romanian has different rules for how plurals look:
1 <= n % 100 <= 19"de"+ noun otherwise(See Wikipedia.)