-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for plurals #4
Comments
You could just save the whole XML file you receive from https://api.getlocalization.com/[project-name]/api/translations/file/[master-file-name]/[language-tag]/ instead of parsing the file and only writing the entries. |
@oprisnik if you download the file you cannot ensure that apostrophes are properly escaped, this is the reason why i parsed it, does getlocalization now do the sanity checks for android by its own? |
Oh, I wasn't aware of this issue. Example: In GetLocalization the string has been translated with "L'ultimo giocatore". <string name="last_player">L\'ultimo giocatore</string> At least in this case it seems to work - not sure though if this is always the case. |
The parser was also converting "..." with the proper xml char as per Android guidelines so not sure if its better too keep it parsed or download the raw |
Ah ok, that's nice! Maybe it's better to keep parsing then - and to also parse the plural tags accordingly (and maybe even comments). |
This library seems unmaintained so I released my fork to jcenter() which fixes this issue. https://github.com/step-up-labs/gradle-getlocalization-plugin You can add it by:
|
Nice, thanks @davidvavra :) |
GetLocalization also supports plurals - but your plugin currently only supports simple string resources.
https://developer.android.com/guide/topics/resources/string-resource.html#Plurals
Example:
The text was updated successfully, but these errors were encountered: