string 13 is not translatable

Bug #792364 reported by serfus
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Lernid
Medium
John S. Gruber

Bug Description

I have encountered an error when trying to translate string 13[1].

Error is: "Error in Translation:
'msgstr' is not a valid Python format string, unlike 'msgid'. Reason: The character that terminates the directive number 1 is not a valid conversion specifier."

I have been told that gettext does not yet support the new style of python string formatters

[1] https://translations.launchpad.net/lernid/trunk/+pots/lernid/he/13/+translate

Related branches

Revision history for this message
David Planella (dpm) wrote :

Yeah, it seems gettext is choking on {1:.1}, so I think the solution here would simply to change that string to use the deprecated (but still valid) _('blah blah %d' % (number)) string formatting specifiers

Revision history for this message
John S. Gruber (jsjgruber) wrote :

Thank you very much for contributing through your bug report.

Revision history for this message
John S. Gruber (jsjgruber) wrote :

Thanks, David.

Changed in lernid:
status: New → Triaged
importance: Undecided → Medium
assignee: nobody → John S. Gruber (jsjgruber)
tags: added: bitesize
Changed in lernid:
assignee: John S. Gruber (jsjgruber) → nobody
Revision history for this message
John S. Gruber (jsjgruber) wrote :

There is something I don't understand. It appears to me that someone has been able to translate this string into German, Italian, and Hungarian. Does the problem just affect some language translations and not others?

tags: removed: bitesize
Revision history for this message
Yuri Chornoivan (yurchor-gmail) wrote :

In reply to the comment #4:

The problem can be seen if only the translation of "of" does not start from "o".

Gettext interprets "% of" in the code as a specifier.

Please prepend the string with the message with something like

# xgettext: no-python-format

Changed in lernid:
status: Triaged → In Progress
assignee: nobody → John S. Gruber (jsjgruber)
Changed in lernid:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers