Incorrect use of i18n in pdfcal.py
Bug #80121 reported by
Marius Gedminas
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SchoolTool |
Fix Released
|
Low
|
Unassigned |
Bug Description
I was trying to fix an unrelated issue (issue 431) recently, when I noticed some
buggy code in pdfcal.py. It did things like
foo_fmt = _("Bla bla: %s")
foo = translate(foo_fmt) % something.
translate returns a Unicode string, and the code tries to stuff it with UTF-8
data --> boom! Correct code is
foo = _("Bla bla: $(something)")
foo.mapping = {'something': something}
foo = translate(
This bug is present in ST 0.11.2, SB 1.2.2 and ST trunk.
I suspect there may be other i18n related bugs in pdfcal.py, given this one, and
also issue 438. An hour spent testing pdfcal/reviewing the code would be an
hour well spent.
Changed in schooltool: | |
status: | New → Triaged |
Changed in schooltool: | |
importance: | Medium → Low |
tags: | added: i18n |
tags: | added: calendar reports |
Changed in schooltool: | |
status: | Triaged → Fix Released |
To post a comment you must log in.