Roundup Tracker - Issues

Message4804

Author rouilj
Recipients pcaulagi, rouilj
Date 2013-02-24.05:19:51
Message-id <201302240519.r1O5JlDx005241@mx1.cs.umb.edu>
In-reply-to Your message of "Sun, 24 Feb 2013 05:05:29 GMT." <51299F91.7040900@wwstay.com> <51299F91.7040900@wwstay.com>
In message <51299F91.7040900@wwstay.com> <51299F91.7040900@wwstay.com>,
Pradip Caulagi writes:
>Pradip Caulagi added the comment:
>> In the classic (and minimal, devel and responsive) templates
>> the page.html menu column has a number of href links that include
>> entries like:
>>
>>     '@dispname': i18n.gettext('Show Unassigned')
>>
>> the space needs to be url encoded to %20 so that the page will validate.
>> These can be manually changed to %20, so they read:
>>
>>     '@dispname': i18n.gettext('Show%20Unassigned')
>
>How can I test the translations?  I have not seen a tracker in a 
>language other than English.  So how should I test that?

That's a valid question and one I wondered about as well. It is quite
possible that some languages like german would have a single word
(without any spaces) to describe 'Show Unassigned".

>Normally, I have seen that companies get the translations done from an 
>external agency.  So in this case, the additional characters would 
>confuse the translators.

Yeah the translator wouldn't recognize that "Show%20Unassigned"
requires translating just "Show Unassigned". I suppose that should be
replaced by:

 '@dispname': util.urlquote(i18n.gettext('Show Unassigned'))

hopefully the precompile will realise that the expression is static
and do all the work during the precompile and not at runtime, but it
may not be able to do that.

>> The user's defined queries at the top of the column needs to be
>> fixed as well. To fix those replace:
>>
>>    a href="#" tal:attributes="href
>> string:${qs/klass}?${qs/url}&@dispname=${qs/name}"
>>         tal:content="qs/name"
>> with:
>>
>>    a href="#" tal:attributes="href
>> python:'%s?%s&@dispname=%s'%(qs.klass,qs.url,utils.urlquote(qs.name.plain(
>)))"
>>         tal:content="qs/name"
>>
>Instead, can't we have qs.name.plain() always to urllib.quote before 
>returning?

Nope because we want the value with the space as the actual text of
the link. It just can't occur in the href. The full link code reads:

   <a href="#" tal:attributes="href python:'%s?%s&@dispname=%s'%(qs.klass,qs.url,utils.urlquote(qs.name.plain()))"
       tal:content="qs/name">link</a>

note the tal:content of qs/name which is qs.name.plain IIRC.
History
Date User Action Args
2013-02-24 05:19:51rouiljsetrecipients: + rouilj, pcaulagi
2013-02-24 05:19:51rouiljlinkissue2550795 messages
2013-02-24 05:19:51rouiljcreate