Open Toastdeib opened 2 years ago
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.
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
andpodcasts_plural
). Since the one/other paradigm is common but not universal, usingplural
s is generally the better approach, plus it saves you from having to make extensions on theResources
class. Offhand, the only supported language that I know would benefit from switching toplural
s is Japanese (it only uses theother
quantity, there's no distinction for theone
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 actualplural
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?