Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

django fuzzy string translation not showing up

  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" 
  2. 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.

like image 887
icn Avatar asked Sep 04 '09 05:09

icn


1 Answers


  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.

  2. 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-fuzzy to msgfmt:

python manage.py compilemessages --use-fuzzy 
like image 187
Martin v. Löwis Avatar answered Oct 09 '22 03:10

Martin v. Löwis