Moodleの翻訳を手伝うにはどうすればいいですか?

翻訳の寄稿 ガイドをご覧ください。

言語パックにエラーが見つかりました。どうすればいいですか?

月名と曜日が英語で表示されます。どうすれば翻訳できますか?

これは Moodle のバグでも翻訳ミスでもありません。日および月の名前は、あなたのオペレーティングシステムから引き出されます。Moodle が動作しているあなたのサーバには、特定の ロケール がインストールされていないようです。サーバ管理者に連絡して、必要なロケールをインストールしてもらう必要があります。詳しくはロケールテーブルを参照してください。

指定された言語に使用する特定のロケールは、langconfig.php ファイルの文字列 locale(Unix系オペレーティングシステム用)および localewin(Windowsオペレーティングシステム用)で設定されます。

Ubuntu/Debianでは、locale-all パッケージをインストールすることで、既存のすべての言語をサポートすることができます。

Mac OS はロケールのサポートが非常に限られていることで知られています。これは修正できません。

ログの説明が英語で表示されるのはなぜですか?

ログレポートでは、説明は英語のみで表示されることを意図しており、翻訳することはできません。例えば "The user with id '2' viewed the course with id '4'." という記述です。

新しい言語パックを開始するか、言語パックを寄稿する予定です。まず、ユーザインターフェースの文字列を翻訳してもよいですか?

申し訳ありませんが、どの文字列がユーザに表示されるかどうかはわかりません。しかし、少しでも参考になるように、非公式な優先順位がいくつかあります。

はじめに:

  • Langconfig が適切に設定されているか確認してください。
  • 翻訳優先度 を確認してください。すべてのファイルには、翻訳を必要とする緊急度に応じて評価があります。
  • 標準的な Moodle ディストリビューションに含まれていないため、寄稿されたプラグインもあまり緊急ではありません。翻訳の優先を検討する価値があるかもしれない、Moodle のダウンロードプラグイントップ20 のリストがあります。

英語の言語パックにはいくつの単語がありますか?

英語の言語パックにはいくつの単語がありますか? のディスカッションを参照してください。

複数の言語パックが利用可能なMoodleの言語

アメリカ英語(およびその他の英語のバリエーション)に対する翻訳はありますか?

