wiki:TxRepoSetup
Last modified 4 years ago Last modified on 03/26/13 14:37:43

TOC?

Set up a local Transifex repository HOWTO

About this document

This document is intended to all translators and release masters who will be deal with translations for Midnight Commander (also applicable for all other projects who use services of Transifex project).

About Transifex

Transifex is a modern, open-source localization platform. It’s a web system which automates the translation workflow for complex international projects.

Transifex seamlessly integrates with existing content infrastructure, such as a software development repository or content management system, using a rich API. Translation is "crowd-sourced" to a global network of human translators using smart and agile translation techniques adopted from the open source ecosystem.

Getting Transifex client

Getting from sources

You can download the repository either using git:

git clone git://github.com/transifex/transifex-client.git

or you can directly download from the repository web-page.

To install it, run follow commands:

$ cd transifex-client
$ sudo python setup.py install

Getting binary files

Common distributive

$ sudo easy_install --upgrade transifex-client

Fedora

$ sudo yum install transifex-client

Using Transifex client

To make sure that transifex-client was installed correctly, try running it with the following command:

tx --help

If everything is okay, then you should see a help message and basic instructions. To get more information for each command of tool you can use

tx help <command>

tx-repository initialization

We have two main branches: master and *-stable. These branches may be different by features (and by translated strings too), therefore we have a different pot-resources on Transifex. Transifex client uses mapping to local files as one directory per tx-resource, but git-repository provide several branches in one directory therefore I suggest to separate TX-repo and GIT-repo in different directories. We'll mark these directories as $TX_REPO and $GIT_REPO.

Run follow commands:

$ mkdir $TX_REPO
$ cd $TX_REPO
$ tx init
Creating .tx folder...
Transifex instance [https://www.transifex.net]: 
Creating skeleton...
Creating config file...
$

Add local mapping for pot-resources:

cat >>$TX_REPO/.tx/config <<EOF

[mc.mcpot]
file_filter = master/<lang>.po
source_file = master/mc.pot
source_lang = en

[mc.mcpot-stable]
file_filter = stable/<lang>.po
source_file = stable/mc.pot
source_lang = en

[mc.mc_hint]
file_filter = mc.mc_hint/<lang>.po
source_file = mc.mc_hint/mc.pot
source_lang = en
EOF

Fetch all translations by command:

tx pull --all

Now you are ready to fetch translations before any release (as this described on ReleaseGuidelines page).