django模糊字符串翻译不显示 [英] django fuzzy string translation not showing up

查看:175
本文介绍了django模糊字符串翻译不显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


  1. 为什么有时候我会在 django.po 中获得 fuzzy 语言文件。实际上,我已经在项目中检查了 fuzzy string item是完全唯一的。

  1. Why sometimes I get a fuzzy item in django.po language file. Actually, I have checked in my project the fuzzy 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.


    推荐答案


    1. p> msgmerge 将字符串标记为 fuzzy 如果旧目录具有类似于 MSGID 。它还将从旧目录中标记为模糊的字符串传送到新的目录。
    1. msgmerge marks strings as fuzzy if the old catalog had a translation for a strings with a similar-looking msgid. 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-fuzzytomsgfmt`.

    这篇关于django模糊字符串翻译不显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

  • 查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