问题描述
-
为什么有时候我会在
django.po
中获得fuzzy
语言文件。实际上,我已经在项目中检查了fuzzy
string item是完全唯一的。
Why sometimes I get a
fuzzy
item indjango.po
language file. Actually, I have checked in my project thefuzzy
string item is totally unique.
#: .\users\views.py:81 .\users\views.py:101
#, fuzzy
msgid "username or email"
msgstr "9988"
可以模糊,但我的模糊项目的翻译没有显示该页面,只显示英文版本。这是完全奇怪的。
It is ok to be fuzzy but my translation of fuzzy item not showing up on the page, only English version shows up. It is totally odd.
推荐答案
- p>
msgmerge
将字符串标记为fuzzy
如果旧目录具有类似于MSGID
。它还将从旧目录中标记为模糊的字符串传送到新的目录。
msgmerge
marks strings asfuzzy
if the old catalog had a translation for a strings with a similar-lookingmsgid
. It also carries over strings marked as fuzzy from an old catalog to a new one.
msgfmt
来自编译目录的模糊消息,因为翻译可能不正确。翻译人员应该检查翻译的正确性(在发布的情况下,空字符串显然是一个不正确的翻译),并在验证翻译时删除 fuzzy
标记。如果您绝对想使用模糊翻译,请将```--use-fuzzy 传递给
msgfmt`。
msgfmt
excludes fuzzy messages from the compiled catalog, as the translations are likely incorrect. The translator should check correctness of the translation (in the case you posted, an empty string is clearly an incorrect translation), and remove the fuzzy
mark when the translation is is verified. If you absolutely want to use fuzzy translations, pass ```--use-fuzzyto
msgfmt`.
这篇关于django模糊字符串翻译不显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!