翻訳FAQ

提供:MoodleDocs
移動先:案内検索

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“ を使って話すフォーマルな言語があります。これは正式な大人用の言葉です。それは、英語で „Sir“ という言葉を使うのと似たようなものだと思います。通常のドイツ語パックでは、このようなフォーマルな言葉が使われています。Moodle言語パックおよび翻訳されたプラグインのほぼすべての文字列は、フォーマルな言語で翻訳されています。
  • 学校ではこれらのフォーマルな言葉を使うことはできません...そこでは „du“ を用いた非公式な言語が使われています。学生たちは友達同士のように会話しています。そのため、私たちは „German personal“(de_du)という言語パックを作りました。このパックには、„du“、„dein“、„dir“ などの個人的な言葉が含まれています。対して、フォーマルな言葉は „Sie“、„Ihre“、 „Ihnen“ です(はい、これらの単語は大文字で書かれます)。
  • 私(Ralf Krause)は個人的には、 „German personal"(de_du)または „German Kids“(de_kids)を使用しています。„German Kids“ は „du“、„dein“、„dir“ といった個人的な言葉を使用しますが、より理解しやすい言語も使用しています。
  • しばらく前、私たちは Moodle をソーシャル・コミュニケーションのプラットフォームにしようとしましたが、誰も使いたがりませんでした。だから、私たちは "ドイツ人コミュニティ "を作りました。 ソーシャルプラットフォームでは、誰も教師や学生、参加者、教室、コースについて話しません...ソーシャルプラットフォームでは、グループのメンバーやミーティングを使用します。このパックが将来使用されるかどうかはわかりません。

Moodleにスペイン語用の言語パックが複数存在するのはなぜですか?

  • スペインや多くの南米諸国では、メキシコや中央アメリカで使用されている(小数点)とは異なる(コンマ)小数点区切り記号が使用されています。
    • 英語の Moodle コアでは、デフォルトで小数点が計算に使用され、Moodle Docs も同様です。
    • これにより、評定表の計算およびスペイン語 Moodle Docs で多くの問題が発生しました。
  • "アメリカとイギリスは共通の言語で分かれた二つの国家である" ことと同様に、スペインとメキシコも同じです。メキシコのスペイン語ドキュメント のスペイン語のページをご覧ください。
  • ベネズエラのスペイン語(es_ve)は、国際的なスペイン語の非常に小さな派生言語です。
  • コロンビアのスペイン語(es_co)は、国際的なスペイン語の非常に小さな派生言語です。
  • メキシコのスペイン語(es_mx)は、非常に現代的で包括的な独立した言語パックであり、特にメキシコのMoodlerのために作られました。
  • メキシコの子供向けスペイン語(es_mx_kids)は、Moodle ユーザがよく目にするメキシコのスペイン語文字列を簡略化したもので、小さな子供にとってより簡単で適切とされています。
  • 2つの(現在は廃止された)他のスペイン語派生言語 について読むことができます。

他の言語に派生言語があるのはなぜですか?

  • コード名に -kids がつく言語はすべて、小さな子供向けの一般的な言語文字列を簡略化した派生言語です。
  • もし時間があるのなら、メインの言語パックの中に、このような子供向けの派生言語を一つ入れておくとよいでしょう。
  • 現在(2022年中旬)の子供向け言語は以下の通りです:
    • 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)(ノルウェー語 (初級)) 言語パックは初等教育向けです。
  • 企業向けフィンランド語は企業を対象としています。

翻訳してはいけない項目はありますか?

{波括弧}で囲まれたMoodle変数

以下の単語を{波括弧}で囲むと、Moodle の変数名のプレースホルダになります。これらは翻訳されるべきでなく、波括弧内のままでなければいけません:

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

また、ドキュメントページ(このページのような)のすべての翻訳においても、このように正確に記述されなければなりません。しかし、翻訳者は括弧で囲まれた訳を入れたくなるかもしれません。例えば、スペイン語のドキュメンテーションページでは、以下のような表記を見つけるかもしれません: パスワード (contraseña)。

実際のところ、AMOSではプレースホルダを翻訳することはできません。"予約された" $a プロパティの公式のリストはありません。{$a->xyz} 内に配置される xyz に関しては、AMOSではそのまま保持する必要があります。

