Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bug #31267 [Translator] Load plurals from mo files properly (Stadly)
This PR was merged into the 3.4 branch. Discussion ---------- [Translator] Load plurals from mo files properly | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #10152 (comment) | License | MIT | Doc PR | Plurals were not handled correctly when loading mo files. ``` msgid "foo" msgid_plural "foos" msgstr[0] "bar" msgstr[1] "bars" ``` Before, the mo entry above was treated as two entries, which doesn't make sense: ``` 'foo' => 'bar' 'foos' => '{0} bar|{1} bars' ``` With this PR, it is treated as one entry: ``` 'foo|foos' => 'bar|bars' ``` This PR does the same as #31266, just for mo files instead of po files. Note, however, that the old behavior differed between po and mo files: `'foos' => 'bar|bars'` for po files and `'foos' => '{0} bar|{1} bars'` for mo files. Commits ------- 97d28b5 Load plurals from mo files properly
- Loading branch information