Developer Area/Language Packs: Difference between revisions
From Mahara Wiki
< Developer Area
No edit summary |
|||
(20 intermediate revisions by 6 users not shown) | |||
Line 1: | Line 1: | ||
Here you can find information about developing new language packs for Mahara. If you speak another language | Here you can find information about developing new language packs for Mahara. If you speak another language, then you should be able to translate Mahara, or help with a translation effort already in place. | ||
Remember to check | Remember to check the list of existing language packs at [https://langpacks.mahara.org langpacks.mahara.org] first - you may find that Mahara has already been translated into the language you want! | ||
==Launchpad translations== | |||
Most translations are now maintained in the [https://translations.launchpad.net/mahara-lang Mahara translation project on Launchpad]. | |||
If you would like to help with one of these translations, first have a look at the [https://translations.launchpad.net/+groups/mahara-translation-group list of translation teams]. If your language has a team appointed in this list, you will need to join the appropriate team for your language before you can help with the translation. | |||
If you would like to start a new translation, or if your language doesn't have an appointed team, you can help with the translation as soon as you have created an account on Launchpad. | |||
==How to start a new translation== | |||
If your language doesn't appear in the [https://translations.launchpad.net/mahara-lang/trunk list of Mahara Translation status by language] (Click 'View all languages' to see all available languages), you can start a new Mahara translation for your language. Here is a quick instruction. | |||
# [https://login.launchpad.net/+new_account Create an account on Launchpad] if you don't have one. | |||
# If there is a [https://translations.launchpad.net/+groups/mahara-translation-group Mahara translation team] responsible to your language, please join this team. Otherwise, please contact an administrator of the [https://launchpad.net/~mahara-lang/+members Mahara translators]. Alternatively, you can join the translation team for your language in general. | |||
# Once you are in a Mahara translation team, you can start to translate or review existing strings on [https://translations.launchpad.net/mahara-lang/trunk Launchpad]. | |||
# Once you are ready to test your translation (it does not have to be complete), please [mailto:[email protected] contact] us to have your translation added to the official list at [https://langpacks.mahara.org langpacks.mahara.org]. | |||
# You can continue to update your translation on Launchpad. Your tar ball in Mahara format will be automatically generated and stored at [https://langpacks.mahara.org langpacks.mahara.org] when changes are detected (usually once per day depending on Launchpad). | |||
# There are some essential language configuration settings stored as lang strings in langconfig.php: | |||
## '''thislanguage''': (Required) The name of the language, in the language. This is the string shown to users in the language selection menu. | |||
## '''locales''' (Required): A list of computer locale names for the language, in order of preference. For example: "en_US.utf8,en_GB.utf8,en,english-us,english-uk,english" | |||
## '''parentlanguage''': (Optional) If this is supplied, then if a string is not yet translated in the langpack, Mahara will attempt to use a string from the specified parent language instead. (If the parent language doesn't have it either, it will fall back to English.) | |||
* [[ | For more information please read [https://help.launchpad.net/Translations/StartingToTranslate the Launchpad help page]. | ||
* [[ | |||
==Contribute to existing translation== | |||
There are two ways to contribute to an existing translation | |||
* Launchpad web translation tool | |||
The easiest way to translate a few language strings | |||
# On the [https://translations.launchpad.net/mahara-lang/trunk/+pots/mahara list of translations], you can see the number of still untranslated strings for each language | |||
# Follow this link to get to the web translation tool <br/>[[File:Untranslated number.png|Image of number of untranslated strings]] | |||
# On the translation tool you can select the ones you choose to translate and submit them. | |||
* Upload the complete translation | |||
This option is better if you want to make a complete translation for one of Mahara versions (eg. 20.04) | |||
# The first thing to do is download the template .po file for the language. This will have the existing translations if there are any and the strings that need to be translated. To get this template you need to | |||
## Go to the [https://translations.launchpad.net/mahara-lang main translation page] and select the series you want to translate | |||
## Once there, choose the language | |||
## Click on "download translation" and "Request download" | |||
# An email with the .po file will be sent to your email address. You can work on the translation on this file. | |||
# Once the translation is finished, it needs to be uploaded to launchpad on the same page where you downloaded the template (From the main translation page, follow series and language) | |||
# This translation needs to be approved by our team before is available in the language pack. | |||
===Where should you translate? Trunk or a specific version?=== | |||
The answer to that is: It depends. If you want to fix something in a specific version, you can do so directly there. If you want to update strings, it's best done in the trunk version though, i.e. the future version of Mahara as that information does propagate through to older version if the same language string is used. | |||
[https://mahara.org/interaction/forum/topic.php?id=8809&post=34984 Ralf's investigation] showed: | |||
* Translations made in the trunk version are added automatically to the version packages. New strings should be translated in trunk. | |||
* Changes or corrections in existing strings in trunk are also copied into the versions. | |||
==Git-based translations== | |||
{{Obsolete}} | |||
A couple of translations (currently just Czech and English(US)) are not maintained on Launchpad yet. For information about the older translation process, see the documentation on [[Developer Area/Language Packs/Translation Tools|Translation Tools]]. For moving existing translations from the old process to the new process, see the instructions on [[Developer Area/Language Packs/Launchpad Migration|migrating language packs from gitorious to launchpad]]. | |||
If you are in charge of an official translation administrator, you can follow the instructions for [[Developer Area/Language Packs/Launchpad New Language Packs|add new tar ball language pack to launchpad]] | |||
==langpacks.mahara.org scripts== | |||
See [[Developer Area/Language Pack Generation]] for information about the automated scripts that synchronize the langpacks on [https://langpacks.mahara.org langpacks.mahara.org] |
Latest revision as of 12:12, 25 Haziran 2021
Here you can find information about developing new language packs for Mahara. If you speak another language, then you should be able to translate Mahara, or help with a translation effort already in place.
Remember to check the list of existing language packs at langpacks.mahara.org first - you may find that Mahara has already been translated into the language you want!
Launchpad translations
Most translations are now maintained in the Mahara translation project on Launchpad.
If you would like to help with one of these translations, first have a look at the list of translation teams. If your language has a team appointed in this list, you will need to join the appropriate team for your language before you can help with the translation.
If you would like to start a new translation, or if your language doesn't have an appointed team, you can help with the translation as soon as you have created an account on Launchpad.
How to start a new translation
If your language doesn't appear in the list of Mahara Translation status by language (Click 'View all languages' to see all available languages), you can start a new Mahara translation for your language. Here is a quick instruction.
- Create an account on Launchpad if you don't have one.
- If there is a Mahara translation team responsible to your language, please join this team. Otherwise, please contact an administrator of the Mahara translators. Alternatively, you can join the translation team for your language in general.
- Once you are in a Mahara translation team, you can start to translate or review existing strings on Launchpad.
- Once you are ready to test your translation (it does not have to be complete), please contact us to have your translation added to the official list at langpacks.mahara.org.
- You can continue to update your translation on Launchpad. Your tar ball in Mahara format will be automatically generated and stored at langpacks.mahara.org when changes are detected (usually once per day depending on Launchpad).
- There are some essential language configuration settings stored as lang strings in langconfig.php:
- thislanguage: (Required) The name of the language, in the language. This is the string shown to users in the language selection menu.
- locales (Required): A list of computer locale names for the language, in order of preference. For example: "en_US.utf8,en_GB.utf8,en,english-us,english-uk,english"
- parentlanguage: (Optional) If this is supplied, then if a string is not yet translated in the langpack, Mahara will attempt to use a string from the specified parent language instead. (If the parent language doesn't have it either, it will fall back to English.)
For more information please read the Launchpad help page.
Contribute to existing translation
There are two ways to contribute to an existing translation
- Launchpad web translation tool
The easiest way to translate a few language strings
- On the list of translations, you can see the number of still untranslated strings for each language
- Follow this link to get to the web translation tool
- On the translation tool you can select the ones you choose to translate and submit them.
- Upload the complete translation
This option is better if you want to make a complete translation for one of Mahara versions (eg. 20.04)
- The first thing to do is download the template .po file for the language. This will have the existing translations if there are any and the strings that need to be translated. To get this template you need to
- Go to the main translation page and select the series you want to translate
- Once there, choose the language
- Click on "download translation" and "Request download"
- An email with the .po file will be sent to your email address. You can work on the translation on this file.
- Once the translation is finished, it needs to be uploaded to launchpad on the same page where you downloaded the template (From the main translation page, follow series and language)
- This translation needs to be approved by our team before is available in the language pack.
Where should you translate? Trunk or a specific version?
The answer to that is: It depends. If you want to fix something in a specific version, you can do so directly there. If you want to update strings, it's best done in the trunk version though, i.e. the future version of Mahara as that information does propagate through to older version if the same language string is used.
Ralf's investigation showed:
- Translations made in the trunk version are added automatically to the version packages. New strings should be translated in trunk.
- Changes or corrections in existing strings in trunk are also copied into the versions.
Git-based translations
A couple of translations (currently just Czech and English(US)) are not maintained on Launchpad yet. For information about the older translation process, see the documentation on Translation Tools. For moving existing translations from the old process to the new process, see the instructions on migrating language packs from gitorious to launchpad.
If you are in charge of an official translation administrator, you can follow the instructions for add new tar ball language pack to launchpad
langpacks.mahara.org scripts
See Developer Area/Language Pack Generation for information about the automated scripts that synchronize the langpacks on langpacks.mahara.org