Android localization helper
Project description
[travis-url]: http://travis-ci.org/#!/jordanjoz1/android-localization-helper [travis-build-image]: https://secure.travis-ci.org/jordanjoz1/android-localization-helper.svg
[pypi-url]: https://badge.fury.io/py/android-localization-helper [pypi-image]: https://badge.fury.io/py/android-localization-helper.svg
[downloads-url]: https://pypi.python.org/pypi/android-localization-helper/ [downloads-image]: https://pypip.in/d/android-localization-helper/badge.svg
[![Travis build image][travis-build-image]][travis-url] [![PyPi version][pypi-image]][pypi-url] [![PyPi download count image][downloads-image]][downloads-url]
android-localization-helper
Python script that checks for missing string translations in your project’s localized languages.
If you’re like us at [DoubleDutch](doubledutch.me), you occassionally 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.
## 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
![Project structure](art/project_structure.png)
To install run: `bash pip install android-localization-helper `
## Usage cd to your res/ folder, and run:
` android-localization-helper `
The script creates a directory called to_translate/ ([sample output](./sample_output)) with separate files for the missing strings in each language. This way you know exactly what translations you need to add for each language, and they are already in a standard format to send out for translation!
You can change the output folder: ` android-localization-helper --output ~/Desktop/to_translate `
And you can clean up your localized strings.xml files. This will remove strings that aren’t in the default file and sort strings to match the default strings.xml order. Warning: this will change your existing localized `strings.xml` files, so make sure you have a back-up in case of any unexpected changes ` android-localization-helper --clean `
### Options
#### -h, –help Prints help message.
#### –res Path to the app’s /res folder. Like, ./main/res
By default assumes the current directory
#### –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-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
CHANGES
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.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for android-localization-helper-0.1.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | f721607ee1ee4890eb1a975eda407b4db31808d4cb68143313cd1f62448f10c2 |
|
MD5 | 3f1ce43d30a9672839edc0dae1ef733a |
|
BLAKE2b-256 | 63dc44ac48f5456611e749c836b6e796ff45d04f54fa63b428f0a0a3d7a28b6e |
Hashes for android_localization_helper-0.1.2-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bd2022b2479056b7ed811974fa2703c22bcd092d95790d96a1903baf3a8a7ea4 |
|
MD5 | 6b51cbef73c586d805eafdbf27807828 |
|
BLAKE2b-256 | 357c237a3de90d00894afede01cb5cbad4dbe9215f2ee40421a0d59e1e6231dd |