Developer Area/Language Packs/Launchpad New Language Packs: Difference between revisions
From Mahara Wiki
< Developer Area | Language Packs
No edit summary |
No edit summary |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
==Add a new language pack to Launchpad== | ==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 [https://translations.launchpad.net/mahara-lang Mahara translation project] on Launchpad. This tar ball contains the directory named like 'xy.utf8' which has translated strings for a specific Mahara branch. | 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 [https://translations.launchpad.net/mahara-lang Mahara translation project] on Launchpad. This tar ball contains the directory named like 'xy.utf8' which has translated strings for a specific Mahara branch. 'xy' is the language code of the language pack, i.e., 'en' for English, 'vi' for Vietnamese, 'gl' for Galician. | ||
Here are the instructions | Here are the instructions | ||
Line 52: | Line 52: | ||
===Get the last updated .pot template from launchpad=== | ===Get the last updated .pot template from launchpad=== | ||
You need one '''mahara.pot''' for | You need to download one '''mahara.pot''' for the branch. You can find them on these bzr branches: | ||
* http://bazaar.launchpad.net/~mahara-lang/mahara-lang/master/files/head:/mahara/ | * http://bazaar.launchpad.net/~mahara-lang/mahara-lang/master/files/head:/mahara/ | ||
Line 58: | Line 58: | ||
* http://bazaar.launchpad.net/~mahara-lang/mahara-lang/1.4_STABLE/files/head:/mahara/ | * http://bazaar.launchpad.net/~mahara-lang/mahara-lang/1.4_STABLE/files/head:/mahara/ | ||
* http://bazaar.launchpad.net/~mahara-lang/mahara-lang/1.3_STABLE/files/head:/mahara/ | * http://bazaar.launchpad.net/~mahara-lang/mahara-lang/1.3_STABLE/files/head:/mahara/ | ||
then put it into the directory | |||
~/translation/po | |||
===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 [https://launchpad.net/~mahara-lang/+members mahara-lang team].''' | |||
Each branch has its own upload page: | |||
* https://translations.launchpad.net/mahara-lang/trunk/+translations-upload | |||
* https://translations.launchpad.net/mahara-lang/1.5/+translations-upload | |||
* https://translations.launchpad.net/mahara-lang/1.4/+translations-upload | |||
* https://translations.launchpad.net/mahara-lang/1.3/+translations-upload | |||
All the files should now be visible on the [https://translations.launchpad.net/mahara-lang/+imports import queue]. | |||
After 24 hours the translations should have been imported into launchpad and should be [https://translations.launchpad.net/mahara-lang 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: | |||
* [https://launchpad.net/~lp-l10n-zh-tw Chinese (Traditional)] | |||
* [https://launchpad.net/~lp-l10n-he Hebrew] | |||
* [https://launchpad.net/~lp-l10n-vi Vietnamese] | |||
or individual translators | |||
* [https://launchpad.net/~jdpark7 Jong-Dae Park] | |||
* [https://launchpad.net/~koen-roggemans Koen Roggemans] | |||
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, add the location for the new language you imported to launchpad. | |||
xy lp:mahara-lang | |||
The langpack list at http://langpacks.mahara.org will start pulling from launchpad. |
Latest revision as of 14:27, 18 September 2012
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. 'xy' is the language code of the language pack, i.e., 'en' for English, 'vi' for Vietnamese, 'gl' for Galician.
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
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 to download one mahara.pot for the branch. You can find them on these bzr branches:
- http://bazaar.launchpad.net/~mahara-lang/mahara-lang/master/files/head:/mahara/
- http://bazaar.launchpad.net/~mahara-lang/mahara-lang/1.5_STABLE/files/head:/mahara/
- http://bazaar.launchpad.net/~mahara-lang/mahara-lang/1.4_STABLE/files/head:/mahara/
- http://bazaar.launchpad.net/~mahara-lang/mahara-lang/1.3_STABLE/files/head:/mahara/
then put it into the directory
~/translation/po
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:
- https://translations.launchpad.net/mahara-lang/trunk/+translations-upload
- https://translations.launchpad.net/mahara-lang/1.5/+translations-upload
- https://translations.launchpad.net/mahara-lang/1.4/+translations-upload
- https://translations.launchpad.net/mahara-lang/1.3/+translations-upload
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, add the location for the new language you imported to launchpad.
xy lp:mahara-lang
The langpack list at http://langpacks.mahara.org will start pulling from launchpad.