How to fix: LC_MESSAGES/django.po: format specification for argument doesn't exist in 'msgstr'

I have got this
LC_MESSAGES/django.po:48: a format specification for argument 'myVariable' doesn't exist in 'msgstr'
msgfmt: found 1 fatal error

error message executing django-admin.py with the compilemessages argument. These lines
#: templates/main.html.py:75
#, python-format
msgid "Doppelstandard %(myVariable)s"
msgstr "Double standard ..."

in my django.po file and these lines in templates/main.html
{% blocktrans myVariable as myVariable %}Doppelstandard {{ myVariable }}{% endblocktrans %}

caused this error message. After modifying the above statement to
#: templates/main.html:17 templates/main.html.py:75
#, python-format
msgid "Doppelstandard %(myVariable)s"
msgstr "Double standard %(myVariable)s ..."

everything worked well. So I have simply extended the "msgstr" by the encapsulated variable name from the "msgid".

Comments

Popular posts from this blog

Tuning ext4 for performance with emphasis on SSD usage

Eclipse sucks, so use NetBeans!