Help:Extension:Translate/Page translation administration/ja

What. The page translation feature allows controlled translation of wiki pages into other languages. That means that the content of each translation will be, usually, equal to the source page. This is opposed to, for example, the different language version of articles in different Wikipedias, which are fully independent of each other. It is assumed that pages are only translated from one primary language to other languages, but translators can take advantage of translations in other languages too if they exist.

Why. Without any help, translating more than a few pages into other languages becomes a time-waster at best, an unmaintainable mess at worst. With the page translation feature you can avoid the mess and bring structure to the translation process. The core idea is that the source text is segmented into smaller units, each of which will be translated individually. When the source text is segmented into units, all changes can be isolated and translators only need to update the translations of units which have had changes in source text. This also enables translators to work on units of manageable size and share the work between multiple translators or continue the translation in later sessions, because they don't need to do all at once.

Who. This page elaborates on the page translation tutorial by providing deeper insight on how the system works, and suggests best practices for a wide variety of cases. This page is intended for page translation administrators and generally for everyone who edits the source text of translatable pages, even if they don't have the access to the administrative features of approving changes for translation.

翻訳対象ページの一連の流れ
Roles. Multiple people are involved in the process of writing and translating a wiki page: the initial writer creates a page, someone corrects spelling errors, a page translation administrator marks the page for translation, translators translate, someone makes changes to the page, a page translation administrator marks those changes for translation and translators update translations. Those roles may overlap more or less, but the ultimate responsibility for a hassle-free translation is left for the page translation administrator. The administrator decides when the page is ready for translation the first time, ensures that the segmentation serves a purpose and approves (or corrects) changes.

Preparation. To have something translated you have to write it first. If you already have done translation without the Translate extension, see below the section about migrating translations. If you want lots of translation and quickly, it is crucial for the source text to be in good shape. Before marking page for translation, ask someone else to proofread it and if possible ask a language specialist to make the text more clear and concise. Difficult vocabulary and hard to understand sentences are a show stopper to many volunteer translations. Markup too can cause problems for translators, but as a translation administrator you can avoid those issues, see below the section about handling markup. Naturally the changes you make to the source text of translation force update of all existing translations, so it is better to wait until the contents of the page have stabilized. On the other hand, changes do happen, and the system handles that well, so check out the section about handling changes below.

Tagging. When the text is otherwise ready for translation, anyone can mark the translatable parts by wrapping them inside &lt;translate> tags and adding the &lt;languages /> bar to the page. The latter adds a list of all translations of the page, with their completion and up-to-date percentages. There is no other indication that translations exist. See below how to actually do the tagging. The system will detect when the tags are placed on the translatable page, and the page will have a link to mark it for translation. It will also complain and prevent saving if you for example forgot to add a closing tag. The translatable page will also be listed on Special:PageTranslation as ready for marking.

Marking. After the tagging, a translation administrator marks the page for translation. The interface is explained in Page translation example. The translation administrator's responsibility is to make sure that the segmentation makes sense and that tagging has been proper. The page can be marked again if it has changed in the meanwhile. See below how to make changes that cause minimal disruptions. The marking of the page starts a background process that uses MediaWiki's job queue. This process goes over each translation page and regenerates it: changes in the translation page template will be reflected and outdated translations will be replaced temporarily with the original source text. On the contrary, the translation interface is updated immediately.

Changes. Users can continue making changes to the translatable page source. The changes will be visible to users viewing the page in the source language, but translations are done against the translation units extracted from the last version of the translatable page which has been marked for translation: the translation pages are reported to be 100 % up to date if all translation units have been translated, even if the source page has new changes. You can easily see whether there are unmarked changes when viewing the translatable page in the source language: there is a notice at the top which says that you can translate this page and also links to changes if there are any.

翻訳元言語. 翻訳元言語の言語コードが付いた翻訳対象ページもあります. これは、翻訳元ページに使用される翻訳関連の特殊なタグやその他のマークアップを含んでいません. このページはインターフェイスからリンクされませんが、例えばページ (一般に翻訳の雛形) を参照読み込みする際やそれを書き出す際に役立ちます.

