Note:

If you want to create a new page for developers, you should create it on the Moodle Developer Resource site.

Translation FAQ: Difference between revisions

From MoodleDocs
(tidy up)
(redirect)
Tag: Replaced
 
(70 intermediate revisions by 9 users not shown)
Line 1: Line 1:
{{Translation}}
This page is now located in the user docs: [[:en:Translation FAQ|Translation FAQ]]
==How can I help with translating Moodle?==
 
Please see the guide [[Contributing a translation]].
 
==I've found an error in a language pack. What do I do?==
 
* You are welcome to [[Contributing a translation|contribute a fix]] for the error. Alternatively you can contact the language pack maintainer as listed in the [http://lang.moodle.org/local/amos/credits.php Translation credits].
* English language string typo fixes and suggested improvements can be [[Improving English language strings|contributed to the English (fixes) (en_fix) language pack]].
 
==The month names and days are displayed in English. How can I translate them?==
 
Names of days and months are pulled out of your operating system. The system is configured for Moodle in langconfig.php where you have the strings ''locale'' (for -nix type operating systems) and ''localewin'' (for Windows operating systems) that should point to the right locale on your server. Your server operating system should support the language (= locale should be installed) - see also [http://moodle.org/mod/forum/discuss.php?d=79792 Month-name translation problem] for an alternative solution.
 
==Some columns in Moodle reports are in English. How can I translate them?==
* The [https://docs.moodle.org/30/en/Logs#Live_logs_from_the_past_hour Live logs] have a column that will allways be shown in English, as these are the names of the Moodle function calls, and when a user clicks on one, it will call that function and you will see the result.
 
[[File:Live_logs.png|Path to Live logs in English|400px]]
*The image above shows how you navigate to the  [https://docs.moodle.org/30/en/Logs#Live_logs_from_the_past_hour Live logs] option.
 
 
[[File:Live logs SPANISH.png|Path to Live logs in Spanish|400px]]
*The image above shows how you navigate to the ''Bitácoras en vivo'' (live logs) option in a Mexican-Spanish site.
 
 
[[File:Screen with Live logs ENGLISH.png|Live logs in English|800px]]
* Above are the live logs in an English language site.
 
 
[[File:Screen with Live logs SPANISH.png|Live logs in Spanish, but with some English texts|800px]]
* Above are the live logs in a Mexican-Spanish language site. Notice that the ''course report live'' and ''course view'' Actions are in English.
 
* The ''Acción (Action)'' column in the Spanish language site will allways have '''all the names''' in English!
* There will allways be some English texts in an otherwise fully translated Moodle site, as these are the names of Moodle function calls that can not be translated.
 
==I'm starting a new language pack or I'm contributing to one. Can I do the user interface strings first?==
 
No, there is no way to know which strings will be shown for users and which not. But to help you a little bit, there are some unofficial priorities you can take into account.
 
First:
* make sure [[Translation_langconfig|langconfig]] is properly set up.
* take a look at [[Translation priority]]. All files have a rating according to how urgent they need translating.
* less urgent are also the contributed plugins, since they are not part of a standard Moodle distribution. There is a list of [https://moodle.org/plugins/stats.php the 20 top plugins downloads for Moodle] which might be worth considering for translation priority.
 
==How many words are there in the English language pack?==
 
See the discussion [http://lang.moodle.org/mod/forum/discuss.php?d=3651 How many words are there in the English language pack?].
 
==Are there translations for the American (and other branches of the) English language?==
 
* The [http://lang.moodle.org/mod/forum/discuss.php?d=2617 "official"] language for Moodle is actually Australian English (''G'day mate!'') , which is almost 100% the same as UK English.
* [http://english.stackexchange.com/questions/74737/what-is-the-origin-of-the-phrase-two-nations-divided-by-a-common-language Someone] once said "America and England are two nations divided by a common language".
* The [http://download.moodle.org/download.php/langpack/2.6/en_us.zip English - United States (en_us)] language pack mostly contains different spellings (color ''versus'' colour, enroll versus enrol etc).
* The [http://download.moodle.org/download.php/langpack/2.6/en_ar.zip English - Pirate (en_ar)] language pack is used in the '[https://moodle.org/mod/forum/discuss.php?d=132888 Talk Like a Pirate]' day.
* The [http://download.moodle.org/download.php/langpack/2.6/en_kids.zip English for kids (en_kids)] language pack seems to be a simplified version of the most common English strings seen by Moodle users, considered easier/suitable for small children.
* The [https://tracker.moodle.org/browse/MDLSITE-1363 English (fixes) (en_fix)] is just used to suggest Moodle core language strings improvements and typo fixes.
 
==Are there items which are not to be translated?==
 
The following words, when enclosed within {curly brackets}, are placeholders for Moodle names of variables. They should not be translated, but must remain as they are within the curly brackets:
 
firstname, lastname, username, email, city, country, lang, timezone, mailformat, maildisplay, maildigest, htmleditor, ajax, autosubscribe , institution, department, idnumber, skype , msn, aim, yahoo, icq, phone1, phone2, address, url, description, descriptionformat, password, auth, oldusername , deleted, suspended, course1, course2, course3, course4
 
They must also be written exactly like this in all translations of the documentation pages (such as this page.) However, the translator might like to include a translation enclosed in brackets. For example, in the Spanish documentation pages you might find: password (''contraseña'').
 
The fact is: '''no placeholders can be translated in AMOS'''. There is no official list of "reserved" $a properties. Whatever xyz is put in {$a->xyz}, it must be kept as it is in AMOS.
 
Example:
 
[[File:26 AMOS fullnamedisplay_core original.png]]
 
'''Must''' be (in this case, when translated into Mexican Spanish):
 
[[File:26 AMOS fullnamedisplay_core.png]]
 
unless your language uses lastname before the firstname, as Japanese does, which translates to:
 
[[File:26 AMOS fullnamedisplay_core Japanese.png]]
 
===HTML codes that must not be translated===
The following HTML codes are reserved words that must not be translated. However, it is important for the translators to understand their meaning in order to decide whether to keep them in the translation and if so, whether they can be rearranged.
 
* <code>&nbsp</code> - non-breaking space i.e. a space but there will never be a line-break inserted instead of this space at the end of a line
* <code>&amp</code> - ampersand sign (&)
* <code>&apos</code> - apostrophe sign (')
* <code>&copy</code> - copyright sign (©)
* <code>&plusmn</code> - "plus or minus" sign (±)
* <code>&times</code> - multiply sign (*)
* <code>&divide</code> - divide sign (/)
* <code>&gt</code> - "greater than" sign ( > )
* <code>&lt</code> - "less than" sign (<)
* <code>&laquo</code> - quotation mark (‘)
* <code>&lsquo</code> - left single quotation sign (‘)
* <code>&rsquo</code> - right single quotation sign (’)
 
==Is there a way to check the integrity of all placeholders in a language pack?==
* Not a at the moment. See MDL-51775 .
* You can use [https://lang.moodle.org/mod/forum/discuss.php?d=4661 this trick] to check for integrity:
**  Load the language pack in a [https://download.moodle.org/windows/ local instance of Moodle].
**  In order to generate a [https://lang.moodle.org/mod/forum/discuss.php?d=4098 translation memory], load the language pack in the [https://docs.moodle.org/29/en/Language_customisation Language customization] tool, so that the texts are loaded in the database.
**    Run the sql instance in the file (tm_generator.txt)
**    Insert the result of the query in template.tmx file
** The result is a translation memory that can be analysed  with [http://www.opentag.com/okapi/wiki/index.php?title=CheckMate Checkmate].
** The problem: probably you will get many errors due to some characters that are not allowed by Checkmate so you will have to remove manually some translation units. After doing it, you will get a report with some possible errors (see the attached image).
** Of course, it would be great to have an integrated quality check system in Moodle. Vote for MDL-51775 .
 
* The contents of the file tm_generator.txt are ('''change the language from eu to your language'''):
SELECT concat('<tu tuid="',mdl_tool_customlang_components.name,'|',mdl_tool_customlang.stringid,'">
<tuv xml:lang="en"><seg>',mdl_tool_customlang.original,'</seg></tuv>
<tuv xml:lang="',mdl_tool_customlang.lang,'"><seg>',mdl_tool_customlang.master,'</seg></tuv>
</tu>') as txt
FROM mdl_tool_customlang INNER JOIN mdl_tool_customlang_components ON mdl_tool_customlang.componentid =  mdl_tool_customlang_components.id
WHERE (((mdl_tool_customlang.lang)="eu") AND ((mdl_tool_customlang.original) Is Not Null) AND ((mdl_tool_customlang.master)  <>mdl_tool_customlang.original));
 
* the contents of the template.tmx file are:
<?xml version="1.0" encoding="UTF-8"?>
<tmx version="1.4"><header creationtool="SQLQuery" creationtoolversion="unknown" segtype="paragraph" o-tmf="unknown" adminlang="en" srclang="en" datatype="unknown"></header><body>
PLACE HERE THE RESULT OF THE SQL QUERY
</body>
</tmx>
 
==What is a ''translation memory'' and how can I create a translation memory out of a Moodle language pack?==
See [https://lang.moodle.org/mod/forum/user.php?id=1489&page=1 this post] and [https://dl.dropboxusercontent.com/u/86242384/moodle/en/publish/moodle_tm/website_index.html this tutorial].
 
==How can I help with translating Moodle documentation?==
 
Please see the guide [[Translating Moodle Docs]].
 
==How can I find out the context of the strings?==
 
You can find where a language string is located as described in the user docs [[:en:Language FAQ|Language FAQ]].
 
You may wish to use two windows (perhaps using two monitors), with one displaying the page in English and the other displaying the page in your language.
 
[[File:two windows translation.jpg|Two simultaneous windows in two languages|800px]]
 
If you think the original English language strings have more than one meaning and you can't guess which one applies, you are welcome to post in the [https://lang.moodle.org/mod/forum/view.php?id=5 AMOS translation forum].
 
==Is there a list of Moodle error messages which can be translated?==
 
Error messages are listed in the user docs [[:en:Category:Error|Category:Error]].
 
==Can the subtitles for Moodle HQ YouTube videos be translated?==
Yes. See [https://lang.moodle.org/mod/forum/discuss.php?d=4739#p5582 this forum thread].
 
==See also==
 
* [[:en:Language customization|Language customization]] in the user docs for information on how to edit an existing language pack
* [[String Deprecation]] is introduced in Moodle 2.8 to help minimize the language files but avoid accidental lost of translations by simply removing strings.
* [https://lang.moodle.org/mod/forum/discuss.php?d=4098#p4879 Generating a translation memory and running a quality test] forum discussion
 
[[de:Übersetzung FAQ]]

Latest revision as of 09:39, 9 September 2022

This page is now located in the user docs: Translation FAQ