|
50.
|
|
|
Translating substitutions
|
|
|
|
置換テキストの翻訳
|
|
Translated and reviewed by
Koichi Akabe
|
|
|
|
Located in
../../source/translation.rst:296
|
|
51.
|
|
|
String substitutions can be translated using the !t conversion flag. So the following code will be translatable using the dialogue and code translation systems::
|
|
|
|
文字列を翻訳文字列で置き換えるには、!t 変換フラグを使います。次のコードは台詞とコードの翻訳システムを使って翻訳することができます::
|
|
Translated and reviewed by
Koichi Akabe
|
|
|
|
Located in
../../source/translation.rst:298
|
|
52.
|
|
|
Image and File Translations
|
|
|
|
画像とファイルの翻訳
|
|
Translated and reviewed by
Koichi Akabe
|
|
|
|
Located in
../../source/translation.rst:311
|
|
53.
|
|
|
When translating a game, it may be necessary to replace a file with a translate version. For example, if an image contains text, it might make sense to replace it with a version of the image where the text is in another language.
|
|
|
|
ゲームを翻訳するとき、ファイルを翻訳版に置き換える必要があるかもしれません。例えば画像にテキストが含まれている場合、意味が分かるようにテキスト部分が別の言語で書かれた画像に置き換えるでしょう。
|
|
Translated and reviewed by
Koichi Akabe
|
|
|
|
Located in
../../source/translation.rst:313
|
|
54.
|
|
|
Ren'Py handles this by looking in the translation directory for the image. For example, if the "piglatin" language is in use, and "library.png" is loaded, Ren'Py will use "game/tl/piglatin/library.png" in preference to "game/library.png".
|
|
|
|
このような場合に Ren'Py は画像を翻訳ディレクトリーの中から探します。例えば「piglatin」言語において「library.png」を読み込むとき、Ren'Py は「game/tl/piglatin/library.png」を「game/library.png」よりも優先して使います。
|
|
Translated and reviewed by
Koichi Akabe
|
|
|
|
Located in
../../source/translation.rst:318
|
|
55.
|
|
|
Style Translations
|
|
|
|
スタイルの翻訳
|
|
Translated and reviewed by
Koichi Akabe
|
|
|
|
Located in
../../source/translation.rst:324
|
|
56.
|
|
|
It may be necessary to change styles - especially font-related styles - when translating a game. Ren'Py handles this with translate style blocks and translate python blocks. These blocks can contain code to change language-related variables and styles. For example::
|
|
|
|
ゲームの翻訳時に、スタイルの変更 (特にフォント関係のスタイル) が必要になるでしょう。Ren'Py ではこれに対し translate style ブロックと translate python ブロックで対応しています。これらのブロックには、言語関係の変数やスタイルを変更するためのコードを含めることができます。例えば::
|
|
Translated and reviewed by
Koichi Akabe
|
|
|
|
Located in
../../source/translation.rst:326
|
|
57.
|
|
|
or equivalently::
|
|
|
|
または等価なもので::
|
|
Translated by
Koichi Akabe
|
|
|
|
Located in
../../source/translation.rst:334
|
|
58.
|
|
|
When a language is activated - either at the start of the game, or after a language change - Ren'Py resets the styles to their contents at the end of the init phase. It then runs all translate python blocks and translate style blocks associated with the current language, guaranteeing that blocks appearing earlier in a file are executed first. Finally, it rebuilds styles, allowing the changes to take effect.
|
|
|
|
言語が利用可能になった時 (ゲームの開始時、もしくは言語が変更された後)、Ren'Py は init フェーズの後でスタイルをこの内容にリセットします。
|
|
Translated and reviewed by
Koichi Akabe
|
|
|
|
Located in
../../source/translation.rst:339
|
|
59.
|
|
|
Style translations may be added to any .rpy file.
|
|
|
|
スタイルの翻訳はどのような .rpy ファイルにも追加できます。
|
|
Translated and reviewed by
Koichi Akabe
|
|
|
|
Located in
../../source/translation.rst:346
|