wiki:doc/l10n coordinator

For those who manage the translation process

To add a new translation resource, you will need three things: admin access on Transifex to add the new resource, access to Tor's translation server, and permission to push to translation-tools.git and translation.git. The rest of this section will assume that you are adding the The Metadata Anonymization Toolkit to Transifex (#7892).

Create the resource on Transifex

Download mat-gui.pot from http://gitweb.torproject.org/user/jvoisin/mat.git or clone the repository locally and find the po file. Log on to Transifex, navigate to our project page, click on Resources and Add new resource:

  • Resource file: locate mat-gui.pot
  • Name: type in Tails - mat-gui.pot
  • I18N Type: select PO File (.po)

Click Create resource and wait for the page to refresh. You should now see the page for the resource you just added. Click on Edit resource:

Add existing translations

If the resource has existing translations, you will need to add them as well. Navigate to the page for the resource you just added, click Add new translation, select the language, locate the first translation you wish to upload and click Upload file. Repeat for each existing translation.

Update the configuration file in the translation-tools.git repository

Clone the repository:

git clone ssh://git@git-rw.torproject.org/translation-tools.git
cd translation-tools

Add the new resource to the PROJECTS variable in the config file, in alphabetical order.

There will always be two resources ($project and $project\_completed), here they are mat-gui and mat-gui_completed.

Commit the changes and push them to the translation-tools repository.

Prepare branches in the translation repository

Each translation resource gets its own branch in the translation repository. First clone the translation repository:

git clone ssh://git@git-rw.torproject.org/translation.git
cd translation

Then use

git checkout master
git checkout --orphan $project
echo *.tx > .gitignore
git add .gitignore
git commit -avm "Initial import for $project"
git push --set-upstream origin $project

Do this for both resources you're creating (also _completed: )

git checkout master
git checkout --orphan $project\_completed
echo *.tx > .gitignore
git add .gitignore
git commit -avm "Initial import for $project\_completed"
git push --set-upstream origin $project\_completed

Set up the resource on the translation server

Log in to majus, our translation's host.

Switch to the translation user and navigate to /srv/translation.torproject.org/translations. Clone the translation repository, and check out the branch into the corresponding directory

sudo -u translation bash
export project='project_slug'
cd /srv/translation.torproject.org/translations
git clone git@git-rw.torproject.org:translation.git $project
cd $project
git checkout $project

Do this for both resources you're creating.

cd /srv/translation.torproject.org/translations
git clone git@git-rw.torproject.org:translation.git $project\_completed
cd $project\_completed
git checkout $project\_completed

Create the Transifex configuration file

cd /srv/translation.torproject.org/translations
mkdir $project/.tx/ $project\_completed/.tx/
touch $project/.tx/config 
touch $project\_completed/.tx/config

Edit mat-gui/.tx/config with the information below. The first line is the resource slug, which is a part of the URL for that specific resource on the Transifex website. The second line specifies how new translations should be saved (i.e. with just the language code as the filename) :

vim $project/.tx/config

[torproject.tails-mat-guipot]
file_filter = <lang>.po
source_file = mat-gui.pot
source_lang = en

[main]
host = https://www.transifex.net

Add the same information to $project\_completed/.tx/config, but make sure you include the following line at the bottom:

vim $project\_completed/.tx/config

minimum_perc = 95

Pull translations from Transifex

cd $project
tx pull -a -s
git add .
git commit -avm "pulling translations from transifex"
git push
cd ../$project\_completed
tx pull -a -s --mode=reviewed
git add .
git commit -avm "pulling translations from transifex"
git push

Do this for both resources you're creating.

Update the translation-tools repository and activate the config file

cd /srv/translation.torproject.org/tools
git pull
Last modified 10 days ago Last modified on Oct 4, 2019, 4:16:13 PM