• Poedit メモ [2016-06-09:2]

    概要

    国際化ファイルを作るPoeditに関するメモを何でも残します。

    _e 関数の使い方(1)

    <p>
        You'll notice that with each issue 
        we provide tools to 
        help you repair problems you may find. For example, 
        if a core file has been modified
        you can view how it has been changed, 
        view the whole file or repair the file. 
    </p>

    上記は改行はそのまま残して以下にする。

    <p>
        <?php _e('You\'ll notice that with each issue 
        we provide tools to 
        help you repair problems you may find. For example, 
        if a core file has been modified
        you can view how it has been changed, 
        view the whole file or repair the file.','wordfence_sec') ?> 
    </p>

    以下もイイがバージョンアップ時に変更箇所の比較に手間が掛かる。

    <p>
        <?php _e('You\'ll notice that with each issue we provide tools to help you repair problems you may find. For example, if a core file has been modified you can view how it has been changed, view the whole file or repair the file.','wordfence_sec') ?> 
    </p>

     

    POファイル内の「#, php-format」

    これは翻訳前の言語内に % 文字が含まれている時に追加される物です(実行結果より)。% はPHPではそれなりの意味が有ります。多分、警告として表示しているのでは無いかと思われます。MOファイルの作成には支障は出ていません。

    POファイル内の「#, fuzzy」

    「未確定」扱いになっている項目を意味します(実行結果より)。翻訳内容を再確認して上部の「未確定」ボタンをクリックするか、翻訳内容を修正すると消えます。

    PoeditとCodeStyling Localizationプラグインの違い

    開発が2008年12月に終了しているCodeStyling Localizationプラグインとの違いをメモします。

    CodeStyling Localization プラグイン

    1. WordPress(非公式)プラグインとして操作
    2. 開発は2008年12月に終了
      最終バージョン:1.99.25 、
      別ネットに1.99.30が存在で最終更新年月日は2013/2/6
    3. フリーソフト GPL
    4. 翻訳元ソースの並びを設定できない
      途中でPHPに _e(”) を追加すると画面上は最後に追加されてしまう。
    5. 完全に日本語化されてない
    6. 操作性:クセは有るが基本的に簡単
    7. msgid “” 行、msgstr “” 行は基本的に1行で表現。

    Poedit アプリ

    1. PCにインストールしてアプリ操作
    2. 現在も更新中
    3. フリーと有償版が存在
    4. 翻訳元をファイル名、ソース、翻訳順でソート可能
      途中でPHPに _e(”) を追加しても並びでは適切な場所に表示される。
    5. 100%の日本語表示で操作可能
    6. 操作性:それなりの知識を要する
    7. msgid “” 行、msgstr “” 行は基本的に1行で表現するが。文字数が半角英数字で80文字を越えると自動的に複数行に分割される。ただしUIでの操作上は1行になるので問題は無い。