#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):
Hello Olemis !
So about the alert label and alert text rendered outside container in your
picture. I found the problem in
./bloodhound_dashboard/bhdashboard/widgets/templates/widget_timeline.html:
{{{#!python
<py:otherwise>
<py:def function="timeline_empty()">
<div i18n:msg="resource,daysback,fromdate">
No events reported
<py:if test="context.resource.id">
for <em>${summary_of(context.resource)}</em>
</py:if>
in the last <em>$daysback</em> days since
<span class="date">${format_date(fromdate)}</span>.
This may happen if system is not configured correctly.
Please contact your administrator if you think this is the case.
</div>
</py:def>
<xi:include href="widget_alert.html"
py:with="msglabel = 'Warning'; msgbody = timeline_empty()" />
</py:otherwise>
}}}
Should be changed to:
{{{#!python
<py:otherwise>
<py:def function="timeline_empty()">
<i18n:msg params="resource,daysback,fromdate">
No events reported
<py:if test="context.resource.id">
for <em>${summary_of(context.resource)}</em>
</py:if>
in the last <em>$daysback</em> days since
<span class="date">${format_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>
</py:def>
<xi:include href="widget_alert.html"
py:with="msglabel = _('Warning'; msgbody = timeline_empty()" />
</py:otherwise>
}}}
However the "Warning" at the end in the "py:with" is not translated and I
don't know how to mark a variable like this to be translated.
There is some bug on my machine : my translation stops after "No events
reported" (like your second pictures). However in your third picture, the
end of the sentence appears !
If I remove the "py:if" and the "em" inside the "i18n:msg", I can make
part of the sentence appear and disappear.
I am at complete lost on how to solve this ? Perhaps you remember what you
have done on your third picture to make the whole sentence appear ?
--
Ticket URL: <https://issues.apache.org/bloodhound/ticket/694#comment:65>
Apache Bloodhound <https://issues.apache.org/bloodhound/>
The Apache Bloodhound issue tracker