Opened 15 years ago

Last modified 10 years ago

#11240 closed

Compilemessages fails if a % character is at certain places in the .po file — at Initial Version

Reported by: Till Backhaus Owned by: nobody
Component: Internationalization Version: 1.3
Severity: Normal Keywords:
Cc: kikko, harm.verhagen+django@…, claude@… Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: yes
Easy pickings: no UI/UX: no

Description

Reproduce:
Create a template:
{% load i18n %}
{% trans "findme 10% " %}

run ./manage.py makemessages -a
find the string in the .po file and translate it like this:
#: templates/test.html:2
#, python-format
msgid "findme 10% of their"
msgstr "findemich 10% an "

run ./manage.py compilemessages

get this error message:
/project/locale/de/LC_MESSAGES/django.po:925: 'msgstr' is not a valid Python format string, unlike 'msgid'. Reason: In the directive number 1, the character 'a' is not a valid conversion specifier.
msgfmt: found 1 fatal errors

Change History (0)

Note: See TracTickets for help on using tickets.
Back to Top