#694: Translations scaffolding
------------------------+----------------------
Reporter: olemis | Owner: olemis
Type: task | Status: assigned
Priority: minor | Milestone:
Component: trac core | Version: 0.7.0
Resolution: | Keywords: i18n
------------------------+----------------------
Comment (by olemis):
Replying to [comment:66 SaintGermain]:
> For the forced translation of the 'Source' tab in the mainnav.
> Basically I have the genshi.builder.Element:
> <a href="/sqlite/wiki/Guide/RepositoryAdmin">Source</a>
>
> And I would like to replace the 'Source' with the translation.
>
> it seems that I can do something like:
> {{{#!python
> label = element.generate() |
genshi.filters.transform.Transformer().select('a/text()')
> element.generate() |
genshi.filters.transform.Transformer('a/text()').replace(gettext(label))
> }}}
>
> What do you think ?
I do not recommend doing so . This is filtering the Genshi template stream
and that has a substantial performance impact just to change a label that
apparently should be translated somehow (e.g. see Tickets) .
> It doesn't look very nice but I haven't found any other simpler way.
>
What about if a translation for ''Source'' is provided in the same catalog
where ''Tickets'' is been translated ?
> I am almost there to commit the patch ;-)
;)
--
Ticket URL: <https://issues.apache.org/bloodhound/ticket/694#comment:68>
Apache Bloodhound <https://issues.apache.org/bloodhound/>
The Apache Bloodhound issue tracker