Skip to content
This repository has been archived by the owner on Jul 5, 2021. It is now read-only.

l10n process

Daisy-pliu edited this page Jun 8, 2020 · 12 revisions

l10n Best Practice

Document for l10n Best Practice

Trigger from Bitrise CI

Document for triggering from Bitrise CI (Restricted within mozilla corp)

prepare environment:

  • If it's your first time do so, install python packages by pip install -r tools/l10n/android2po/requirements.txt
  • Fork zerda-android-l10n to your Github account(e.g. https://github.com/your_account/zerda-android-l10n/
  • Fork Firefox Lite, and enter Firefox Lite root folder cd FirefoxLite
  • git clone [email protected]:YOUR_ACCOUNT/zerda-android-l10n.git l10n-repo
  • git remote add pontoon [email protected]:mozilla-l10n/zerda-android-l10n.git
  • Sync your code to latest one

routine:

creating pull request for Pontoon

Once new strings are ready in Firefox Lite repo, we will file a pull request for Pontoon to engage community for translation

merge l10n from Pontoon

Once the strings are localized, we'll merge the result from Pontoon repo. This part is covered by CI workflow. Typically, you don't need to merge the result manually.

  • in project root, run git checkout master && git pull to get the latest build
  • Create a branch for l10n result git checkout -b l10n_result
  • enter l10n repo cd l10n
  • get the latest build from Pontoon repo git fetch pontoon & git merge pontoon/master. And then push to your own repo git push yourRemoteNameForL10n master
  • run ./tools/l10n/import-strings.sh
  • Add new strings and commit the result

Customized strings

If there's any string needed to be translated into other languages ahead of pontoon, we can land the string in strings_customized.xml example to hold the space before the translation is done. Since there could be duplicated in strings, it's required to run ./gradlew updateCustomizedStrings before build to avoid duplicated strings.

with #4737 landed, we move customized resources to an independent module. For all the customized strings, simply add the strings to corresponded locale folders. tools/l10n/update_customized_resources.py will remove the redundant strings at build time.