Django のローカライズ¶
管理者サイトや検証のエラーメッセージなど、Django の各種パーツは国際化されています。つまり、これらのメッセージはユーザーの言語や国によって異なるように表示することができるようになっています。そのため、Django では、Django アプリケーションに共通の国際化・ローカライズのインフラを使用しています。詳しくは i18n documentation で説明されています。
翻訳¶
翻訳文字列は、世界中の Django ユーザーにより提供されています。翻訳作業は Transifex で協力して行われています。
不正確な翻訳や特定の翻訳について議論したいときは、Django プロジェクトのページ に行ってください。翻訳を助けたりまだ未翻訳の言語を追加したい場合は、以下のことを行ってください。
Django 国際化フォーラム で自己紹介する。
Specialties of Django translation に関するノートを読んで確認する。
Transifex にサインアップし、Django project page を訪問する。
On the Django project page, choose the language you want to work on, or -- in case the language doesn't exist yet -- request a new language team by clicking on the "Request language" link and selecting the appropriate language.
Then, click the "Join this Team" button to become a member of this team. Every team has at least one coordinator who is responsible to review your membership request. You can also contact the team coordinator to clarify procedural problems and handle the actual translation process.
Once you are a member of a team choose the translation resource you want to update on the team page. For example, the "core" resource refers to the translation catalog that contains all non-contrib translations. Each of the contrib apps also has a resource (prefixed with "contrib").
注釈
Transifex の使い方に関する詳しい情報については、 Transifex User Guide を読んでください。
Transifex からの翻訳が Django リポジトリに取り入れられるのは、新しい フィーチャーリリース のタイミングのみです。将来の パッチリリース の1つで2回目に更新を試みますが、これは翻訳マネージャーが作業可能かどうかによります。そのため、あなたの言語の翻訳を完了・修正するためには、文字列フリーズの期間 (リリース候補とフィーチャーリリースの間の期間) を逃さないようにしてください!
フォーマット¶
conf/locale/<locale>/formats.py
ファイルもレビューできます。このファイルは日付、時刻、数値に関するロケール特有のフォーマットについて記述しています。詳細については 表示形式のローカル化 を参照してください。
フォーマットファイルは Transifex の使用によって管理されていません。変更するには、すべてのコード変更と同様に、以下の方法で Django のソースツリーに対して パッチを作成する 必要があります。
- 現在の Git の main ブランチに対して diff を作成する。
- Django のチケットシステムでチケットを開き、
Component
フィールドをTranslations
に設定し、patch を添付する。
ドキュメント¶
There is also an opportunity to translate the documentation, though this is a
huge undertaking to complete entirely (you have been warned!). We use the same
Transifex tool. The
translations will appear at https://docs.djangoproject.com/<language_code>/
when at least the docs/intro/*
files are fully translated in your language.
Once translations are published, updated versions from Transifex will be irregularly ported to the django/django-docs-translations repository and to the documentation website. Only translations for the latest stable Django release are updated.