Closed translation requests. Some translatable pages have a content that is only interesting for a certain period of time. For example announcements and regular status updates, like the Wikimedia monthly highlights. You can keep those pages around with translations, but hide them from the translation interface. This does not prevent further translations to the pages, but it greatly reduces the chance that a user accidentally starts translating the page. Discouraging and its reversion are done from Special:PageTranslation.

Prioritizing languages. You can also define a list of languages that you specifically want translations into; leaving the language list empty is interpreted as all languages allowed. The page will behave like a discouraged page (see previous paragraph) for the languages not in the priority list and, when translating into them, translators will be given a notice. You can also prevent the translation in other languages, say if translations are actually used elsewhere and you won't be able to use them but in some languages.

'''グループ化. '''関連するページ同士をグループ化できます. これらのグループ (集約群) は、他のすべてのメッセージ群と同様に振る舞います. 各群には、その群自身の統計があり、下位群のすべてのメッセージを含んでいます (この翻訳対象ページの場合). この機能は現在 Special:AggregateGroups にあります. Special:Translate のメッセージ群セレクター内の Special:LanguageStats では、既定では集約メッセージ群が折りたたまれた状態です.

'''移動. '''他のあらゆるページを移動できるのと同様に、翻訳対象ページも移動できます. 移動させる際、翻訳対象ではないすべての下位ページも移動させるかどうか、選択できます. 移動では、多数の関連ページを移動させるためにバックグラウンド ジョブを使用します. 移動中は、ページの翻訳ができません. 移動が完了すると、ページ翻訳記録に記録されます.

'''削除. '''移動と同様に、削除も通常の場所からアクセスできます. 翻訳対象ページ全体を削除するか、1 つの翻訳のみを削除するか、選択できます. 1 つの翻訳を削除するには、翻訳対象ページに移動して削除を選択します. 移動と同様、バックグラウンド プロセスがページを徐々に削除していきます. 関連する翻訳単位ページも削除されます. 削除が完了すると、ページ翻訳記録に記録されます.

Reverting. Similarly, reverting incorrect edits works as usual (including rollback button): you only have to edit the affected translation unit and the translation page will be updated as well. To find the edit to the translation unit from the edit to the translation page, just click the "" link for the editor and look for an edit at a similar time.

'''保護. '''翻訳対象ページを保護できます. 翻訳ページについては、保護することも、翻訳対象ページの保護を翻訳ページにまで拡張することもできません. 翻訳のこれ以上の編集を阻止するには、唯一の優先言語として翻訳元言語を追加して、他の言語への翻訳を無効にしてください. 上記の 優先言語化を参照してください. これらの 2 つの操作を行うことで、翻訳元ページ、翻訳ページ、その翻訳単位ページのすべての変更を阻止できます. 各翻訳単位ページを保護することはできますが、賢明ではありません.

翻訳対象指定の解除. 翻訳対象の指定を解除することもできます. まず、そのページから翻訳タグをすべて除去する必要があります. さらに、そのページを翻訳対象から外すために、Special:PageTranslation を使用するか、または翻訳対象ページ上部のリンクをたどります. これによりページ翻訳関連のあらゆる構造が除去されますが、既存のすべてのページが自由に編集できる状態で同じ場所に残ります. この操作はお勧めできません.

翻訳対象ページの構造
翻訳ページを翻訳することで、多数のページが生成されます. これらのページはそれぞれ 広い意味で 翻訳対象ページを構成する部品だと言えます. これらのページのページ名は、翻訳対象 のページ名で決まります:


 * (翻訳元ページ)
 * (「翻訳先ページ」と「マークアップを除いた翻訳元ページのコピー」を合わせたもの)
 * (すべての翻訳単位ページ)

In addition to this, there are the translation page template and the sources of translation units, extracted from the source page and stored in the database. The system keeps track of which versions of the source page contain translation tags and which version of them have been marked for translation.

Every time a translation unit page is updated, the system will also regenerate the corresponding translation page. This will result in two edits. The translation unit page edit is hidden by default in recent changes and can be shown by choosing show translations from the translation filter. Any action other than editing (like deleting and moving) the translation unit pages will not trigger the regeneration of the corresponding translation page.

