Search code examples
djangointernationalizationdjango-1.7po

Django Internationalization gives fuzzy with capital letters


I am setting up internationalization for a Django project (1.7).

I am successfully generating .po files, however, I have entries such as:

#: my_app/templates/my_app/profile.html:155
#, fuzzy
#| msgid "Court"
msgid "court"
msgstr ""

From what I understand , fuzzy will cause the translation not to happen. I would like the capitalization to remain as is, so how can I make the translations match the original words?

I imagine maybe those can be forced to be generated as two separate entries in .po file?


Solution

  • Before execution of makemessages you had a msgid "Court" in the .po file. Django decided that the "court" is very similar to "Court" and created a "fuzzy" record with the same translation (which was empty).

    Just delete the #, fuzzy and #| msgid "Court" lines and run the compilemessages:

    #: some file.html
    msgid "Court"
    msgstr "Tribunal"
    
    #: my_app/templates/my_app/profile.html:155
    msgid "court"
    msgstr "tribunal"