Moodleの "公式" 言語は実際にはオーストラリア英語です(G'day mate!)。これはほぼ100%イギリス英語と同じです。かつて "アメリカとイギリスは共通の言語によって分断された2つの国家です" と 誰か が言ったことがあります。

  • 英語 - アメリカ合衆国(en_us)の言語パックには、主に異なる綴り(color に対して colour、enroll に対して enrol など)が含まれています。
  • 英語 - 海賊語(en_ar)の言語パックは、 '海賊のように話す' 日に使用されます。
  • 英語 - アメリカ合衆国 K12(en_us_k12)の言語パックは、アメリカ、カナダ、および他の英語圏の K-12(幼稚園から12年生まで)の小中等教育で使用されています。この言語パックには、en_us 言語パックの綴りが含まれており、"course" という用語は "class" と改名されています。
  • 子供向け英語 (en_kids) 言語パックは、Moodle ユーザがよく目にする英語の文字列を簡略化したもので、小さな子供により簡単で適していると考えられています。
  • 英語 (修正) (en_fix) 言語パックは、英語の言語文字列の改善 ガイドで説明されているように、Moodle コア言語文字列の改善およびタイプミスの修正を提案するために使用されます。

Moodleにはドイツ語用に4つの異なる言語パックがあるのはなぜですか?

  • ドイツでは、お互いに „Sie“ を使って話すフォーマルな言語があります。これは正式な大人用の言葉です。hink it’s something like using „Sir“ in english language. The normal German language pack is using this formal language. Nearly all strings in the Moodle language pack and in the translated plugins are translated in the formal language.
  • You can’t use these formal words in school … there you are using an informal language with „du“. Students are talking to each other like friends. Therefor we made the language pack „German personal“ (de_du). It come with the personal words „du“, „dein“, „dir“ and so on where the formal words are „Sie“, „Ihre“, „Ihnen“ (yes, these words are written with an uppercase letter).
  • For my (Ralf Krause) personal use I take „German personal" (de_du) or „German Kids“ (de_kids). „German Kids“ uses the personal words „du“, „dein“ and „dir“ but it also uses an easier to understand language.
  • Some time ago we tried to make Moodle as a platform for social communication but nobody wanted to use it. Therefore we made "German community“. In a social platform, nobody would talk about teachers or students or participants or classrooms or courses … in a social platform, you would use members of a group and meetings. I don’t know if this pack will be used in future.

Why does Moodle have several different language packs for the Spanish language?

  • Spain and many South American countries use a (comma) Decimal separator that is different from the (decimal point) used in Mexico and Central America.
    • Moodle core in English uses by default a decimal point for calculations, and Moodle Docs do too.
    • This caused many problems in the Gradebook calculations and with the Spanish Moodle Docs.
  • Just as "America and England are two nations divided by a common language", so are Spain and Mexico. See the Mexican Spanish documentation page in Spanish.
  • The Venezuelan Spanish (es_ve) is a very small child language of the international Spanish language.
  • The Colombian Spanish (es_co) is a very small child language of the international Spanish language.
  • The Mexican Spanish (es_mx) is a very modern, comprehensive, independent, language pack, specially made for Mexican Moodlers.
  • The Mexican Spanish for kids (es_mx_kids) is a simplified version of the most common Mexican Spanish strings seen by Moodle users, considered easier/suitable for small children.
  • You can read about two (now defunct) other Spanish child languages.

Why do other languages have child languages?

  • Languages with -kids in their code names are all child languages with a simplified version of common language strings aimed at small children.
  • If you have the time, it is probably a good idea to have one such child language for kids for your main language pack.
  • Current (mid 2022) languages for kids are:
    • Deutsch (kids)
    • English (kids)
    • Español de México para niños (Mexican Spanish for kids)
    • Ελληνικά για παιδιά (Greek for kids)
    • עברית בתי־ספר (Hebrew for kids)
    • हिंदी (Hindi for kids)
    • Japanese (kids)
    • Deutsch - Kids
  • Norwegian (Primary) language pack is aimed at primary education.
  • Finnish for companies is aimed at companies.

Are there items which are NOT to be translated?

Moodle variables enclosed within {curly brackets}

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:

26 AMOS fullnamedisplay core original.png

Must be (in this case, when translated into Mexican Spanish):

26 AMOS fullnamedisplay core.png

unless your language uses lastname before the firstname, as Japanese does, which translates to:

26 AMOS fullnamedisplay core Japanese.png

Placeholders enclosed within % characters (%example%) must not be translated

The Moodle Cloud Signup and Portal strings local plugin is used for accessing the MoodleCloud and it includes several strings that have some words surrounded by % characters (eg, %date%). These words must not be translated, they must be copied exactly into the language pack translation, but the rest of the string might or might not be translated.

  • Example of one string that can not be translated and must be copied exactly:

AMOS placeholders with percentace character.png

  • Example of one string with one placeholder (highlighted) and some regular text that can be easily translated:

AMOS text with placeholders with percentace character.png

Placeholders in H5P prefixed with % or : characters must not be translated

The H5P editor integrated with Moodle since 3.9 has some variables prefixed with "%" or ":" that must not be translated because they are transformed internally with the correct value. They should be treated as the Moodle curly brackets variables.

  • Example of variables with "%" that can not be translated and must be copied exactly:
 "Parameters contain %used while only %supported or earlier are supported."
 
 In that case, %used and %supported must not be translated. So, for instance, the Spanish translation would be something like:
 "Parámetros contiene %used mientras que sólo se soportan %supported o anterior." 
  • Example of variables with ":" that can not be translated and must be copied exactly:
 "The :property value exceeds the maximum of :max."
 
 In that case, :property and :max must not be translated. The Spanish translation for this string would be something like:
 "El valor de :property excede el máximo de :max."

All fieldnames must be kept in English

  • These names are hooks that are used in the software. You should not translate them.
  • See the example below for the string uploadcourses_help in the file tool_uploadcourse for Moodle 3.1:

Fieldnames are not to be translatd.png

  • Notice that the string text indicates (red rectangle) that these words (enclosed in green rectangles) are fieldnames. Also notice that the Spanish translation clearly indicates, at the final part of the paragraph (así escritos, en inglés) that these fieldnames must be written in English as they are written here.
  • Some used fieldnames in Moodle are:
category, category_id, category_idnumber, category_path, context, course, description, descriptionformat, email, enrolmentkey, firstname, fullname, groupname, hidepicture, idnumber, intro, lastname, maxgrade, maxrequest, name, password, picture, section, shortname, teachers, timeopen, timeclose, timeend, timestart, username, visible, 
  • Examples of strings where these fielnames appear are uploadcohorts_help | core_cohort, importgroups_help | core_group, uploadcourses_help | tool_uploadcourse and uploadusers_help | tool_uploaduser.
  • Note that these fieldnames may appear as real fieldnames (must not be translated) or as regular words in another context (can and must be translated). You should exercise caution and, If possible, always check that Moodle works correctly by testing your translations with some data in a real or test server.

Local addresses after <a href="../

Addresses inside a Language string that have <a href="../ reference a specific URL inside your Moodle server and you must keep the address part of the expression, but you can translate the descriptive name part. See the following example:

noassignableroles | tool_cohortautoroles
There are currently no roles that can be assigned in the user context. <a href="../../roles/manage.php">Manage roles</a>
  • You must keep the <a href="../../roles/manage.php"> part, as this references to the PHP code in your Moodle server that will be executed in order to manage roles
  • You can/should/must translate 'Manage roles'
  • Do not forget to keep the ending </a>

Moodle Docs addresses after
<nowiki><a href="http://docs.moodle.org/en/</nowiki>

Addresses inside a Language string that have

<nowiki><a href="http://docs.moodle.org/en/ </nowiki>

reference a specific URL in the Moodle English Documentation. You must look at that address and only if your language has a valid translation for that page, you can/should replace the original English Docs address with your own language address. See the following example:

core backup | nonisowarning
Warning: this backup is from a non-Unicode version of Moodle (pre 1.6). If this backup contains any non-ISO-8859-1 texts then they may be CORRUPTED if you try to restore them to this Unicode version of Moodle. See the <a href="http://docs.moodle.org/en/Backup_FAQ">Backup FAQ</a> for more information about how to recover this backup correctly.
  • There are six different language translations for that page. So, you can only replace this address if your language is one of these.

Other internet addresses after <a href="http://

  • You must proceed as with Moodle Docs addresses:
  • Example:
auth_radius | auth_radiusdescription
This method uses a <a href="http://en.wikipedia.org/wiki/RADIUS">RADIUS</a> server to check whether a given username and password is valid.
  • You must check the (English language wikipedia) page about the RADIUS server, and then you can decide whether to keep this address or replace it with your own language matching wikipedia translation.

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.

  • &nbsp
    
    - 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.
  • &ensp
    
    and
    &emsp
    
    - denote an en space and an em space respectively, where an en space is half the point size and an em space is equal to the point size of the current font. For fixed pitch fonts, the user agent can treat the en space as being equivalent to a single space character, and the em space as being equuivalent to two space characters.
  • &amp
    
    - ampersand sign (&)
  • &apos
    
    - apostrophe sign (')
  • &copy
    
    - copyright sign (©)
  • &plusmn
    
    - "plus or minus" sign (±)
  • &times
    
    - multiply sign (*)
  • &divide
    
    - divide sign (/)
  • &gt
    
    - "greater than" sign ( > )
  • &lt
    
    - "less than" sign (<)
  • &laquo
    
    - quotation mark (‘)
  • &lsquo
    
    - left single quotation sign (‘)
  • &rsquo
    
    - right single quotation sign (’)
  • &ouml
    
    - small letter o with diaeresis (ö)
  • &mdash
    
    - em dash sign (—)

Calculation functions must not be translated

Calculation functions start with an equal sign (=). Following is an expression using operators and functions supported by the system. ファイル:DO NOT translate calculation functions.png

The 'thisdirection' and 'thisdirectionvertical' strings in core_langconfig should never be translated

The 'thisdirection' and 'thisdirectionvertical' strings in core_langconfig should never be translated, as they are not variables meant to be translated. They are prefixing selectors used by the themes to display left-to-right or right-to-left languages. Read more about problems with these variables.

MoodleBox

The word 'MoodleBox' must be kept in all languages.

Safe Exam Browser

A feedback by the Safe Exam Browser main developer:

The software is called “Safe Exam Browser” in any language, we don’t translate the name of the application. So it doesn’t make sense to translate it in any plugin, you could use it as a subtitle or in brackets, like “Safe Exam Browser (Navegador de Examen Seguro)”.

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 this trick to check for integrity:
    • Load the language pack in a local instance of Moodle.
    • In order to generate a translation memory, load the language pack in the 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 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?

  • Read the 'Is there a way to check the integrity of all placeholders in a language pack?' section above.
  • See this post and 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 Finding the component and string identifier and 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.

Two simultaneous windows in two languages

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 AMOS translation forum.

Is there a list of Moodle error messages which can be translated?

Error messages are listed in the user docs Category:Error.

Can the User Tours from Moodle.net be translated?

How can I test my plugins translations of several (different) Moodle branches?

  • Linux
    • You can have several Moodle branches in one Ubuntu (or any other Linux distro) machine by following these steps.
  • Windows
    • You can have several local Moodle servers in different folders in a Windows (7,8,10) PC. It is very easy to start one branch server, work on it, stop it and then start a different branch.
注意: Some early local Moodle (versions before 3.0) server packages from https://download.moodle.org/windows/ only work in Windows 7, but apparently not in Windows 8 and definitely not in Windows 10, regardless of compatibility settings. For these you would need to install XAMP separately. Moodle 3.0 and newer branches do work under Windows 10.
  • Mac
    • We need to write about this...

Can I translate a language pack offline / can I use another language then English as source language?

Yes you can, but it is not recommended because there is a high risk of causing problems (remember - sites update language packs automatically, so your problem spreads quickly over the world). One problem is that you absolutely have to avoid untranslated strings or strings in the wrong language in the language pack. This should NEVER happen. Another problem is that there is no way to know which strings are already translated. There is also a higher risk for syntax errors. If you have to, you can follow the following procedure:

  • download the English language pack (or another one if you want a different source language)
  • translate directly in the php file, preferably using something with syntax highlighting (Geany, Gedit, Notepad++ on Windows, ...)
  • IMPORTANT: delete all not-translated lines from the file, before uploading - therefore it is probably best to translate line by line and keep the original source files, so you can work with a record of processed line numbers.
  • import the files in the translation portal following the manual on https://docs.moodle.org/dev/AMOS_manual#Importing_a_file (IMPORTANT: zip file cannot contain any folders)

How can I translate H5P content types?

Use the Weblate H5P project translation page or see the h5p.org guide Adding content type translations via GitHub and the forum discussion Translate H5P items.

How can I make the translations for all the contributed plugins I use complete?

  • create a list of all contributed plugins you use by visiting https://yourmoodlesite/moodle/admin/plugins.php?updatesonly=0&contribonly=1
  • copy the list of contributed strings in a temporary file temp.txt
  • use the linux command
    echo "https://lang.moodle.org/local/amos/view.php?c="`grep _ temp.txt | tr "\n" ","`"&s&d&m=1"
    
    to generate a permalink to visit the Moodle translation site, checking what is missing. You will have to clean up the link, because there might be a few other things then module names in there, but the result is a link, showing all the translations that are missing or outdated for your Moodle site on the Moodle translation server. While you are there, please fix them ;-)

関連項目