重要
翻訳は あなたが参加できる コミュニティの取り組みです。このページは現在 72.22% 翻訳されています。
4. 翻訳ガイドライン
This manual is aiming to help the translator.
First, it explains how you can join the translation team.
Then the general process of how technically a translation is done is explained.
Later the translation is explained from an actual English .rst
document that is translated to Dutch.
Finally a summary of rules of translation is given.
注釈
Although these guidelines focus on QGIS documentation, the methods and the rules described below are also applicable to QGIS applications.
4.1. Becoming a translator
The QGIS project is always looking for people who are willing to invest some more time translating QGIS into a foreign language - even perhaps to coordinate the translation effort.
We are trying to improve our project management process and spread the load more evenly between people who each have a specific area of responsibility, so any contribution you have to make will be greatly appreciated.
If you would like to nominate yourself as a coordinator for a new language please go ahead. If more than one person nominate themselves as coordinator for the same language, please contact each other and resolve how you will manage your efforts.
4.1.1. Transifex
The web-based translating platform Transifex is used for all QGIS translations: the desktop application itself (or GUI) and the documentation. So the first thing you need is an account to login and get started.
4.1.2. Join a Project
You can explore available projects we translate, identify their target languages with various statistics:
QGIS Desktop for all the pieces of text available in QGIS apps (QGIS Desktop and QGIS Server),
QGIS Documentation for the official LTR documentation
Click on the project you would like to help translate
Click on JOIN THIS PROJECT on the right side. You will be prompted to sign up.
Create your account or connect using a third-party platform account. Verify your account by the link in the email you will receive.
Login
You then get a popup to select which language you want to help translate to. Please, note that we try to make the process as simple as possible and only target languages, regardless of the country parameter (e.g.
French (fr)
and NOTFrench (France) (fr_FR)
). Only if there are notable differences in the languages (e.g. portuguese in Portugal vs Brazil) we may allow different versions.Search your target language, i.e the language you wish to help translate QGIS into, NOT necessarily all the languages you can speak:
If it is marked as
already added
then select it and press Join Project.If it is not marked as already added, select it and press Request language. Keep in mind that translating an entire project will take days of work, if not weeks! Again, and sorry to repeat, it is not about selecting ALL the languages you can speak.
Now you will need to wait for the language coordinator or the project maintainers to process your request. You will be notified by email when your request has been accepted. If your request has no answer for about a week, please consider writing to your language coordinator in Transifex or the QGIS Translators mailing list.
You can also join any of the other QGIS projects and help everywhere too.
4.1.3. Translate
Once your request is accepted, you are able to translate any text in the project(s) you've chosen. Simply click on your language, select the chapter you want to translate and click on Translate. Easy, right?
In order to help you make good translation, some instructions are provided below. We strongly recommend you to read them.
Tip
Quick access to translatable files in Transifex
If you find a wrong or missing translation in the current documentation,
you can use the Translate page
link in the bottom left drop-down menu of the page
to reach it sources in Transifex and perform any update you wish to.
4.2. 翻訳プロセス
QGIS のドキュメントは .rst
ファイルを使い英語で書かれています。翻訳を提供するには次のようにします。
事前ビルドスクリプトによって
.po
ファイルと呼ばれる翻訳用のファイルが、/QGIS-Documentation/locale/en
フォルダーの中に作成されます。.po
ファイルの中の文が Transifex のウェブプラットフォームにプッシュされ、英語から各言語へと、翻訳者がエディターを使って翻訳できるようになります。ファイルが100%翻訳されると、翻訳された文字列は自動的にドキュメントリポジトリの
/QGIS-Documentation/locale/ <language>
配下にプルバックされます。次のドキュメントのビルド(1日に1回以上発生します-時刻はページの下部を参照)で、スクリプトが文章を再利用して翻訳出力を作成します。
完全に翻訳されていないファイルについては、2週間ごとにスクリプトがTransifexからGithubに翻訳された文字列を取り込み、次のビルドで同様に公開されます。
.rst
ファイルが更新されるたびに、英語の.po
ファイルが更新され、その変更が Transifex の対応するファイルにプッシュされます。つまり、すでに翻訳された.rst
文書に新しい段落が追加されたとき、新しい/更新された文章だけが翻訳された.po
ファイルに追加され、翻訳する必要があることを意味します。
注釈
QGISデスクトップの仕様を翻訳する
QGISアプリケーションの翻訳と大きく異なる点は、 .po
ファイルの代わりに、特定のバージョンのアプリケーションを構成する .py
, .cpp
, .yaml
ファイル内のすべての翻訳可能文字列が、単一の .ts
ファイル(例:qgis-application/qgis_jp (branch release-3_30)` )として Transifex へプッシュ、プルすることです。翻訳は、開発ブランチ(毎日)、とリリース時(リリースされたバージョンごとに)にGithubにプルされます。
現在、2つの異なるツールが、 QGIS での翻訳を行うために使用されています。
The Transifex web platform, the easiest and recommended way to translate QGIS, transparently does the process described above and pulls all the translatable texts in one place for the translator. Just pick the files you want and translate. Translated files are stored in the platform until another release is pushed.
Qt Linguist は Qt の開発ツールです。翻訳者は
.po
(もしくは.ts
) ファイルをソースコードからローカル環境に取得し、翻訳した後は送り返す必要があります。
どちらのツールを選ぼうと、翻訳のルールは同じであることに注意してください。
4.3. ファイルを翻訳する
ヒートマッププラグインの例を使って翻訳の作業を説明します。この例では英語からオランダ語に翻訳を行いますが、他のドキュメントや言語でもほぼ同じでしょう。
ヒートマッププラグインのドキュメントのソースは以下の場所にあります。
QGIS-Documentation/source/docs/user_manual/plugins/plugins_heatmap.rst
なんでこのドキュメントを例として選んだのかですって?
このドキュメントには画像、キャプション、ヘッダー、参照、置換があるからです
このドキュメントを書いたのは私なので、私には翻訳が容易だからです (^o^;)
ビルドプロセスが英語の .po
ファイルを以下の場所に生成しています。
QGIS-Documentation/locale/en/LC_MESSAGES/docs/user_manual/plugins/plugins_heatmap.po
これに対応するオランダ語の .po
ファイル(基本的にコピーです)は以下の場所にあります。
QGIS-Documentation/locale/nl/LC_MESSAGES/docs/user_manual/plugins/plugins_heatmap.po
このファイルと並んでごく小さなサイズの .mo
ファイルがあるのに気づかれると思いますが、今のところ、このファイルにはなんの翻訳も含まれていません。
4.3.1. Transifexでの翻訳
Transifex を使って翻訳するには、以下のようにしてください。
Languages チームの一員となったら、該当するプロジェクト(ここでは
QGIS Documentation
です)をクリックします。翻訳が可能な言語の一覧が、その進捗の割合とともに表示されます。図 4.22 Transifex のメニューで翻訳する言語を選ぶ
翻訳する言語の上にカーソルを持ってきて、次のいずれかをクリックしてください。
リソースを表示: 翻訳可能な
.po
ファイルが、その翻訳の割合と文字列数とその他のメタデータとともに表示されます。翻訳: 翻訳可能なすべての
.po
ファイルと翻訳インターフェースが開きます。
翻訳したいファイル(この例では
docs_user-manual_plugins_plugins-heatmap
という名前のheatmap pluginのファイルを探します)か、もしくはなんでもいいので翻訳の終わっていないファイルを見つけて、それをクリックしてください。するとそのファイル中の文字列が読み込まれ、絞り込みや翻訳、提案などのインターフェースを利用できるようになります。Tip
Clicking the
Translate page
link in the bottom left drop-down menu of a page brings you directly to its corresponding translation page in Transifex.あとは個々のテキストを選んで、下記の ガイドライン に従って翻訳するだけです。
Transifex の Web エディターについてのより詳しい情報は、https://help.transifex.com/en/articles/6318216-translating-with-the-web-editor を参照してください。
4.3.2. Qt Linguist による翻訳
Qt Linguist を使って翻訳するには、以下に従ってください。
手動で
.po
または.ts
ファイルを取得します。Transifex プラットフォームから、またはソースリポジトリ (GitHub) のlocale/$language
フォルダーから、ファイルをダウンロードすることで実現できます。ローカルで翻訳に取りかかります。
修正を行ったファイルを元の場所 (Transifex または GitHub) へアップロードします。
翻訳可能なファイルを Transifex を使ってダウンロードしたりアップロードしたりすることも可能ですが、この手順はお勧めできません。というのも、 Transifex にはバージョン管理システムがないために、あなたがアップロードしたファイルは単純に既存のファイルを置き換えるだけなので、その間に Transifex で他の人によって行われた変更を上書きしてしまう可能性があるからです。
Qt Linguist で初めてそのファイルを開くときは、次のようなダイアログが表示されます。

図 4.23 linguist メニューから翻訳する言語を選ぶ
Target language は正しく選択する必要があります。 Source language は POSIX、Country/Region はAny Country のままでかまいません。
OK ボタンを押すと、 Qt Linguist は文を埋め、翻訳を始めることができます。 図 4.24 を参照してください。

図 4.24 Qt Linguist のメニューを使用して翻訳
メニューには使うと便利な以下のようなボタンがあります。
[翻訳を完了して次へ] ボタンは、最も重要なボタンです。翻訳が必要な項目では、テキストフィールドに翻訳を入力してこのボタンを押してください。翻訳を必要としない項目では、テキストフィールドは空のままでこのボタンを押してください。これで翻訳完了となり、次の項目に進みます。
[次のするべき] ボタンは、翻訳が必要な次の翻訳項目にジャンプします。ソースファイルの変更によって追加や修正が行われた文だけを翻訳する必要があるときに便利です。
Qt Linguist の使い方についての詳しい情報は、 https://doc.qt.io/qt-5/linguist-translators.html を参照してください。
警告
翻訳のためにソースリポジトリからファイルをダウンロードするときは、絶対に master
ブランチで行わないでください。ある特定のバージョンで英語での更新が完了した後は、常に翻訳用ブランチが有効になっています。翻訳のためにはそのブランチを使用してください。例えばQGIS 2.8 の翻訳では、manual_en_v2.8 ブランチを使用してください。
4.3.3. マニュアルを翻訳する
それでは plugin_heatmap のマニュアルの翻訳を始めましょう!
大部分の文は、そのまま翻訳してください。特別な翻訳をしなければならない部分(rst 文)を、この翻訳セッションの中で挙げていきます。
以下で翻訳の対象として興味深い文を見ていきましょう。
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 構文があります。
|heatmap|
のように|
に挟まれた言葉は、置換されるので決して翻訳してはいけません。ここではヒートマッププラグインのアイコンに置換されます。:sup:`Heatmap`
のような:sup:
文は上付き文です。続くテキストを少し高く出力します。これはツールバー項目の上にマウスを当てた時に表示されるポップアップテキストを表示するために使用されますが、実際の QGIS アプリケーションでの翻訳とは異なる場合があります。オランダ語の場合はそうではありません。
この文中のそれ以外のプレーンテキストは、すべて翻訳してかまいません。
次の文には 、マニュアルの別のセクションをを参照するためによく使われる :ref:
文が含まれています。 :ref:
文に続くテキストは一意の識別子であるため、 変更してはいけません。
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.
この場合、 load_core_plugin
は一意の参照識別子であり、キャプションのある rst アイテムの前に配置されます。この ref 文は見出しのテキストに置換され、ハイパーリンクに変換されます。 参照されている見出しが翻訳された時は、この見出しを参照しているすべての ref 文も自動的に同じように翻訳されます。
次の文には rst タグ :menuselection:
があります。続くテキストは実際に QGIS アプリケーションのメニューで表示されるテキストです。これはアプリケーションでは翻訳されているかもしれませんので、その場合は変更すべきです。
Select from menu :menuselection:`View --> Toolbars --> Raster` to activate
the Raster Toolbar when it is not yet activated.
ここではオランダ語へローカライズされた QGIS アプリケーションで使用される翻訳ですので、上記の "View -->" は実際には "Beeld -->" と翻訳されます。
次のように、トリッキーな翻訳アイテムを見かけることもあります。
The |heatmap| :sup:`Heatmap` tool button starts the Dialog of the Heatmap
plugin (see :numref:`figure_heatmap_settings`).
この文には、図 figure_heatmap_settings_
への参照があります。セクションへの参照と同様に、この参照を変更してはいけません。 rst ドキュメントでの参照定義は .po
ファイルには含まれていないため、これを変更することはできません。このことは図への参照は翻訳できないことを意味します。 HTML 生成時には figure_heatmap_settings
と表示されます。 PDF 生成の際には figure_heatmap_settings_
は図番号に置き換えられます。
次の rst 属性付きの文はこのようなものです。
**Input Point dialog**: Provides a selection of loaded point vector maps.
上の行内の二重星印を削除しないでください。二重星印に挟まれたテキストは太字で表示されます。テキストそのものは多くの場合、ダイアログ中のテキストであり、アプリケーションでは翻訳されているかもしれません。
以下の文章には :guilabel:
rst タグが含まれています。
When the |checkbox| :guilabel:`Advanced` checkbox is checked it will
give access to additional advanced options.
guilabel タグのテキスト Advanced
は QGIS アプリケーション中でおそらく翻訳されるのでたぶん変更する必要があります。
以下の文章には ``airports`` が含まれています。引用符は、テキストに別のテキストフォントを設定するために使用されています。このケースでは、リテラル値であり、翻訳を必要としません。
For the following example, we will use the ``airports`` vector point
layer from the QGIS sample dataset (see :ref:`label_sampledata`).
Another excellent QGIS tutorial on making heatmaps can be found on
`https://www.qgistutorials.com
<https://www.qgistutorials.com/en/docs/creating_heatmaps.html>`_.
この文には、URL と表示テキストの両方を持つハイパーリンクも含まれています。URL はもちろん手をつけずそのまま残すべきですが、読者に表示される方のテキストである https://www.qgistutorials.com
は変更することができます。ハイパーリンクの末尾のアンダースコアは本質的な部分なので決して削除してはいけません。
4.3.4. 翻訳ルールのまとめ
|bronze|
、|checkbox|
、|labels|
、|selectString|
、|addLayer|
... のような、2つの|
の文字に挟まれたテキストは変更しないでください。これらは、画像に置換するために使用される特殊なタグです:ref:
,:file:
,:numref:
などで始まる役割を持つ参照は、タイトルが含まれていない限り変更しないでください。タイトルが含まれている場合は、タイトルを翻訳することはできますが、リンク(すなわち<
と>
で囲まれたテキスト)は変更せずにおいてくださいTip
参照にタイトルが提供されている場合、Transifex は英語の原文にリンク部分を数字に置き換えて表示することがあります。原文の数字をクリックすると、翻訳中のタイトルの横に参照のリンクが追加されます。
figure_labels_1_
のようなアンダースコアで終わる参照を変更しないでください。ハイパーリンクの URL を変更しないでください。ただし読者に表示される記述は変更できます。ハイパーリンクの末尾のアンダースコア (
>`_
) は空白を加えたりせずそのまま残しておいてください。:index:
、:sup:
、:guilabel:
、:menuselection:
タグに続く引用符内のテキストは変更してください。それが QGIS アプリケーションで翻訳されているかどうか、どう翻訳されているかを確認してください。タグ自体は変更しないでください。二重星と二重引用符の間のテキストは多くの場合、値もしくはフィールド名を示しています。翻訳の必要があることもあれば、ないこともあります。
`
,``
,*
,**
,::
などの特殊文字は、正確に元のテキストと同じ文字を(同じ数だけ)使用するよう注意してください 。これらは情報の見た目を整えるのに貢献しています。特殊文字やタグで囲まれた部分のテキストを、スペースで始めたり終わらせたりしないでください。
翻訳文字列の後に段落を開始して終了しないでください。そうすると HTML 生成時にテキストが翻訳されません。
以上のルールを守ってドキュメントの品質を良くしましょう!
何か質問があれば QGIS コミュニティチーム または QGIS 翻訳チーム までご連絡ください。