#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 SaintGermain):
Ah ah, I managed to reproduce the bug with a simple test case.
test.py:
{{{#!python
from genshi.template import TemplateLoader, MarkupTemplate
from genshi.filters import Translator
from trac.util import translation
loader = TemplateLoader('.', callback=lambda template:
Translator(translation.get_translations()).setup(template))
template = loader.load('bug.html')
print(template.generate())
}}}
bug.html:
{{{
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:py="http://genshi.edgewall.org/"
xmlns:i18n="http://genshi.edgewall.org/i18n">
<p>
<i18n:msg params="resource,daysback,fromdate">
No events reported
<py:if test="1">
for <em>resource</em>
</py:if>
in the last <em>daysback</em> days since
<span class="date">fromdate</span>.
This may happen if system is not configured correctly.
Please contact your administrator if you think this is the case.
</i18n:msg>
</p>
</html>
}}}
result:
{{{
<html xmlns="http://www.w3.org/1999/xhtml">
<p>
No events reported
for
</p>
}}}
Do you think that the problem is in Genshi or in Trac ?
--
Ticket URL: <https://issues.apache.org/bloodhound/ticket/694#comment:76>
Apache Bloodhound <https://issues.apache.org/bloodhound/>
The Apache Bloodhound issue tracker