[travis-url]: http://travis-ci.org/#!/jordanjoz1/android-localization-helper [travis-build-image]: https://secure.travis-ci.org/jordanjoz1/android-localization-helper.svg
[coveralls-url]: https://coveralls.io/r/jordanjoz1/android-localization-helper [coveralls-image]: https://coveralls.io/repos/jordanjoz1/android-localization-helper/badge.svg
[pypi-url]: https://badge.fury.io/py/android-localization-helper [pypi-image]: https://badge.fury.io/py/android-localization-helper.svg
[arsenal-url]: https://android-arsenal.com/details/1/1367 [arsenal-image]: https://img.shields.io/badge/Android%20Arsenal-android–localization–helper-brightgreen.svg?style=flat
[downloads-url]: https://pypi.python.org/pypi/android-localization-helper/ [downloads-image]: https://img.shields.io/pypi/dm/android-localization-helper.svg
[codeclimate-url]: https://codeclimate.com/github/jordanjoz1/android-localization-helper [codeclimate-image]: https://codeclimate.com/github/jordanjoz1/android-localization-helper/badges/gpa.svg
[![Travis build image][travis-build-image]][travis-url] [![Coverage Status][coveralls-image]][coveralls-url] [![PyPi version][pypi-image]][pypi-url] [![PyPi download count image][downloads-image]][downloads-url] [![Android Arsenal][arsenal-image]][arsenal-url] [![Code Climate][codeclimate-image]][codeclimate-url]
android-localization-helper
Python script that checks for missing string translations in your project’s localized languages.
Ever lose track of what strings have and haven’t been translated in each language? Android Studio [made an awesome GUI](http://tools.android.com/recent/androidstudio087released) to help deal with this issue, but there is no easy way to export missing strings, so if you are missing more than a few strings in a language it can become a tenuous problem. Here’s a solution!
This python package will output a directory with all the string translations that are missing for each localized values directory. It can also clean-up localized strings.xml to remove translations that are no longer used in the default strings.xml file.
## Getting started Requirements:
Python >= 2.7.*
[Standard Android project structure](https://developer.android.com/tools/projects/index.html) for localized values-* folders in res/ folder

To install run: `bash pip install android-localization-helper `
## Usage
#### Normal use
cd into your res/ folder, and run:
` android-localization-helper `
By default, this creates an output directory to_translate/ ([sample output](./sample_output)) with separate files for the missing strings in each language. Now that you have the untranslated strings for each language in a standard format, you can [send them out for translation](https://developer.android.com/distribute/tools/localization-checklist.html#gp-trans)!
#### Change output directory (–output) Use the output option to change the output directory path.
For example, we can output the missing translations into a to_translate/ directory on the Desktop:
` android-localization-helper --output ~/Desktop/to_translate `
#### Clean-up translated string files (–clean)
This option will remove strings that aren’t in the default file and sort strings to match the default strings.xml order. Warning: this will overwrite your existing localized `strings.xml` files, so make sure you have a back-up in case of any unexpected changes ` android-localization-helper --clean `
#### Use multiple default string sources (–input)
It is recommended that all your translatable strings are in strings.xml. If that’s not the case, the input option will allow you to include multiple default string source files. The localized output will still have only one file for each language.
For example, if we had strings.xml and plurals.xml files in our values/ directory, we could make sure those are included as part of our default string source:
` android-localization-helper --input strings.xml plurals.xml `
### Options
#### -h, –help Prints help message.
#### –res Path to the app’s /res folder. Like, ./main/res
By default assumes the current directory
#### –input List of file names to include from default values directory (e.g. strings.xml plurals.xml). By default, only strings.xml is used
#### –output Output directory path (directory will be created automatically). Like, ~/Desktop/to_translate
By default creates to_translate folder in the current directory.
#### –clean Clean the existing string.xml files for each language. This will remove strings that are in the localized language but not in the default language (they presumably got removed from the default langauge). It will also sort the strings so that they are in the same order as the default language.
## Release History * 2015-07-16 v0.1.4 fix handling same resource name across multiple times * 2015-05-31 v0.1.3 support for multiple default string sources * 2015-01-05 v0.1.2 support for more language folders, better feedback and error handling * 2015-01-04 v0.1.1 xliff namespace support, better indentation handling * 2015-01-03 v0.1.0 Initial release
## License
See the [LICENSE](LICENSE) file for license rights and limitations (MIT).
CHANGES
0.1.4 (2015-07-16)
fix handling same resource name across multiple times
0.1.3 (2015-05-31)
support for multiple default string sources
0.1.2 (2015-01-05)
Support for more language folders
Better feedback
Better error handling
0.1.1 (2015-01-04)
Support for xliff namespace.
Preserves original indentation for tags
Added tests for plurals
0.1.0 (2015-01-03)
Initial release.
Metadata
Release files for android-localization-helper 0.1.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| android-localization-helper-0.1.4.tar.gz | 7.6 kB | Without provenance | Details for android-localization-helper-0.1.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| android_localization_helper-0.1.4-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details for android_localization_helper-0.1.4-py2.py3-none-any.whl |
Total release size: 17.7 kB
Release files / android-localization-helper-0.1.4.tar.gz
| Download URL | android-localization-helper-0.1.4.tar.gz |
|---|---|
| Size | 7.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1ef3533b6f47039b93b6a61bef8b36ebe76ef285970d48e3dc36193b5454549d
|
|
BLAKE2b-256 checksum How to use checksums |
28773f83090c2cb4012acf1e307339b20d1e4858d75c0282390add0216a9f8d6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / android_localization_helper-0.1.4-py2.py3-none-any.whl
| Download URL | android_localization_helper-0.1.4-py2.py3-none-any.whl |
|---|---|
| Size | 10.0 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
727f5c0c95dd14cac2b7af8d7ee1cf32fea91c9809165bb587eeee60d77d64f1
|
|
BLAKE2b-256 checksum How to use checksums |
175fb3fbb166582298b3030ce01da7f5dde5790ae0f832a0847f4f4d9d2d937e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for android-localization-helper 0.1.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.