翻訳ガイドライン

このマニュアルは翻訳者を支援することを目的としています.最初にどのように翻訳が行われるか説明します.その後英語のrst文書からオランダ語への翻訳手順を説明します.最後に必要な ”翻訳規則” について説明します.

序文

始めるにあたって: もし (Web上ではなく) ローカルで翻訳したい場合は、決してマスターブランチで作業を行わないでください。それぞれのバージョンにおいて、英語版の準備ができたあとに翻訳用のブランチが用意されています。例えばQGIS 1.8のマニュアルを翻訳したい場合、manual_en_v1.8 branch を使う必要があります。何かわからないことがありましたら QGISコミュニティチーム http://lists.osgeo.org/mailman/listinfo/qgis-community-team に連絡をください。

一般情報

ヒートマッププラグインの例を使って翻訳の作業を説明します.この例では英語からオランダ語に翻訳を行います,しかしこれは他のドキュメントや言語にも適用できるはずです.

最初の翻訳

文書を作成するためには最初にrst文書ファイルを作る必要があります.prebuildスクリプトを使うと .po ファイルという名前の翻訳用ファイルを作ります.英語用ファイルは /QGIS-Documentation/i18n/enフォルダに作成されます.

それらの “オリジナル” はスクリプトによって他の言語の i18n フォルダにコピーされます.

.poファイル内の文章はツールを使って英語から他の言語に翻訳できます.よく利用されるpootleというweb翻訳ツールがありますが,それはまだ利用できるようになっていません.その他にqtデベロップメントツールに含まれる Qt Linguistという素晴らしいツールがあります.

もしあなたがコントリビュートを行いたい場合最初に .po ファイルを取得して翻訳を行った文章を .po ファイルに書き加えて下さい.

.poファイルの翻訳が終わったら正しい場所に戻して下さい.そうするとビルドスクリプトの次回のビルドで .po ファイルの横に .mo ファイルが作られます.

それらの .mo ファイルは翻訳出力を作るためにスクリプトによって使われます.

翻訳の更新

rst文章が更新されると新しいpoファイルが英語版の中に作成されます。この新ファイルの内容は、それぞれの言語の既存のpoファイルにマージされます。つまりもしすでに翻訳済みのrst文書に新しい文章が追加されると、その差分だけが翻訳対象のpoファイルに追加されます。よってそれ以降のバージョンの QGIS での翻訳の作業量は比較的少なくなります。

.poファイルの翻訳

例としてヒートマッププラグインの比較的小さなrst文書を利用します.文書のソースはここにあります:

QGIS-Documentation/source/docs/user_manual/plugins/plugins_heatmap.rst

この形式を選んだ理由は?

  1. もし翻訳が終わっていない場合は以下の構文とそれに続く空行がファイルの先頭にみつかります。そうでない場合は翻訳完了を意味します。

    |updatedisclamer|

    これは成果物に明示的な免責条項を加えます。更新された免責条項つきの文章を翻訳するのは翻訳を仕上げるのにいい機会です。

  2. また、画像、説明、ヘッダー、参考文献や置換なども含みます。

  3. つまり翻訳するのは簡単ということです (^o^)

ビルド処理では英語のpoファイルが生成され、以下の場所に置かれます:

QGIS-Documentation/i18n/en/LC_MESSAGES/docs/user_manual/plugins/plugins_heatmap.po

オランダ語のpoファイルの場合は (基本的にコピー) 以下の場所にあります:

QGIS-Documentation/i18n/nl/LC_MESSAGES/docs/user_manual/plugins/plugins_heatmap.po

このファイルに加えて、翻訳がまだ行われていないことを示す、容量が小さい.moファイルも含まれています。

ではこのpoファイルの翻訳をしてみましょう。この翻訳セッションでは翻訳するべき場所 (rst構文) を示します。

Qt Linguistによる翻訳

Qt Linguistで.poファイルを初めて開くと、以下のダイアログが表示されます。

Figure Translation 1:

../../_images/linguist_choose_language.png

linguist メニューから翻訳する言語を選んでください osx

The Target language should be filled correctly. The Source language can be left as is with language POSIX and Country/Region on Any Country.

When you press the [OK] button Qt Linguist is filled with sentences and you can start translating, see Figure translation 2.

Figure Translation 2:

../../_images/linguist_menu.png

linguist メニューを用いて翻訳 osx

In the menu you see the following buttons which are convenient to use.

  • linguist_done_next The Translation Done Next button, is the most important button. If the item needs translation, you enter a translation in the text field, then hit this button. If the item does not translation just leave the text field for translation empty and also hit this button which indicates the item is done and you continue with the next item.
  • linguist_previous The Goto Previous button, can be used to go to the previous translation item.
  • linguist_next The Goto Next button, can be used to go to the next translation item.
  • linguist_next_todo The Next Todo button, jumps to the first translation item that still needs a translation. Handy when the original document has changed and only several new/changed sentences need to be translated.
  • linguist_previous_todo The Previous Todo button, searches backward and jumps to the first translation item it finds that still needs a translation.

