任务单 #32317

ソースから scons pot するときの注意事項

开放日期: 2013-10-21 10:55 最后更新: 2013-10-21 10:55

报告人:
属主:
(无)
类型:
状态:
开启
组件:
(无)
里程碑:
(无)
优先:
4
严重性:
4
处理结果:
文件:

Details

開発者が NVDA をソースから実行できる環境で scons pot すると、翻訳用テンプレートファイル (pot) を作成できるのですが、 日本語環境に固有の問題(?)があるらしく、下記のパッチが必要でした。

diff --git a/sconstruct b/sconstruct
index 23b883c..fe3cd39 100755
--- a/sconstruct
+++ b/sconstruct
@@ -271,6 +271,7 @@ def makePot(target, source, env):
                        "--foreign-user",
                        "--add-comments=Translators:",
                        "--keyword=pgettext:1c,2",
+                       "--from-code=utf-8",
                ] + [os.path.relpath(str(f), str(sourceDir)) for f in source]
        ]) != 0:
                raise RuntimeError("xgettext failed")

ちなみに NVDA 翻訳チームで共有される po ファイルは、今日から

#: IAccessibleHandler.py:679

のようなソースコード対応コメントがなくなり、下記のような翻訳者用コメントだけになりました:

#. Translators: Message to indicate User Account Control (UAC) or other secure desktop screen is active.
msgid "Secure Desktop"
msgstr ""

なので、どのメッセージがソースのどこで使われているかを把握するためには scons pot を使うのがよさそうです。

任务单历史 (1/1 Histories)

2013-10-21 10:55 Updated by: nishimoto
  • New Ticket "ソースから scons pot するときの注意事項" created

Attachment File List

No attachments

编辑

Please login to add comment to this ticket » 登录名