Transifex Client - http://docs.transifex.com/developer/client/
tx push -s
tx push -t --skip
tx pull
tx pull -l fr_FR
Make sure you have the entry below in your ~/.transifexrc file
[https://www.transifex.net]
hostname = https://www.transifex.net
username = username
password = password
token =
Then run
tools/full-sync.sh
You don't need to run this manually This is run on a cronjob on qa.ushahididev.com
This script assumes there is a Ushahidi deployment on the same level as the Ushahidi-Localization repo, with the kohana-i18n-manager module enabled.
To add a new language simply create the language through the transifex web UI The new language will be picked up automatically when cron runs.
- Copy the translation files into Ushahidi-Localization repo
- Convert the php files to po using kohana-i18n-manager. Run this in the web root (swapping xy_ZW for the language code):
php index.php "i18n/php2po?lang=xy_ZW"
- Commit the new php and po files to github
- Push the translations to transifex
tx push -t --skip -l xy_ZW
- The translations from now on should be edited in the Transifex client and will sync to github automatically.
Each PHP file in the i18n/en_US directory maps to a different resource in Transifex. When a new file is added to the PHP source files we need to tell transifex about it.
- Create the new php file in en_US (for example en_US/incident.php)
- Create a pot file to get started
php index.php "i18n/php2po?lang=en_US&group=incident"
- Edit .tx/config and add the resource to the end of the file (You can do this using the tx client but its safer to edit the .tx/config file manually)
[ushahidi-v2.incident]
file_filter = po/po-<lang>/incident.po
source_file = po/po-en_US/incident.pot
source_lang = en_US
type = PO
- Push the file to transifex
tx push -s -r ushahidi-v2.incident
This is done using the Kohana i18n manager module, see that module repo for docs https://github.com/rjmackay/kohana-i18n-manager