セグメント化
全般的な原則:


 * 1) 翻訳するテキストは、すべて translate タグで囲むことになっています. 1 つのページが、タグの対を複数含む場合があります.
 * 2) translate タグの外側のすべてのテキストは、どの言語への翻訳ページでも変更されません. この静的なテキストに、各翻訳単位が埋め込まれる場所を示す印を付けたものを、翻訳ページの雛形と呼びます.
 * 3) テキスト内のマークアップが多すぎると、翻訳者が翻訳しにくくなります. マークアップが多数ある場合は、よりこまめに translate タグを配置してください.
 * 4) translate タグ内のテキストは、1 行以上の空行がある位置 (つまり 2 個以上の改行文字がある位置) で複数の翻訳単位に分割されます.

Restrictions. The page translation feature places some restrictions on the text. There should not be any markup that spans over two or more translation units. In other words, each paragraph should be self-contained. This is currently not enforced in the software, but violating it will cause invalid rendering of the page, the severity depending on whether MediaWiki itself is able to fix the resulting html output or not.

Parsing order. Beware, the translate tags work differently from other tags, because they do not go through the parser. This should not cause problems usually, but may if you are trying something fancy. In more detail, they are parsed before any other tags like &lt;pre> or &lt;source>, with the exception of &lt;nowiki> which is recognized by the Translate extension in some circumstances (such as rendering a page) but not in others (such as generating the list on Special:PageTranslation of pages containing &lt;translate>). If you want to have the literal expression "&lt;translate>" in the source text, you should escape it like "&amp;lt;translate>".

'''タグの配置. '''可能であれば、タグの前後で改行して、なおかつタグと本文の間に空行を作らないようにします. これが不可能な場合があり、それは例えば、マークアップで囲まれた本文を翻訳したいものの、それ自身はマークアップではない場合です. これにも解決策があります. 例えば:

To make this work, the extension has a simple whitespace handling: whitespace is preserved, except if an opening or closing translate tag is the only thing on a line. In that case the newline after the opening tag or before the closing tag is eaten. This means that they don't cause extra space in the rendered version of the page.

Variables. It is possible to use variables similar to template variables. The syntax for this is &lt;tvar|name>contents. For translators these will show up only as, and in translation pages will automatically be replaced by the value defined in the translatable page (so they are global "constants" across all its translation pages). Variables can be used to hide untranslatable content in the middle of a translation unit. It also works for things like numbers that need to be updated often. You can update the number in all translations by changing the number in the translatable page source and re-marking the page. You do not need to invalidate translations, because the number is not part of the translation unit pages.

マークアップの例
以下に、特殊なウィキマークアップを扱うためのお勧めの方法を列挙します.

