bloodhound-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ryan Ollos <ryan.ol...@wandisco.com>
Subject Re: Internationalization of Bloodhound
Date Tue, 19 Nov 2013 20:13:51 GMT
On Tue, Nov 19, 2013 at 5:16 AM, Saint Germain <saintger@gmail.com> wrote:

> I have updated my repo on bitbucket to correct the patch for ticket
> #694 and finished the french translation on Transifex.
>
> I will create a separate branch/patch on Bitbucket which includes the
> french translation and make a pull request.
>
> Here are a few comments but mostly it works ! ;-)
>
> 1) There a lot (around 300-400 I think) of duplicated strings with
> Trac. With Transifex I just quickly copy-pasted the translation, but
> ideally (Don't Repeat Yourself) we should mark these strings as
> duplicates of Trac strings (big work)
>
> 2) So far I see 2 parts where the translation doesn't work:
>   a) the test in the Seach box ("Search all produts. Try TracLinks").
> I have no idea why it doesn't work
>   b) In the Custom Query page, the checkboxes "accepted, assigned,
> closed, needinfo, etc." are still in english (I don't know where the
> names are defined)
>
> 3) In case of problem in the translation process, the stack trace is
> very difficult to understand. For example I had a problem with a new
> version of Babel and the result was something like
> "NullTranslationsBabel has no attribute isactive". I will propose some
> more try/request on trac/trac/util/translation.py in order to have a
> more useful debug log
>

Regarding (2a),

The Genshi documentation says "The default is to consider the attributes
abbr, alt, label, prompt, standby, summary, and title, which is a list that
makes sense for HTML documents. Of course, you can tell the translator to
use a different set of attribute names, or none at all."
http://genshi.edgewall.org/wiki/Documentation/i18n.html#id3

It looks like the set of attributes is specified when instantiating the
Translator object:
http://genshi.edgewall.org/browser/tags/0.6.0/genshi/filters/i18n.py?marks=609-611,614-615#L596

Since "placeholder" is a new HTML5 attribute, it probably hasn't been
considered in a release of Genshi. The latest Genshi release is 0.7, and it
is not included in the set yet.
http://genshi.edgewall.org/browser/tags/0.7.0/genshi/filters/i18n.py?marks=606-608#L596

It seems like we have 2 options:
 1. Specify include_attrs when constructing the Translator object in
trac.web.chrome:
http://trac.edgewall.org/browser/branches/1.0-stable/trac/web/chrome.py?rev=12211&marks=951#L938
 2. Ask the Genshi team to include "placeholder" in the set.

There doesn't seem to be much development activity with Genshi lately, so
(1) would probably be the faster solution. We could patch our copy of Trac
and open a ticket with Trac for pushing the change to the core. We should
consider whether there are any other HTML5 attributes we are utilizing or
might utilize in the future that should be included in the translatable
set. We might even just expose an INCLUDE_ATTRS variable in trac.web.chrome
that a theme could set.

Would you kindly test whether specifying `incl_attributes` in
trac.web.chrome:load_template makes the string translatable?


Regarding (2b)

I believe it is the case that the workflow states aren't translated, and
there is an open ticket for this:
http://trac.edgewall.org/ticket/9472

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message