Roundup Tracker - Issues

Message6281

Author rouilj
Recipients mbehrle, rouilj
Date 2018-10-11.01:05:49
Message-id <20181011010530.42BCE4C05CF@itserver6.localdomain>
In-reply-to <1539208742.44.0.788709270274.issue2551007@psf.upfronthosting.co.za>
Hi Mathias:

I'm including the dev list on this because my knowledge of
internationalization is not great.

Summary: Mathias needs help setting up a drop down/select where the
options are translated. He is running under python 3 from a mercurial
checkout.

Reference: http://issues.roundup-tracker.org/issue2551007

In page.html of the classic tracker's html directory there are two macros:

  search_select

and 

  search_select_translated

The major difference between them is how the options are generated.
search_select uses:

  <option tal:repeat="s python:db[db_klass].list()"
            tal:attributes="value s/id; selected python:value == s.id"
            tal:content="python:s[db_content]"></option>

while search_select_translated does:

  <option tal:repeat="s python:db[db_klass].list()"
            tal:attributes="value s/id; selected python:value == s.id"
            tal:content="python:s[db_content]"
            i18n:translate=""></option>

If I understand this, the 'i18n:translate=""' causes the templating
engine to look up the content of the option tag (which I think is the
displayed label) as a key in the translation table. Then it uses the
result of that look up as the content.

If the content string of the option doesn't exist in the translation
table the content is left untranslated.

From what info you have provided, I don't know if i18n:translate="" is
missing from the template's options statement or if there is no
translation for the option label. Either would result in what you see.

IIRC you mentioned that the search template does translate the items.
I would not expect the issue.search.html in the classic tracker
template to do that so I am kind of stumped.

Maybe this will give you an idea, or somebody on the dev list (I know
we have a number of people whose primary language is not English will
be able to help.

Have a great day.
History
Date User Action Args
2018-10-11 01:05:51rouiljsetrecipients: + rouilj, mbehrle
2018-10-11 01:05:51rouiljlinkissue2551007 messages
2018-10-11 01:05:49rouiljcreate