In my base.html, I have
{% trans "产品" %}
I generated django.po file using
django-admin.py makemessages -l en
In django.po file of en locale,
#: .\templates\base.html.py:36
msgid "å…¬å ¸äº§å“ "
msgstr "Products"
As you can see, the generated msgid is scrambled and invalid. This
caused translation failed. If I manually changed the msgid to be
msgid "产品"
msgstr "Products"
The translation works. I verified that my base.html is utf-8 encoded.
Anyone know what is the reason for the scrambled msgid in django.po
file? I suspect this is an encoding issue on makemessages command, but
don't know how to resolve this.
Thanks, Karen. You are correct. My version is Win32 binaries of GNU
gettext-runtime 0.13.1. It seems getting the development trunck is a
better choice for me. But, I am not sure if the Django development
trunck is stable enough to use. I will give it a try.