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 Version 1

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 (last modified by Ramiro Morales)

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 (1)

comment:1 by Ramiro Morales, 15 years ago

Description: modified (diff)

(formatted description)

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