Developer Area/Language Packs/GUI Translation Interface: Difference between revisions
From Mahara Wiki
< Developer Area | Language Packs
No edit summary |
No edit summary |
||
(9 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
{{Obsolete|<br><br>We now use Launchpad for translations instead. See [[Language Packs]].}} | |||
''"David's interface makes the translation work really smooth and easy."''<br />[http://mahara.org/user/view.php?id=1146 Koen Foggemans], at translation [http://mahara.org/interaction/forum/topic.php?id=2634#post11548 forum] | ''"David's interface makes the translation work really smooth and easy."''<br />[http://mahara.org/user/view.php?id=1146 Koen Foggemans], at translation [http://mahara.org/interaction/forum/topic.php?id=2634#post11548 forum] | ||
There is a customized tree of Mahara intended for translators called '''patch-adminlang.git'''. The tool has been developed by [http://mahara.org/user/view.php?id=232 David Mudrak]. It adds some code allowing you to translate Mahara through the web interface. It is recommended to run a separate installation of Mahara from this repository. '''Do not install production servers from | There is a customized tree of Mahara intended for translators called '''patch-adminlang.git'''. The tool has been developed by [http://mahara.org/user/view.php?id=232 David Mudrak]. It adds some code allowing you to translate Mahara through the web interface. It is recommended to run a separate installation of Mahara from this repository. '''Do not install production servers from this repo.''' Once some more features is added into this separate tree and it is bug free, it may be merged into the standard tree of Mahara. | ||
==About the adminlang repository== | ==About the adminlang repository== | ||
Line 14: | Line 9: | ||
The repo is hosted at git repository (see <u>http://gitorious.org/mahara-contrib/patch-adminlang</u>). | The repo is hosted at git repository (see <u>http://gitorious.org/mahara-contrib/patch-adminlang</u>). | ||
Here is how | Here is how branches are maintained. Note that only Mahara's STABLE branches are tracked. | ||
o---o---o git://gitorious.org/mahara-contrib/patch-adminlang.git#adminlang-master | |||
/ | |||
---o---o---o---o---o---o---o---o git://gitorious.org/mahara/mahara.git#master | ---o---o---o---o---o---o---o---o git://gitorious.org/mahara/mahara.git#master | ||
\ | \ | ||
o---o---o---o git://gitorious.org/mahara/mahara.git#1. | o---o---o---o git://gitorious.org/mahara/mahara.git#1.X_STABLE | ||
\ | \ | ||
o---o---o git://gitorious.org/mahara-contrib/patch-adminlang.git#adminlang-1. | o---o---o git://gitorious.org/mahara-contrib/patch-adminlang.git#adminlang-1.X | ||
==How to translate Mahara using this repository== | |||
# Install Mahara from this repo on your PC or testing server. Follow the steps described at [[System_Administrator's_Guide/Installing_Mahara]] but use <pre>git clone git://gitorious.org/mahara-contrib/patch-adminlang.git</pre> instead of standard /mahara/mahara.git at Step 2. | |||
# Switch to the branch that corresponds to the version of Mahara you plan to do the translation work on (probably the latest one).<pre>git checkout -b adminlang-1.5 origin/adminlang-1.5</pre> | |||
# Create a directory 'langpacks/xx.utf8' in your Mahara data directory. 'xx' stands for your language code. Make sure the directory is writeable by the web server process. The structure of the directories within 'maharadata/langpacks/xx.utf8' has to correspond to the structure of the language-related directories in htdocs. You may find more details on language pack structure [[Developer Area/Language Packs/Structure|here]]. | |||
# Copy the file 'langconfig.php' from the Mahara 'htdocs/lang/en.utf8' to 'maharadata/langpacks/xx.utf8/lang/xx.utf8' directory, change the string 'thislanguage' to your language, and the string 'locales' to your 'xx.utf8'.<pre>$string['thislanguage'] = 'English';</pre><pre>$string['locales'] = 'en_US.utf8,en_GB.utf8,en,english-us,english-uk,english';</pre> This variable will be used in the Language drop-down menu in Mahara Site Settings. | |||
# Add the following configuration into your config.php and modify them as needed. <pre>$cfg->lang_author = 'Your Name ';</pre><pre>$cfg->lang_copyright = '(C) 2006-2010 Catalyst IT Ltd http://catalyst.net.nz';</pre> All translated files in your package will have this information in the copyright header. | |||
# Login as admin and go to Configure Site. Change Language to your new language. | |||
# Go to Language card at Admin navigation. It opens admin/lang.php in the browser. Choose a file to edit. Add missing string or modify existing ones. Click on the existing string to edit it. There is no save button at the moment - every changed string is saved automatically on-the-fly by JSON AJAX request. | |||
==Note about langconfig.php== | |||
This file does not contain language strings per se, it contains language configuration that reflects name of the language, date/time formats, plural forms, etc. Since 1.5 due to some plural form features, you can't edit this file through adminlang interface, please modify it manually according to your requirements. | |||
== Bugs reporting and feature proposals == | |||
If you found a bug or would like to suggest a feature, please report it [https://bugs.launchpad.net/mahara-adminlang in the tracker]. |
Latest revision as of 17:14, 2 Haziran 2015
"David's interface makes the translation work really smooth and easy."
Koen Foggemans, at translation forum
There is a customized tree of Mahara intended for translators called patch-adminlang.git. The tool has been developed by David Mudrak. It adds some code allowing you to translate Mahara through the web interface. It is recommended to run a separate installation of Mahara from this repository. Do not install production servers from this repo. Once some more features is added into this separate tree and it is bug free, it may be merged into the standard tree of Mahara.
About the adminlang repository
The repo is hosted at git repository (see http://gitorious.org/mahara-contrib/patch-adminlang).
Here is how branches are maintained. Note that only Mahara's STABLE branches are tracked.
o---o---o git://gitorious.org/mahara-contrib/patch-adminlang.git#adminlang-master / ---o---o---o---o---o---o---o---o git://gitorious.org/mahara/mahara.git#master \ o---o---o---o git://gitorious.org/mahara/mahara.git#1.X_STABLE \ o---o---o git://gitorious.org/mahara-contrib/patch-adminlang.git#adminlang-1.X
How to translate Mahara using this repository
- Install Mahara from this repo on your PC or testing server. Follow the steps described at System_Administrator's_Guide/Installing_Mahara but use
git clone git://gitorious.org/mahara-contrib/patch-adminlang.git
instead of standard /mahara/mahara.git at Step 2. - Switch to the branch that corresponds to the version of Mahara you plan to do the translation work on (probably the latest one).
git checkout -b adminlang-1.5 origin/adminlang-1.5
- Create a directory 'langpacks/xx.utf8' in your Mahara data directory. 'xx' stands for your language code. Make sure the directory is writeable by the web server process. The structure of the directories within 'maharadata/langpacks/xx.utf8' has to correspond to the structure of the language-related directories in htdocs. You may find more details on language pack structure here.
- Copy the file 'langconfig.php' from the Mahara 'htdocs/lang/en.utf8' to 'maharadata/langpacks/xx.utf8/lang/xx.utf8' directory, change the string 'thislanguage' to your language, and the string 'locales' to your 'xx.utf8'.
$string['thislanguage'] = 'English';
$string['locales'] = 'en_US.utf8,en_GB.utf8,en,english-us,english-uk,english';
This variable will be used in the Language drop-down menu in Mahara Site Settings. - Add the following configuration into your config.php and modify them as needed.
$cfg->lang_author = 'Your Name ';
$cfg->lang_copyright = '(C) 2006-2010 Catalyst IT Ltd http://catalyst.net.nz';
All translated files in your package will have this information in the copyright header. - Login as admin and go to Configure Site. Change Language to your new language.
- Go to Language card at Admin navigation. It opens admin/lang.php in the browser. Choose a file to edit. Add missing string or modify existing ones. Click on the existing string to edit it. There is no save button at the moment - every changed string is saved automatically on-the-fly by JSON AJAX request.
Note about langconfig.php
This file does not contain language strings per se, it contains language configuration that reflects name of the language, date/time formats, plural forms, etc. Since 1.5 due to some plural form features, you can't edit this file through adminlang interface, please modify it manually according to your requirements.
Bugs reporting and feature proposals
If you found a bug or would like to suggest a feature, please report it in the tracker.