Added support for <plurals> strings. Quickly hacked together, seems to work fine, but I am not familiar with the project at all, nor do I know PHP, so the code is likely very bad. Opening this PR in the hope this can be useful to someone, it's good enough for my use case.
Some comments:
Different languages have different types of plurals, which the tool has to know. I have made this configurable and added configuration for the 3 languages I need. Languages without plurals configuration will still work fine, but will prompt for translations for all possible plurals' types, even though not all are used in a given language.
For showing the English reference translation, I am using the "one" value for the "one" plural, and "other" value for all other plurals ("zero", "few", "many"...).
I have not tested if this hasn't broken other types of strings (e.g. <string-array>), as I am not using them. Please test before using/merging.
Added support for
<plurals>
strings. Quickly hacked together, seems to work fine, but I am not familiar with the project at all, nor do I know PHP, so the code is likely very bad. Opening this PR in the hope this can be useful to someone, it's good enough for my use case.Some comments:
<string-array>
), as I am not using them. Please test before using/merging.