Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
UI strings that include counts now use the appropriate plural form in English and (once translations are updated) in other languages. When looking up a translation and one of the tokens is numeric, look one level deeper in the translation file for the CLDR plural form corresponding to the numeric token.
In order to support this feature for all the languages that iD supports, with all their varying pluralization rules, this change introduces dependencies on:
This works locally using
npm start
, but I’d like someone to double-check that I’m including these dependencies correctly. (All we need is a single JSON file from cldr-core, not the entire package.)Keying off numbers in token replacements means any number formatting that occurs before calling
t()
will defeat the pluralization logic therein. Unlike the unit formatting that occurs int()
’s callers (as of #4672), number formatting needs to happen insidet()
.More to come:
t()
t()
restriction.controls.via_up_to_one
/restriction.controls.via_up_to_two
validations.many_deletions
into strings with one pluralized word eachFixes #597.