Developer Area/Language Packs/Launchpad New Language Packs
From Mahara Wiki
< Developer Area | Language PacksRevision as of 12:47, 18 September 2012 by Sonn
- 1 Add a new language pack to Launchpad
- 1.1 Checkout the Mahara code and Mahara lang script
- 1.2 Extract the language pack tar ball
- 1.3 Generate a .po file
- 1.4 Update the Translator's info in the .po file
- 1.5 Get the last updated .pot template from launchpad
- 1.6 Create tar ball in launchpad
- 1.7 Upload the tarball
- 1.8 Create a translation team
- 1.9 Update the master language pack location
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://gitorious.org/mahara/mahara.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://gitorious.org/mahara/mahara-scripts.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
"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 to download one mahara.pot for the branch. You can find them on these bzr branches:
then put it into the directory
Create tar ball in launchpad
cd ~/translation/po tar czf xy-<mahara-branch>.tar.gz xy.po mahara.pot
Upload the tarball
Starting here, you need to be a direct member of the mahara-lang team.
Each branch has its own upload page:
All the files should now be visible on the import queue.
After 24 hours the translations should have been imported into launchpad and should be visible.
The imported translation may need to be approved by you or a translation administrator if its status is 'Needs Review'
Create a translation team
You may need to create a new translation team or translator to the new language.
Go to the Translation group at https://translations.launchpad.net/+groups/mahara-translation-group
Ideally, get the Mahara translators to join the general Launchpad translation groups for their languages. For example:
or individual translators
If the Mahara translators are unable to join them, then:
- only one translator:
- just add their launchpad user as the Team on that page
- multiple translators:
- create a regular Launchpad team with a name like mahara-lang-es
- change the team's owner to mahara-reviewers
- remove yourself from the list of active members
- add each translator's launchpad user as a member of the team
- go back to the Translation group and add the team as the maintainer.
Update the master language pack location
In mahara-scripts/mahara-langpacks/language-repos.txt, change the location for each language you imported to launchpad from gitorious to lp:mahara-lang. The langpack list at http://langpacks.mahara.org will start pulling from launchpad instead of gitorious.
If you are starting a new translation in launchpad, hold off on updating this file until the translation is complete enough to be useful to someone, or users will waste time downloading and installing language packs with only a few translated strings.