-
Notifications
You must be signed in to change notification settings - Fork 111
Localization
For localization, Fire TV uses the android-l10n system. For current translation status, see the Fire TV project on Pontoon.
If you're updating an existing string, the string name must be changed in order for it to show up as a new string to translate. (Usually we just suffix with an integer, or bump the suffix if it already has one.)
Here is the punctuation guide for localization - the main gotcha is to use an apostrophe '
instead of an escaped \`, see example commit.
This occurs automatically: ensure strings are landed by string freeze to give localizers enough time to translate the strings.
There are now daily automated imports from the L10N repo, so there's no need to manually import the strings anymore.
However, here are the instructions if you do need to manually import strings.
-
Run the import script with
sh tools/l10n/import-strings.sh
. This will update the l10n repo (or clone it if it doesn't exist) and import the strings.Troubleshooting:
Error: [values-<locale>/strings.xml] missing placeholder in translation, key: <key_name>
- This is an error. A placeholder (%1$s) was omitted in the translation. Remove the problematic line/string from the file (it will default to the non-localized string). Also file a bug and select the appropriate locale, and cc delphine on the bug.
Warning: [values-<locale>/strings.xml] number of placeholders not matching, key: <key_name>
- This is just a warning, and no action needs to be taken.
-
Verify the changes and then commit and push the updated XML files to the app repository.
-
Python, Pip and Git need to be installed.
Set up a virtualenv for running all these scripts in. (You'll need to have
virtualenv
installed from Brew orpip
.)virtualenv -p python2.7 venv # creates ./venv/ dir source venv/bin/activate
Remember to exit the virtualenv when you've finished with everything.
deactivate
-
Install the dependencies.
pip install -r tools/l10n/android2po/requirements.txt
N.B.: I think this is outdated. This file seems to have changed.
tools/l10n/locales.py
is the master list for the locales that will be included in the release. Usually, the locales that need to be added are already included in ADDITIONAL_SCREENSHOT_LOCALES
, so they just need to be moved to RELEASE_LOCALES
.
Screenshots from the application can be produced using Fastlane and a supplied test-script. For Firefox TV, we have a set of scripts located at app/src/androidTest/java/org/mozilla/tv/firefox/ui/screenshots.
Run with download-build-run-locale-screenshots.sh