[Tracker-discuss] [issue54] something's wrong with translations

Erik Forsberg metatracker at psf.upfronthosting.co.za
Sun Jan 14 17:30:37 CET 2007


Erik Forsberg <forsberg at efod.se> added the comment:

Upgrading to 1.3.2 did not help. It did however force me to
investigate further why this happened. It turns out that the reason
for the traceback was the following in issue.item.html:

 <th i18n:translate="">
   <span tal:replace="structure python:db.priority.classhelp('id,name,description',label='Priority')" />:
 </th>

Replacing it with 

 <th>
   <span tal:replace="structure python:db.priority.classhelp('id,name,description',label='Priority')" />:
 </th>

..made things work. 

The first version made already translated strings go through the
translation machinery. More specifically, it made this piece of text
go through gettext.ugettext:

<a class="classhelp" href="priority?@startwith=0&amp;@template=help&amp;
properties=id,name,description&amp;form=itemSynopsis&amp;type=checkbox&amp;@sort=ord
er&amp;@pagesize=50" onclick="javascript:help_window('priority?@startwith=0&amp;@tem
plate=help&amp;properties=id,name,description&amp;form=itemSynopsis&amp;type=checkbo
x&amp;@sort=order&amp;@pagesize=50', '500', '400');return false;">Priorität</a>:

Note the translation of "Priority" into german "Priorität", which
unfortunately has two dots on top of its 'a' :-).

As psf.upfronthosting.co.za is running a locale that only recognices
ascii, and the unicode function validates that the input string can
indeed be represented as ascii, this caused the traceback.

This was a bug with a less than obvious solution :-).

Cheers,
\EF
-- 
Erik Forsberg                 http://efod.se
GPG/PGP Key: 1024D/0BAC89D9

----------
status: testing -> resolved

______________________________________________________
Meta Tracker <metatracker at psf.upfronthosting.co.za>
<http://psf.upfronthosting.co.za/roundup/meta/issue54>
______________________________________________________


More information about the Tracker-discuss mailing list