{| class=wikitable 翻訳しない: Category:Cars
 * カテゴリ
 * カテゴリを追加する方法は 2 つあります: 翻訳ページの雛形に追加する方法と、翻訳単位の 1 つとして追加する方法です. 翻訳ページの雛形内にカテゴリがある場合は、結果的に、どの言語への翻訳でも同じカテゴリになります. 翻訳単位内にカテゴリがある場合は、翻訳でのカテゴリの命名規則を利用者に指導しておいてください. 右に、命名規則の候補を 2 つ示します. これらは、採用するための技術的な手段とは独立しています.


 * すべての翻訳文を同じカテゴリに (言語が少ない場合のみ).
 * カテゴリ名は翻訳しません (翻訳テンプレート内にそのまま書けるようにするため).

言語接尾辞を追加する翻訳: Category:Cars/ja (推奨しますが未対応)

There are some such templates available on the wikis which use the Translate extension, but they won't be dealt with here. Additionally, categories' description pages will have to be created manually and translated with a non-Translate system, because the extension is not able to deal with them.
 * カテゴリ名は翻訳しません (ページ名と同様).
 * 言語ごとに 1 カテゴリ.
 * ページ翻訳はカテゴリ自身の翻訳に使用される場合があります. カテゴリは互いにリンクされ、見出しが翻訳されます (リンク内のカテゴリ名などを除く).
 * This option is not yet supported out of the box by the Translate extension. You need to either instruct your translators to add the language code suffix to the category markup in the translation, or leave the category out of translation and write your own templates which add the language code automatically.

誤: == &lt;translate>Culture&lt;/translate> ==
 * 見出し
 * Headers can in principle be tied to the following paragraph, but it is better to have them separated. This way someone can quickly translate the table of contents before going into the contents. When tagging headers, it is important to include the header markup inside the tags, or MediaWiki will no longer identify them properly, for example when trying to edit a specific section of the source page. The markup also immediately gives translator a context: he/she is translating a header.
 * Headers can in principle be tied to the following paragraph, but it is better to have them separated. This way someone can quickly translate the table of contents before going into the contents. When tagging headers, it is important to include the header markup inside the tags, or MediaWiki will no longer identify them properly, for example when trying to edit a specific section of the source page. The markup also immediately gives translator a context: he/she is translating a header.

正: &lt;translate>== Culture ==&lt;/translate> 翻訳の提案: &lt;translate>

Culture
Lorem ipsum dolor. &lt;/translate>

&lt;translate> &lt;/translate>
 * 画像
 * テキストのような特定の言語のコンテンツを含む画像の場合、翻訳単位内に完全な画像の構文として含めてください. それ以外の画像の場合は、説明のタグを付けるのみでかまいませんが、翻訳対象に指定したあとにメッセージのドキュメントとしてヒントを記述してください (ヒントは省略可).
 * テキストのような特定の言語のコンテンツを含む画像の場合、翻訳単位内に完全な画像の構文として含めてください. それ以外の画像の場合は、説明のタグを付けるのみでかまいませんが、翻訳対象に指定したあとにメッセージのドキュメントとしてヒントを記述してください (ヒントは省略可).


 * リンク
 * リンクは、それが存在する段落に含めることができます. これにより、リンクラベルを変更できるだけではなく、リンク先も翻訳済み版に変更できます (存在する場合).
 * リンクは、それが存在する段落に含めることができます. これにより、リンクラベルを変更できるだけではなく、リンク先も翻訳済み版に変更できます (存在する場合).

見出しが翻訳されるため、見出しに対して自動的に生成される ID に頼ることはできません. 自分でアンカーを追加してください. 翻訳の雛形の外側 (translate タグの内側) に見出しを配置する場合は、リンク先として使用する各見出しの前後で、数の translate タグ対を使用してページを複数に分割する必要があります. 内部リンク: &lt;translate> Helsinki is capital of Finland. &lt;/translate> 外部リンク: &lt;translate> PHP (website) is a programming language. &lt;/translate> ページ内リンク: &lt;translate>

Culture
Lorem ipsum dolor.

...

For more about food, see section about culture. &lt;/translate>

&lt;translate> &lt;/translate> &lt;translate> &lt;/translate>
 * 箇条書き
 * Lists can get long, so might want to split them into multiple parts with for example five items or less in each as follows. Do so only if the items are sufficiently independent to be translate separately in all languages, don't create "lego messages": for instance, you must avoid to split a single sentence in multiple units, or to separate logically dependent parts which may affect each other (with regard to punctuation or style of the list, for instance). To split a list, use -tags. Do not insert new lines as this will break the HTML output.
 * Lists can get long, so might want to split them into multiple parts with for example five items or less in each as follows. Do so only if the items are sufficiently independent to be translate separately in all languages, don't create "lego messages": for instance, you must avoid to split a single sentence in multiple units, or to separate logically dependent parts which may affect each other (with regard to punctuation or style of the list, for instance). To split a list, use -tags. Do not insert new lines as this will break the HTML output.
 * General principles
 * Headings
 * Images
 * Tables
 * Categories
 * Links
 * Templates


 * 数値
 * 数値やその他の非言語的な要素は、翻訳対象の外に配置して変数に変更できます. これには複数の利点があります:
 * 数値やその他の非言語的な要素は、翻訳対象の外に配置して変数に変更できます. これには複数の利点があります:

&lt;translate> Income this month &lt;tvar|income>3,567,800 EUR &lt;translate> これにより、通貨の変換を伴う数値の地域化を妨げてしまうことにご注意ください. を使用することで、翻訳先言語に合うように数値が正しく整形されます.
 * 翻訳を無効化することなく、数値のみを更新できます.
 * 数値の変更が無視されるため、翻訳メモリがより的確に機能します.


 * テンプレート
 * Templates have varying functions and purposes, so the best solution depends on what the template is for. If the template is not a part of longer paragraph, it should be left out, unless it has parameters that need to be translated. If the template has no linguistic content itself, you don't need to do anything for the template itself.
 * For an example of templates translated with page translation, see Template:Extension-Translate. To use this template, you need to have another template similar to Template:Translatable navigation template, because you cannot include the template by anymore. This is not yet provided by the Translate extension itself, but that is in the plans.
 * For an example of templates translated with page translation, see Template:Extension-Translate. To use this template, you need to have another template similar to Template:Translatable navigation template, because you cannot include the template by anymore. This is not yet provided by the Translate extension itself, but that is in the plans.

Another way is to use the unstructured element translation to translate the template, but then the language of the template will follow the user's interface language, not the language of the page he is viewing.
 * }