例:

26 AMOS fullnamedisplay core original.png

この場合(メキシコスペイン語に翻訳する場合)は次のようにする 必要があります:

26 AMOS fullnamedisplay core.png

あなたの言語が、日本語のように姓を名前の前に置く場合を除いて、次のように翻訳されます:

26 AMOS fullnamedisplay core Japanese.png

% 文字で囲まれたプレースホルダ (%example%) は翻訳してはいけません

Moodle Cloud のサインアップおよびポータル文字列 ローカルプラグインは、 MoodleCloud へのアクセスに使用され、いくつかの文字列には % 文字で囲まれた単語(例: %date%)が含まれています。 これらの単語は翻訳してはならず、言語パックの翻訳にそのままコピーされる必要がありますが、文字列の残り部分は翻訳する場合もしない場合もあります。

  • 翻訳してはならず、正確にコピーしなければならない文字列の例:

AMOS placeholders with percentace character.png

  • 1つのプレースホルダ(強調表示)と翻訳が容易な通常のテキストを含む1つの文字列の例:

AMOS text with placeholders with percentace character.png

H5P内の % や : で接頭されるプレースホルダは翻訳してはいけません

3.9 以降 Moodle に統合された H5P エディタ には、"%" または ":" を接頭辞に持つ変数があり、これらは内部で正しい値に変換されるため、翻訳してはいけません。それらは Moodle の波括弧変数として扱われるべきです。

  • 翻訳してはならず、正確にコピーしなければならない "%" 付き変数の例:
 "Parameters contain %used while only %supported or earlier are supported."
 
 その場合、%used と %supported は翻訳しないでください。例えば、スペイン語の翻訳は以下のようになります:
 "Parámetros contiene %used mientras que sólo se soportan %supported o anterior.(パラメータは %used を含みますが、%supported もしくはそれ以前のみがサポートされています。)" 
  • 翻訳してはならず、正確にコピーしなければならない ":" 付き変数の例:
 "The :property value exceeds the maximum of :max."
 
 その場合、:property と :max は翻訳しないでください。この文字列のスペイン語訳は以下のようになります:
 "El valor de :property excede el máximo de :max.(:property の値が :max の最大値を超えています。)"

全てのフィールド名は英語で保持する必要があります

  • これらの名前はソフトウェアで使用されるフックです。翻訳しないでください。
  • Moodle 3.1 の tool_uploadcourse ファイル内の uploadcourses_help 文字列の例をご覧ください:

Fieldnames are not to be translatd.png

  • 文字列テキスト(赤い長方形)はこれらの単語(緑の長方形で囲まれた)がフィールド名であることを示している点に注意してください。また、ここで書かれているように、スペイン語翻訳文の最後の段落 (así escritos, en inglés) にこれらのフィールド名は英語で書かれなければならないと明確に示している点にも注意してください。
  • Moodle で使用されるフィールド名は以下の通りです:
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, 
  • これらのフィールド名が現れる文字列の例は、uploadcohorts_help|core_cohort、importgroups_help|core_group、uploadcourses_help|tool_uploadcourse、uploadusers_help|tool_uploaduser です。
  • これらのフィールド名は、実際のフィールド名(翻訳してはならない)として表示されることもあれば、別の文脈で通常の単語として表示されることもあります(翻訳可能であり、翻訳しなければならない)。注意して、可能であれば、あなたの翻訳を本番またはテストサーバ上でいくつかのデータを使ってテストして Moodle が正しく動作することを毎回確認してください。

<a href="../ に続くローカルアドレス

<a href="../ を持つ言語文字列内のアドレスは、あなたの Moodle サーバ内の特定の URL を参照し、あなたは表現のアドレス部分を保持しなければなりませんが、説明の記述名部分は翻訳することができます。以下の例をご覧ください:

noassignableroles | tool_cohortautoroles
現在、ユーザコンテキストで割り当てることができるロールはありません。 <a href="../../roles/manage.php">ロールの管理</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

ロールを管理するために実行されるあなたの Moodle サーバの PHP コードを参照するために、<a href="../../roles/manage.php"> の部分は保持しなければなりません。

  • 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 ;-)

関連項目