A set of python tools for simplyfying translation of Android projects. Insiparation was taken from this idea, which I have greately improved. This repo aims to provide a more complete set of useful utils. All of these are based on AWS translate, and will require installed and configured AWS CLI on your machine.
strings_add.py
- translates givenvalues-XX/strings.xml
to new langueges, automatically writes them to dedicatedvalues-XX
folders. Best way to add new language [coming soon]strings.py
- 'syncs' translations between existing languages. Eg. whenvalues
got a new string, this will translate and add the new string to each of existing languagesvalues-XX
. This does not override any existing strings. Preferable overstrings_add.py
, as it preserves existing strings of existing translations, and only adds missing ones.GPP.py
- translation functionalities for Gradle Publish Plugin: listings, release notes [coming soon]
strings_add.py
and strings.py
:
- Automatically extract text from strings.xml and reassemble it back for new languages
- Ignores
translatable=false
strings - Preserves HTML atributes (eg.
<i>
etc) - Performs structure reconstruction after translation (eg.
\ n
back to\n
etc) in order to protect HTML atributes - Performs apostrophe reconstruction after translation (
'
to\'
) in order to prevent android file errors for langs likeit
,fr
etc. - Works both with
string
andstring-array
- Ability to choose non default source language
strings_add.py
only:
- Supports adding multiple langs at once, space separated
- Automatically forms values-XX folders for each of the langs