翻訳元テキストの変更
全般的な原則:


 * 変更を避ける
 * できるだけ変更を少なくする
 * 自分で翻訳単位マーカーを追加しない

Unit markers. When page is marked for translation, the system will update the translatable page source and add unique identifiers for each translation unit. See example below. These markers are crucial for the system, which uses them to track changes to each translation unit. You should never add unit markers yourself. The markers are always on the line before the unit; or, if it starts with a header, after the first header on the same line. The different placement for headers is needed to keep section editing working as expected.

&lt;translate>

Birds
&lt;!--T:1--> Birds are animals which....

&lt;!--T:2--> Birds can fly and... &lt;/translate> Changing unit text. Changing is the most common operation for translation units. You can fix spelling mistakes, correct grammar or do other changes to the unit. When re-marking the page for translation, you will see the difference in the unit text. The same difference is also shown to translators when they update their translations. For simple spelling fixes and other cases where you don't want the existing translations to be removed from translation pages, you can avoid invalidating them: translators will still see the difference if they ever update the translation for any reason.

'''新しいテキストの追加. '''translate タグの内側にテキストを自由に追加できます. システムが新しい翻訳単位を認識できるようにするために、隣接する翻訳単位と翻訳単位の間に空行が 1 行あることを確認してください. 既存の translate タグの内側ではなく、タグの前後に新しいテキストを追加することもできます. 繰り返しますが、翻訳単位マーカーはシステムが追加するため、自分では追加しないでください.

'''テキストの削除. '''翻訳単位全体を削除できます. 削除すると、翻訳単位マーカーも除去されます.

Splitting units. You can split existing units by adding an empty line in the middle of a unit, or by placing translate tags so that they split the unit. You can either keep the unit marker with the first unit or remove it altogether. In the first case, translators see the old text when updating the old translation. If you removed the unit marker, both units will behave as if no translation ever existed, after the page is re-marked for translation.

'''翻訳単位の統合. '''翻訳単位を統合する場合は、1 つの翻訳単位マーカーのみを残してそれ以外の翻訳単位マーカーをすべて除去してください.

'''翻訳単位の移動. '''翻訳単位の翻訳結果を無効にすることなく、その翻訳単位を移動させることができます: 翻訳単位マーカーとその翻訳単位の残りの部分を一緒に移動させるだけで完了です.

Before marking the new version of the page for translation, ensure that the best practices are followed, especially that translators get a new translation unit if the content has changed. Also make sure that there are no unnecessary changes to prevent wasting translators time. If the source page is getting many changes, it may be worthwhile to wait for it to stabilize, and push the work for translators only after that.

使用されていない翻訳単位の翻訳は自動的には削除されませんが、残った翻訳が問題を引き起こすことはありません.

ページ翻訳への移行
If you have been translating pages before using the page translation system, you might want to migrate the pages to the new system, at least the ones you expect to have new translations and want statistics for. You will probably have existing templates for language switching and maybe different page naming conventions.

You can start migration by cleaning up, tagging and marking the source page. You can keep the existing language-switching templates while you migrate the old translations. If your pages follow the language code subpages naming convention, they will be replaced with the source text after marking the source page for translation, but you'll still be able to access translations from history.

This is manual work, where you have to open the old translation page and copy and paste translations from there to correct translation units in the new system using the translation interface. For this you need to roughly know which part of the translation matches which part of the old text (and hope they match). You might want to consider marking all the migrated translations as needing update by prepending the string !!FUZZY!! to the translations and have a translator look at them. Once migrated, you can delete the old translation pages if they are not using the same naming convention (or you could have switched them to it before migration). Once all pages are migrated you can also remove old language navigation templates.