-
Notifications
You must be signed in to change notification settings - Fork 272
Conversation
Codecov Report
@@ Coverage Diff @@
## master #15 +/- ##
=====================================
Coverage 100% 100%
=====================================
Files 9 9
Lines 80 85 +5
=====================================
+ Hits 80 85 +5
Continue to review full report at Codecov.
|
expect(translator.translateWithNumber(undefined, undefined)).toBeUndefined(); | ||
}); | ||
it('returns original text for unknown text', () => { | ||
expect(translator.translateWithNumber('fish', 'fishes', 1)).toEqual('fish'); |
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.
don't need another test, but curious how it behaves with 0 since that is the default num
. is that singular?
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 that depends on each languagePack
. I saw there are DSL-ish field in the language packs that defines n
for singular and plural.
"plural_forms": "nplurals=2; plural=(n != 1)",
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.
LGTM! Nice add
* feat: add encodeable utilities * feat: add types back * refactor: simplify function calls * refactor: rename generic type * refactor: more edits * refactor: remove unused function * refactor: rename file * fix: address comments * fix: add vega back
🏆 Enhancements
tn
(translateWithNumber
) totranslation
modulesprintf-js
becausejed
already comes withsprintf
.