mozilla

Maintaining l10n

Things to know about l10n

  1. translations are done in Pontoon
  2. translators are looking at our -dev environment to see the strings in use
  3. the -dev environment should have a cronjob kicking off every 10 minutes that updates the git locale repository so that translators can see the latest stuff
git url:https://github.com/mozilla-l10n/input-l10n
Pontoon:https://pontoon.mozilla.org/projects/firefox-input/

Installing localizations from git

Localizations are not stored in this repository–they’re in Mozilla’s Git repository.

To get the localizations, do:

git clone https://github.com/mozilla-l10n/input-l10n.git locale

To see the translated strings, you need to first compile the .po files to .mo files:

./bin/compile-mo.sh locale/

Then you need to comment out the DEV_LANGUAGES option from your local settings file, ./fjord/settings/local.py.

Extract/merge/sync strings with git

First, update the git repository:

cd locale
git pull origin master
cd ..

Then, extract the strings from the codebase:

./manage.py extract_db
./manage.py extract
./manage.py merge

Commit the db strings to the app repo:

git commit -a

Then, commit the new strings to the string repo:

cd locale
git commit -m 'Input strings update YYYY/MM/DD'

Note

There are also instructions in ./locale/README.txt.

After that, send an email to the dev-l10n-web mailing list using this template:

Hi!

I've just pushed new strings to Pontoon for Input.

https://pontoon.mozilla.org/projects/firefox-input/

< explanation of strings changes here >

To give you an idea of how many untranslated strings there are, I
have computed this list:

< copy and paste output of "./bin/stats-po.sh locale/" >

If you have any questions, please reply to the list.

Thank you so much for your help!

Input development team

Sometimes we have to create bugs for each individual locale to update the translations. It’s nice to copy/paste the specific strings that need to be translated.

Sometimes the translator says they’ve finished, but the string updates aren’t in git. If that happens, contact the Pontoon admin team.

Creating new localization locales

FIXME: This section is probably wrong.

In your projects settings.py add the new locale to KNOWN_LANGUAGES.

Then run:

$ ./manage.py merge -c

which will create directories for any locales that are missing in locale/.