翻訳マニュアル

それでは plugin_heatmap マニュアルの翻訳を始めましょう!

The first two items do not need translation, just push the toolbar button which considers the translation finished and jump to the next item.

When I get to the third item we see a more interesting sentence to translate:

The |heatmap| :sup:`Heatmap` plugin allows to create a heatmap from a point vector map. A heatmap is a raster map showing the density or magnitude of point related information. From the result "hotspots" can easily be identified.
この文では2つのrst構文を含みます:
  1. |heatmap| のように | の間にある言葉は翻訳してはいけません。この場合はヒートマッププラグインアイコンに置換されます!

  2. :sup:`ヒートマップ` ``  ``:sup: 構文は、それ以降の文字を上付き文字にして少し高い位置に表示する構文です。これはツールバー項目の上に表示するポップアップ文字に使われ、実際のQGISアプリケーションの翻訳とは異なる可能性もあります。この場合は違います!

このセンテンスではそれ以外の全ての文章は翻訳してかまいません!

The fifth translation item contains the :ref: rst statement that is commonly used to refer to another section somewhere in het manual! The text following a :ref: statement should never be changed because it is a unique identifier!

First this core plugin needs to be activated using the Plugin Manager (see Section :ref:`load_core_plugin`). After activation the heatmap icon |heatmap| can be found in the Raster Toolbar.

In this case “load_core_plugin” is a unique reference identifier placed before an rst item that has a caption. The ref statement will be replaced with the text of the header and turned into a hyerlink. When the header this reference is refering to is translated, all references to this header will be automatically translated as well.

The next item contains the rst-tag :menuselection: followed by text actually displayed in a menu in QGIS application, this may be translated in the application and therefore should be changed when this is the case.

Select from menu :menuselection:`View -->` :menuselection:`Toolbars -->` :menuselection:`Raster` to activate the Raster Toolbar when it is not yet activated.

In above item “View –>” is actually translated to “Beeld –>” because this is the translation used in the Dutch localized QGIS application.

A bit further we meet the following tricky translation item:

The |heatmap| :sup:`Heatmap` toolbutton starts the Dialog of the Heatmap plugin (see figure_heatmap_2_).

It holds a reference to a figure figure_heatmap_2_, and like a reference to section this reference should not be changed!! The reference definition itself from the rst-document is not included in the .po file and can therefore not be changed. This means the reference to figures can not be translated. When HTML is created you will see figure_heatmap_2. When a PDF document is created figure_heatmap_2_ is replaced with a figure number.

The next translation item with rst attributes is the following item:

**Input Point dialog**: Provides a selection of loaded point vector maps.

Do not remove the stars in above line. It will print the text it holds in bold. The text itself is often text included in the dialog itself and may wel be translated in the application.

The following translation item contains the :guilabel: rst tag.

When the |checkbox| :guilabel:`Advanced` checkbox is checked it will give acces to additional advanced options.

The text Advanced of the guilabel tag may wel be translated in the QGIS application and probably needs to be changed!

The following translation item contains ``airports``. The apostrophs are used this to give text another textfont. In this case it is a literal value and does not need translation.

For the following example, we will use the ``airports`` vector point layer from the QGIS sample dataset (see :ref:`label_sampledata`). Another exellent QGIS tutorial on making heatmaps can be found on `http://qgis.spatialthoughts.com <http://qgis.spatialthoughts.com/2012/07/tutorial-making-heatmaps-using-qgis-and.html>`_.

This item also includes a hyperlink with a url and an external presentation. The url should ofcourse be left intact, you are allowed to change the external text “http://qgis.spatialthoughts.com” which is visible by the reader. Never remove the underscore at the end of the hyperlink which forms an essential part of it!!

翻訳ルールの概要

  1. |nix| といったような記述は変更しないでください

  2. :ref: タグで始まる参照は変更しないでください

  3. figure_1_ のようにアンダースコアで終わる参照は変更しないでください

  4. ハイパーリンク中のURLは変更しないでください.外部注釈は変更できます.ハイパーリンクの最後にあるアンダースコアはそのままにしてください

  5. :sup: , :guilabel: , :menuselection: の内容の翻訳はQGISアプリケーションに合わせてください.

  6. 二重アスタリスクや二重アポストロフィーで挟まれた内容は, 値やフィールド名などを示す場合があり, 翻訳が必要な場合とそうでない場合があります.

  7. 原文と同じアポストロフィーを使うように気をつけてください.

  8. 翻訳結果の文字列を新しい段落で終わらせないでください.HTML生成の際に変換がうまくいかない場合があります.

以上のルールを守ってドキュメントの品質を良くしましょう!