pocket-casts-android
pocket-casts-android copied to clipboard
Use quantity strings for better localization support
What problem does this address?
A lot of my day-to-day at work involves localization on Android, and when poking through this repo I noticed that the resources for quantity strings are being done as actual string
s with singular and plural variants (e.g. podcasts_singular
and podcasts_plural
). Since the one/other paradigm is common but not universal, using plural
s is generally the better approach, plus it saves you from having to make extensions on the Resources
class. Offhand, the only supported language that I know would benefit from switching to plural
s is Japanese (it only uses the other
quantity, there's no distinction for the one
case), but there may be others as well.
What is your proposed solution?
All the string
resources that have singular/plural versions should be redone as actual plural
resources to take proper advantage of the existing framework. I'd be happy to take a stab at this myself when I have some free time, but I wanted to put it in the issue tracker to make sure I didn't forget about it.
Did you search for existing feature suggestions?
- [X] I have searched for existing feature suggestions.
Thanks for raising this issue, it would be much cleaner to use plurals. The problem is the tool GlotPress we use for localization doesn't support string files with plurals yet. https://translate.wordpress.com/projects/pocket-casts/android/
Ah, fair enough. Doesn't seem ideal, but I suppose you have to work within the tools you're given. Do you know if that tool has any plans to support plurals in the future? I realized after making my original post that the documentation page I linked actually mentions a subset of the languages that use each different type of quantity string, and it looks like Arabic, Russian, and Chinese are all also impacted by the lack of formal plurals, so that's at least four supported languages that would benefit from the change.