当我在服务器和测试机上都成功部署并能够编译*.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官网,查看它的文档,发现这么一段话:
-
This flag can be generated by the
msgmerge
program or it can be inserted by the translator herself. It shows that themsgstr
string might not be a correct translation (anymore). Only the translator can judge if the translation requires further modification, or is acceptable as is. Once satisfied with the translation, she then removes thisfuzzy
attribute. Themsgmerge
program inserts this when it combined themsgid
andmsgstr
entries after fuzzy search 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终于把这个国际化给搞定啦
fuzzy