Actions

Developer Area/Language Packs/GUI Translation Interface: Difference between revisions

From Mahara Wiki

< Developer Area‎ | Language Packs
No edit summary
No edit summary
Line 1: Line 1:
http://mahara.org/user/view.php?id=1146
http://mahara.org/interaction/forum/topic.php?id=2634#post11548
http://mahara.org/user/view.php?id=232
http://gitorious.org/mahara-contrib/patch-adminlang
http://wiki.mahara.org/Developer_Area/Language_Packs/Structure
''"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]


Line 12: Line 17:


  ---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.3_STABLE
      o---o---o---o  git://gitorious.org/mahara/mahara.git#1.3_STABLE
              \
                \
                o---o---o git://gitorious.org/mahara-contrib/patch-adminlang.git#adminlang-1.3
                o---o---o git://gitorious.org/mahara-contrib/patch-adminlang.git#adminlang-1.3


</div><div id="section_2">
</div><div id="section_2">
Line 26: Line 32:
# Copy the file 'langconfig.php' from the Mahara 'htdocs/lang/en.utf8' to 'maharadata/langpacks/xx.utf8/lang/xx.utf8' directory and change the string 'thislanguage' to your language. $string['thislanguage'] = 'English';<br /> This variable will be used in the Language drop-down menu in Mahara Site Settings.
# Copy the file 'langconfig.php' from the Mahara 'htdocs/lang/en.utf8' to 'maharadata/langpacks/xx.utf8/lang/xx.utf8' directory and change the string 'thislanguage' to your language. $string['thislanguage'] = 'English';<br /> 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-&gt;lang_author = 'Your Name ';
# Add the following configuration into your config.php and modify them as needed. $cfg-&gt;lang_author = 'Your Name ';
$cfg-&gt;lang_copyright = '(C) 2006-2010 Catalyst IT Ltd http://catalyst.net.nz';<br /> All translated files in your package will have this information in the copyright header.
  $cfg-&gt;lang_copyright = '(C) 2006-2010 Catalyst IT Ltd http://catalyst.net.nz';<br /> 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.
# 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.<br />
# 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.<br />


</div>
</div>

Revision as of 18:06, 12 Mayıs 2011

http://mahara.org/user/view.php?id=1146 http://mahara.org/interaction/forum/topic.php?id=2634#post11548 http://mahara.org/user/view.php?id=232 http://gitorious.org/mahara-contrib/patch-adminlang http://wiki.mahara.org/Developer_Area/Language_Packs/Structure "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 the 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 David maintains the branches. Note that only Mahara's STABLE branches are tracked. David is too lazy to track the master branch and also he thinks that translators should never start translating before a beta or even RC1.

---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.3_STABLE
               \
                o---o---o git://gitorious.org/mahara-contrib/patch-adminlang.git#adminlang-1.3


How to translate Mahara using this repository

  1. 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.
     
  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.3 origin/adminlang-1.3
  3. Create a directory 'langpacks/xx.utf' 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.
  4. Copy the file 'langconfig.php' from the Mahara 'htdocs/lang/en.utf8' to 'maharadata/langpacks/xx.utf8/lang/xx.utf8' directory and change the string 'thislanguage' to your language. $string['thislanguage'] = 'English';
    This variable will be used in the Language drop-down menu in Mahara Site Settings.
  5. 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.
  1. Login as admin and go to Configure Site. Change Language to your new language.
  2. 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.