Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix plural messages not falling back to key.
Plural messages without a translated value did not correctly fallback to the message key as singular messages do. This caused undesirable behavior when working with plural messages. I've shifted the plural form resolution into the Translator. Now that we have a custom translator class this logic is better suited here instead of having duplicate logic in each message formatter. Interestingly our formatters had divergent logic for handling plurals which could cause some tedious to fix issues for app developers. I've not unset the `_singular` key in the Translator as userland formatters could be relying on those keys being passed in. Refs #10900
- Loading branch information
Showing
6 changed files
with
73 additions
and
184 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters