Help:Extension:Translate/ページ翻訳の例

From MediaWiki.org
Jump to: navigation, search
This page is a translated version of a page Help:Extension:Translate/Page translation example and the translation is 90% complete.

Other languages: Danish 100% • ‎German 26% • ‎Zazaki 17% • ‎English 100% • ‎Spanish 100% • ‎French 100% • ‎Italian 40% • ‎Japanese 90% • ‎Korean 2% • ‎Luxembourgish 36% • ‎Dutch 26% • ‎Polish 48% • ‎Brazilian Portuguese 36% • ‎Russian 40% • ‎Ukrainian 100% • ‎Chinese 38% • ‎Chinese (China) 5%

ようこそ! このチュートリアルを完了すると、翻訳ページの作成方法や、翻訳拡張機能を使用した翻訳ページ管理の方法を理解できるようになります。私たちはこのチュートリアルを、基礎的な概念や作業を網羅しつつできるだけ短くすることを目指しています。このチュートリアルを完了すると、ページ翻訳機能についての詳細なドキュメントを使用できるようになります。

Contents

手順 1: 始める前に

最初のページ

このチュートリアルでは、翻訳の拡張機能が既にインストール/設定されていることを想定しています。 翻訳が必要なページが既に頭にあるかもしれませんが、以下の例のページを使用することもできます。以下の例では、このチュートリアルの手順を自分のウィキで試せます。

このページでは架空の自治体 Fréttinga について説明しています。

Fréttinga is a small municipality in MungoLand, located on the BaMungo island.
It hosts a population of about 400 people. It has some agriculture and fishing.
Tourists like to visit it in the summer time.

== Services ==

It doesn't have many services. There is a shop and car ferry visits the island
from mainland once a day.
  • 1. 自分のウィキのページ [[Fréttinga]] に移動して作成をクリックします。
  • 2. 上記の内容を貼り付けて保存します。

手順 2: 準備

準備ができたところ。「このページを翻訳対象に指定」リンクがあります。

ある程度のテキストを含むページができました。ページを大幅に変更したり大胆に整理する可能性がある場合は、翻訳システムにページを追加する前に、編集が通常の速度に落ち着くまで待った方がいいかもしれません。これは、すべての変更内容に追随するという大変な作業を翻訳者にさせるのを避けるためです。

  • 3. ページ [[Fréttinga]] を編集します
  • 4. 以下に示したように、本文全体を <translate>...</translate> のタグで囲みます
  • 5. ページを保存します
<translate>
Fréttinga is a small municipality in MungoLand, located on the BaMungo island.
It hosts a population of about 400 people. It has some agriculture and fishing.
Tourists like to visit it in the summer time.

== Services ==

It doesn't have many services. There is a shop and car ferry visits the island
from mainland once a day.
</translate>

手順 3: 翻訳を有効化

変更内容を処理する画面

ページを保存すると、ページ上部にリンク「このページを翻訳対象に指定」(あなたが翻訳管理者ではない場合は「このページには翻訳対象に指定されていない変更があります。」) が表示されます。そのリンクをクリックしてください。ページは自動的に 4 つの翻訳単位に分割されます。1 つめの翻訳単位はページ名、2 つめは第 1 段落、3 つめは第 2 段落の見出し、4 つめは第 2 段落の本文です。これらは翻訳対象ページの基礎的な項目であり以下の 3 つの特徴があります: 各翻訳単位は独立しています。まとめて翻訳します。ページ本文の変更は翻訳単位レベルで追跡されます。翻訳単位は再配置したり削除したりすることもできます。

ページ翻訳ページの雛形での表示もありますが、これは後の手順で説明します。翻訳単位に名前を付けることもできますが、この例では既定値に従うことにします。

  • 6. リンク「このページを翻訳対象に指定」をクリックします
  • 7. ページの本文が 3 つの単位に正しく分かれていることを確認します
  • 8. 「この版を翻訳対象に指定」ボタンをクリックします
  • 9. ページに戻ります

翻訳者がページを翻訳するための新たなリンク「このページを翻訳」が上部に表示されます。例としてこのページを使用している翻訳のチュートリアルを参照して、翻訳を少し試してください。そしてここに戻ってきて次の手順に進んでください。

手順 4: 変更する

変更の追跡は非常に重要な機能です。変更してみて、どのように動作するか見てみましょう。ページの編集画面を開くと、<!--T:1--> のようなマーカーが追加されていることが分かります。これらは、各翻訳単位を識別しやすくするために、拡張機能が追加したものです。これにより、これらの翻訳単位の再配置や編集ができるようになります。ページを編集する際には、マーカーを残しておく必要があり、マーカーとそれが所属する翻訳単位の位置関係も変更してはいけません。翻訳単位を移動させる際には、翻訳単位マーカーも移動させてください。翻訳単位を削除する際には、翻訳単位マーカーも削除してください。新しい段落を追加すると、ソフトウェアが新しいマーカーを追加します。ソフトウェアを混乱させるおそれがあるため、マーカーを手作業では変更しないでください。

<languages />
<translate>
<!--T:1-->
Fréttinga is a small municipality in MungoLand, located on the BaMungo island.
It hosts a population of about 400 people. It has some agriculture and fishing.
Tourists like to visit it in the summer time. 
It has marvelous beaches with a lot of seagulls.

== Services == <!--T:2-->

<!--T:3-->
It doesn't have many services. There is a shop and car ferry visits the island
from mainland once a day.

In 2009 January the roof of the church in the island fell down. It was rebuilt
collaboratively in the following summer.
</translate>
古くなった翻訳
  • 10. 上記で強調したように少し書き加えます
  • 11. 上部のリンク「翻訳対象に指定済み」をクリックします
  • 12. 変更内容をじっくり確認します
  • 13. 「翻訳対象に指定」ボタンをクリックします
  • 14. 元のページに戻ります

前の手順で提案したように翻訳した場合は、その翻訳へのリンクがページの上部に表示されます。翻訳が 100% 最新ではないことも表示される可能性があります。翻訳済み版のページには、新しい段落が英語で表示され、その変更された部分が強調されます (スクリーンショット参照)。翻訳画面に移動すると、その翻訳単位に要修正の印が付いていることが分かります。

翻訳の雛形の表示では、ページのどの部分が全言語版で共通する定数かを理解するのを支援します (「翻訳ページの雛形」は翻訳タグの外側の部分のこと)。さらに、翻訳単位が移動/削除された場合も教えてくれます。

多数のページを更新する可能性があるため、翻訳済み版をすべて更新するのにわずかに時間がかかります。

以上が基礎知識ですが、このチュートリアルでは、よく直面する事項についてさらに説明します。

手順 5: 他のウィキ要素を追加

最終結果

これで基礎的な翻訳対象ページができましたが、非常に味気ないページです。そこで、通常のウィキページのように画像などの要素を追加して、それらが翻訳にどんな影響を与えるか見てみましょう。

さらに単位マーカーを含む段落を除去して箇条書きに置き換えるとどうなるか、見てみましょう。

  • 15. 以下に示したように、ページに画像、カテゴリ、箇条書きを追加します
  • 16. ページを保存します
  • 17. ページの上部のリンク「翻訳対象に指定済み」をクリックします
  • 18. 意図した通りに見えるか、変更点を検証します
  • 19. 「この版を翻訳対象に指定」ボタンをクリックします
  • 20. 翻訳対象のページに戻ります
<languages />
[[File:Torsö.jpg|thumb|<translate>A typical view of Fréttinga</translate>]]
<translate>
<!--T:1-->
Fréttinga is a small municipality in MungoLand, located on the BaMungo island.
It hosts a population of about 400 people. It has some agriculture and fishing and
tourists like to visit it in the summer time. 
It has marvelous beaches with a lot of [[Special:MyLanguage/Seagull|seagulls]].

== Services == <!--T:2-->

<!--T:3-->
It doesn't have many services. There is a shop and a car ferry visits the island
from the mainland once a day.

Main events:
* The roof of the church fell down in 2009
* New church was built in 1877 

[[Category:Municipalities]]
</translate>
ドキュメントの追加

Here you can see that we left most of the image markup outside of a translation unit and have it in the translation page template instead. This is usually okay, but sometimes translators may want to change the image, especially if it contains linguistic content (text). In those cases it's usually easiest to include the whole markup in a unit (as we did for the category). When the translation of a unit involves or interacts with markup it's a good idea to write a small tip to the translators about it. You can do this with the following steps.

  • 21. 上部のリンク「このページを翻訳」をクリックします
  • 22. 言語「qqq - メッセージについてのドキュメント」を選択します
  • 23. メッセージ「A typical view of Fréttinga」を含むメッセージ名をクリックします
  • 24. 「Description of an image」と入力して「保存」をクリックします

In this example, the whole category assignment is a translation unit. This lets translators change it to [[Category:Municipalities/de]] or whatever naming convention you want to use for categories. If it were outside the translation template, you would have all the pages Foo, Foo/de, Foo/ru, Foo/ta and so on in the same category. Sometimes this is okay, but usually it distracts the users. Make sure your translators know what the local convention is.

Similarly, for links there are many ways to do it. We used "[[Special:MyLanguage/Seagull]]", which automatically redirects to the translated version of the page depending on the users' interface language (if that translation exists). This isn't an ultimate solution, because users will always be redirected to the interface language they're using, not to the language they are currently reading. Special:MyLanguage also interferes with Special:WhatLinksHere and makes it not work. The good thing about Special:MyLanguage is that you always get some version of the page, even if the requested translation doesn't exist.

最後に

翻訳対象ページとそれに対するすべての翻訳を、新しいページ名に移動できます。多数のページを移動させる必要がある場合があるため、この操作はすぐには完了しません。ページ全体とそれに対するすべての翻訳を削除することも、ページの翻訳版を 1 つだけ削除することもできます。これらの機能には、他のすべてのページの同じ場所からアクセスできます。

特別:ページ翻訳ではシステム内のすべてのページを列挙しています。すべての翻訳対象ページの概要を表示できるのに加えて、ページを翻訳対象から外すこともできます。この機能では、ページを大部分の表で非表示にします。これが以降の翻訳を妨げることはありません。

You have now created a translatable page and tried all of the common actions that can be performed on translatable pages. For more information, or if you want to understand the feature more deeply, please continue reading on the in-depth documentation of page translation feature. It also contains discussion about different ways of handling links, categories and templates, or pros and cons of using larger or smaller translation units.