Actions

Translating LimeSurvey/ja: Difference between revisions

From LimeSurvey Manual

(Updating to match new version of source page)
No edit summary
 
(32 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<languages /> __TOC__
<languages /> __TOC__


= LimeSurveyの翻訳 =
= LimeSurvey の翻訳 =


Wouldn't it be great to have LimeSurvey completely translated to your native language? The LimeSurvey team is always on the lookout for new translations and for people who help update the existing ones. Please read these instructions and don't hesitate to send an email to [mailto:translations@limesurvey.org translations@limesurvey.org] if you are in doubt or have any other questions.
LimeSurvey が完全にあなたの母国語に翻訳されていたら、すばらしいことではないですか? LimeSurvey チームは、新しい翻訳と既存の翻訳の更新に協力してくださる方をいつも探しています。以下の説明をお読みになり疑問がある場合や、その他の質問がある場合は、[mailto:translations@limesurvey.org translations@limesurvey.org] まで遠慮なくメールにてご連絡ください。


=How to translate - step-by-step instructions=
=翻訳のしかた - ステップバイステップ=


==Updating an existing translation==
==既存の翻訳の更新==
#Sign up on [https://www.limesurvey.org the LimeSurvey website] and then log in to [https://www.limesurvey.org/login your account].
#[https://www.limesurvey.org LimeSurvey ウェブサイト]にサインアップし、[https://www.limesurvey.org/login アカウント]にログインします。
#Go to [https://translate.limesurvey.org https://translate.limesurvey.org] and log in there with the same user name and password.
#[https://translate.limesurvey.org https://translate.limesurvey.org] にアクセスし、同じユーザー名・パスワードでログインします。
#Pick the LimeSurvey version you want to translate and simply get started. After your translation is approved, it will automatically be includedin the weekly stable release and your user name will be credited in the change log.
#翻訳したい LimeSurvey のバージョンを選び、作業を始めます。あなたの翻訳が承認されると、週次の安定版リリースに自動的に取り込まれ、あなたのユーザー名が変更ログに記録されます。
#If you are interested in becoming a prime translator for your language with the ability to approve newly translated strings, please contact us at [mailto:translations@limesurvey.org translations@limsurvey.org]. Such a position requires a maximum of about an hour of work per week - it's important to us that you are reliable in doing this.
#新しく翻訳した文字列を承認できる主幹翻訳者になることに関心をお持ちの際は、 [mailto:translations@limesurvey.org translations@limsurvey.org] あてにご連絡ください。あなたがこの役割を果たすため、週に最大 1 時間程度の作業が必要です。私たちにとって、この仕事を信頼して行えることが欠かせません。


==Customize an existing translation==
==既存の翻訳をカスタマイズする==


Sometimes you might want to modify an existing translation so it accommodates your particular survey situation better. In that case, do the following:
場合により、既存の翻訳を更新して、特定のアンケートの状況に適合させたいことがあるでしょう。このような場合は次のようにします。
#Go to [https://translate.limesurvey.org https://translate.limesurvey.org], pick the LimeSurvey version you want to translate and the particular language you want to modify.
#[https://translate.limesurvey.org https://translate.limesurvey.org]にアクセスし、翻訳したいLimeSurveyのバージョンと更新したい言語を選択します。
#On the bottom of the translation page you will find an option to export all strings as *.po file. Click on the export and save it as *.po file to your local hard-disk:<br />[[File:export_po_file.png]]
#翻訳ページの一番下に、すべての文字列を*.poファイルとしてエクスポートする機能があります。Exportをクリックして、ローカルハードディスクに*.poファイルとして保存します。<br />[[File:export_po_file.png]]
#Download and install [http://www.poedit.net/download.php Poedit].
#[http://www.poedit.net/download.php Poedit]をダウンロードしてインストールします。
#Start Poedit and edit the downloaded *.po file - modify the particular translations.
#Poeditを開始し、ダウンロードした.poファイルを編集し、翻訳を行います。
#When you save the *.po file, a *.mo file is automatically created. The latter will be read by LimeSurvey.
#*.poファイルを保存する際、*.moファイルも自動的に作成されます。後者はLimeSurveyが読み込みます。
#The last step is to place the particular *.mo file in the right language folder in /locale by replacing the existing one.
#最後のステップとして、*.moファイルを/localeフォルダーの所定の言語のフォルダーに配置(既存のものと入れ替え)します。
{{Note|For example, the location for French would be <LimeSurvey_root_directory>/locale/fr/LC_MESSAGES/fr.po.}}
{{Note|例えば、フランス語の配置場所は<LimeSurvey_root_directory>/locale/fr/LC_MESSAGES/fr.poとなります。}}


<div class="simplebox"> Note: If you are using [https://www.limesurvey.org/editions-and-prices/limesurvey-pro/editions-and-prices-professional LimeSurvey Pro], the team will be happy to place the file for you. Just create a [mailto:support@limesurvey.org support ticket] and attach the *.po file (<u>'''not''' the .*mo</u>).</div>
<div class="simplebox"> 注意: [https://www.limesurvey.org/editions-and-prices/limesurvey-pro/editions-and-prices-professional LimeSurvey Pro](企業ユーザー向け)を使用している場合、開発チームがファイルを更新します。[mailto:support@limesurvey.org サポートチケット]を発行し、*.poファイルを添付して送信してください。(<u>*.moファイル'''ではありません'''</u></div>


==Creating a new translation==
==新しい翻訳を作成する==
#First of all, get access to the development version of LimeSurvey. For detailed instructions, access the [[Accessing the source code|source code]].
#まずはじめに、LimeSurveyの開発バージョンにアクセスします。詳しくは、[[Accessing the source code/ja|ソースコード]]にアクセスしてください。
#Download and install [https://www.poedit.net/download.php Poedit] .
#[https://www.poedit.net/download.php Poedit]をダウンロードしてインストールします。
#Now you have to find out the language-code for your language - you can search for your language-code in the [https://r12a.github.io/app-subtags/ IANA Language Subtag Registry].
#該当の言語の言語コードを[https://r12a.github.io/app-subtags/ IANA Language Subtag Registry]から検索します。
#Go into the /locale directory (located in the LimeSurvey root directory) and create a directory named after your language code.
#/locale directory(LimeSurveyのルートディレクトリー)に入り、言語コードと同じ名前のディレクトリーを作成します。
#Download your language template by going to on the following link [https://www.limesurvey.org/community/contribute/translations-status https://www.limesurvey.org/community/contribute/translations-status] and scroll to the bottom. Once you receive the language template file, rename it to <your_language_code>.po.
#次のリンク[https://translate.limesurvey.org/projects/]にアクセスして、言語テンプレートをダウンロードします。プロジェクトを選択し、次に任意の言語を選択して(たとえば、英語のエントリーに移動)、一番下までスクロールします。そこから、<言語コード>.poファイルとして言語ファイルをエクスポートすることができます。
#Copy the <your_language_code>.po file to the newly created folder located in the /locale directory.
#<言語コード>.poファイルを/localeディレクトリーの下に新たに作成したフォルダーにコピーします。
#Open the file with Poedit and translate everything you need to translate.
#Poeditでファイルを開き、翻訳したいものをすべて翻訳します。
#To make LimeSurvey know about your language, you must add it in application/helpers/surveytranslator_helper.php (located in the LimeSurvey root directory). Open that file with a text editor and add your language in the same way the other languages are defined in that file.
#LimeSurveyに言語を認識させるため、application/helpers/surveytranslator_helper.php(LimeSurveyのルートディレクトリにあります)に追記します。テキストエディターでファイルを開き、他の言語と同じように言語を追加します。
#Save - in order to allow LimeSurvey to see the newly added language, save the modified *.po file. This will automatically generate the *.mo file in the same folder, which will be read by LimeSurvey.
#保存、すなわち、LimeSurveyが新たな言語を認識するため、修正した".poファイルを保存します。これにより、同じフォルダーに*.moファイルが自動的に生成され、LimeSurveyが読み込みます。
#Send the new *.po file and the updated surveytranslator_helper.php file to [mailto:translations@limesurvey.org translations@limesurvey.org].
#新しい*.poファイルとアップデートしたsurveytranslator_helper.phpファイルを[mailto:translations@limesurvey.org translations@limesurvey.org]に送信します。


{{Note|If you want your name to be linked from/shown on the team page, please write so in the email!}}
{{Note|多くの特殊文字を使用する言語の場合: PDF生成に使用するフォントを確認してください(たとえば、dejavusansであるか確認してください)。次に、このフォントファイルを[[Optional_settings/ja#Statistics_and_response_browsing|alternatepdffontfile]]のデフォルト構成に追加します。}}
 
{{Note|開発チームのページにあなたの名前をリンクまたは表示したい場合は、メールにその旨を記載してください!}}
 
=== 新たな言語を追加する場合のサンプルコード ===
 
<syntaxhighlight lang="php">
    $supportedLanguages['code']['description'] = gT('Language');
    $supportedLanguages['code']['nativedescription'] = 'Language in native';  // 言語の名称
    $supportedLanguages['code']['rtl'] = (true|false); // RTL(右から左に書く言語)
    $supportedLanguages['code']['dateformat'] = integer; // getDateFormatData機能の説明を参照
    $supportedLanguages['code']['radixpoint'] = (0|1); // 小数点の指定 0 : .、1 : ,
    $supportedLanguages['code']['cldr'] = 'code';  // 関連するYii言語コードが異なる場合は、ここで言語を新たなコードにマップします。
    $supportedLanguages['code']['momentjs'] = 'code'; // moment.jsで使用
</syntaxhighlight>
 
=== その他の翻訳箇所 ===
 
* LimeSurveyは[https://momentjs.com/ moment.js]を使用しています。[mailto:translations@limesurvey.org translations@limesurvey.org]にメッセージを送信する際は、言語コードを確認してください。
 
* '''[https://momentjs.com/ moment.js]''' : moment.jsの翻訳に協力する方法については、[https://momentjs.com/docs/#/i18n moment.js documentation]に説明があります。

Latest revision as of 08:03, 19 August 2023

LimeSurvey の翻訳

LimeSurvey が完全にあなたの母国語に翻訳されていたら、すばらしいことではないですか? LimeSurvey チームは、新しい翻訳と既存の翻訳の更新に協力してくださる方をいつも探しています。以下の説明をお読みになり疑問がある場合や、その他の質問がある場合は、translations@limesurvey.org まで遠慮なくメールにてご連絡ください。

翻訳のしかた - ステップバイステップ

既存の翻訳の更新

  1. LimeSurvey ウェブサイトにサインアップし、アカウントにログインします。
  2. https://translate.limesurvey.org にアクセスし、同じユーザー名・パスワードでログインします。
  3. 翻訳したい LimeSurvey のバージョンを選び、作業を始めます。あなたの翻訳が承認されると、週次の安定版リリースに自動的に取り込まれ、あなたのユーザー名が変更ログに記録されます。
  4. 新しく翻訳した文字列を承認できる主幹翻訳者になることに関心をお持ちの際は、 translations@limsurvey.org あてにご連絡ください。あなたがこの役割を果たすため、週に最大 1 時間程度の作業が必要です。私たちにとって、この仕事を信頼して行えることが欠かせません。

既存の翻訳をカスタマイズする

場合により、既存の翻訳を更新して、特定のアンケートの状況に適合させたいことがあるでしょう。このような場合は次のようにします。

  1. https://translate.limesurvey.orgにアクセスし、翻訳したいLimeSurveyのバージョンと更新したい言語を選択します。
  2. 翻訳ページの一番下に、すべての文字列を*.poファイルとしてエクスポートする機能があります。Exportをクリックして、ローカルハードディスクに*.poファイルとして保存します。
  3. Poeditをダウンロードしてインストールします。
  4. Poeditを開始し、ダウンロードした.poファイルを編集し、翻訳を行います。
    • .poファイルを保存する際、*.moファイルも自動的に作成されます。後者はLimeSurveyが読み込みます。
  5. 最後のステップとして、*.moファイルを/localeフォルダーの所定の言語のフォルダーに配置(既存のものと入れ替え)します。
例えば、フランス語の配置場所は<LimeSurvey_root_directory>/locale/fr/LC_MESSAGES/fr.poとなります。
注意: LimeSurvey Pro(企業ユーザー向け)を使用している場合、開発チームがファイルを更新します。サポートチケットを発行し、*.poファイルを添付して送信してください。(*.moファイルではありません

新しい翻訳を作成する

  1. まずはじめに、LimeSurveyの開発バージョンにアクセスします。詳しくは、ソースコードにアクセスしてください。
  2. Poeditをダウンロードしてインストールします。
  3. 該当の言語の言語コードをIANA Language Subtag Registryから検索します。
  4. /locale directory(LimeSurveyのルートディレクトリー)に入り、言語コードと同じ名前のディレクトリーを作成します。
  5. 次のリンク[1]にアクセスして、言語テンプレートをダウンロードします。プロジェクトを選択し、次に任意の言語を選択して(たとえば、英語のエントリーに移動)、一番下までスクロールします。そこから、<言語コード>.poファイルとして言語ファイルをエクスポートすることができます。
  6. <言語コード>.poファイルを/localeディレクトリーの下に新たに作成したフォルダーにコピーします。
  7. Poeditでファイルを開き、翻訳したいものをすべて翻訳します。
  8. LimeSurveyに言語を認識させるため、application/helpers/surveytranslator_helper.php(LimeSurveyのルートディレクトリにあります)に追記します。テキストエディターでファイルを開き、他の言語と同じように言語を追加します。
  9. 保存、すなわち、LimeSurveyが新たな言語を認識するため、修正した".poファイルを保存します。これにより、同じフォルダーに*.moファイルが自動的に生成され、LimeSurveyが読み込みます。
  10. 新しい*.poファイルとアップデートしたsurveytranslator_helper.phpファイルをtranslations@limesurvey.orgに送信します。
多くの特殊文字を使用する言語の場合: PDF生成に使用するフォントを確認してください(たとえば、dejavusansであるか確認してください)。次に、このフォントファイルをalternatepdffontfileのデフォルト構成に追加します。
開発チームのページにあなたの名前をリンクまたは表示したい場合は、メールにその旨を記載してください!

新たな言語を追加する場合のサンプルコード

    $supportedLanguages['code']['description'] = gT('Language');
    $supportedLanguages['code']['nativedescription'] = 'Language in native';  // 言語の名称
    $supportedLanguages['code']['rtl'] = (true|false); // RTL(右から左に書く言語) 
    $supportedLanguages['code']['dateformat'] = integer; // getDateFormatData機能の説明を参照
    $supportedLanguages['code']['radixpoint'] = (0|1); // 小数点の指定 0 : .、1 : ,
    $supportedLanguages['code']['cldr'] = 'code';  // 関連するYii言語コードが異なる場合は、ここで言語を新たなコードにマップします。
    $supportedLanguages['code']['momentjs'] = 'code'; // moment.jsで使用

その他の翻訳箇所