Fix bug 1212738: Send proper plural_form when updating translations. #208
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.
Turns out my initial assessment in bug 1212738 about the fix was wrong; the UI depends on
pluralForm
being-1
for locales withnplurals == 1
, regardless of what is stored in the database as the plural form of the string.This fixes the issue on our current UI, but it's a bandaid. The hopeful future redesign/re-implementation will have to take a few things into consideration:
nplurals == 1
got conflated with our logic of what plural form to store in the database.string_plural
but that seems to be not quite right.vcs_models
uses a dict with aNone
key for singular entities and numbers for pluralized entities, but I'm not entirely happy with that either.In any case, this should fix things for us now.