开源微博statusNET折腾——国际化(续)

来源:互联网 发布:自动输入验证码软件 编辑:程序博客网 时间:2024/05/16 18:49

当我在服务器和测试机上都成功部署并能够编译*.po文件后,发现对某些的修改并不能生效例如


#. TRANS: Main menu option when logged in to log out the current user
#: lib/action.php:477
#, fuzzy
msgctxt "MENU"
msgid "Logout"
msgstr "登出"


无论我怎么修改,都是显示Logout并没有进行中文的翻译,不知道为什么。找到gettext官网,查看它的文档,发现这么一段话:

fuzzy
This flag can be generated by the msgmerge program or it can beinserted by the translator herself. It shows that the msgstrstring might not be a correct translation (anymore). Only the translatorcan judge if the translation requires further modification, or isacceptable as is. Once satisfied with the translation, she then removesthis fuzzy attribute. The msgmerge program inserts thiswhen it combined the msgid and msgstr entries after fuzzysearch only. See Fuzzy Entries。

大概意思:这个标签是由 msgmerge 这个程序或者翻译人自己所创建。它表示  msgstr 这个字符串里的内容可能不是正确的翻译。只有翻译者自己能够判断这条记录是否需要做进一步的修改,或者就是正确的翻译。一旦发现这个翻译是正确的,就将 fuzzy标签属性删掉。也就是说如果用户你觉得这条翻译是对的,去掉fuzzy那行记录就行了
#. TRANS: Main menu option when logged in to log out the current user
#: lib/action.php:477
msgctxt "MENU"
msgid "Logout"
msgstr "登出"
就这样,OK终于把这个国际化给搞定啦
原创粉丝点击