Developer Area/Language Packs/Launchpad New Language Packs

From Mahara Wiki

< Developer Area‎ | Language Packs
Revision as of 13:25, 18 September 2012 by Sonn (talk | contribs)

Add a new language pack to Launchpad

If you are in charge of the official language packs, you may receive a language pack tar ball from a translator. You may be asked to add the tar ball into the Mahara translation project on Launchpad. This tar ball contains the directory named like 'xy.utf8' which has translated strings for a specific Mahara branch.

Here are the instructions

Checkout the Mahara code and Mahara lang script

You need to checkout the Mahara branch (1.3, 1.4, 1.5, 1.6, and master) which is compatible to the lang pack. Please see the set up a development environment page for more details.

cd ~
mkdir code
cd code
git clone git://
cd ~/code/mahara
git checkout -t origin/<Mahara-branch_STABLE>

Make sure you have a Mahara data-root directory created with suitable access permission.

You also need to checkout the Mahara lang scripts in the mahara-scripts repository

cd ~/code
git clone git://
cd ~/code/mahara-scripts
git checkout master

Extract the language pack tar ball

You need to extract the language pack tar ball into a directory

mkdir -p ~/translation/langpacks
tar xvf  xy-<mahara-branch>.tar.gz -C ~/translation/langpacks

where xy-<mahara-branch>.tar.gz is the tar ball.

Generate a .po file

You need to run the php script php-po.php

mkdir -p ~/translation/po
cd ~/code
/usr/bin/php mahara-scripts/mahara-langpacks/php-po.php mahara/htdocs ~/translation/langpacks ~/translation/po/xy.po

Update the Translator's info in the .po file

vi ~/translation/po/xy.po
"Last-Translator: Son Nguyen <[email protected]>\n"
"Language-Team: Launchpad Vietnamese Translators\n"

If you don't include an email address on this line, you (as the uploader) will be credited as the translator after it's uploaded to Launchpad.

Get the last updated .pot template from launchpad

You need one mahara.pot for each branch. You can find them on these bzr branches: