Edgewall Software

Opened 15 years ago

Last modified 8 years ago

#385 new defect

i18n:msg directive not working when used as an element

Reported by: cboos Owned by: cmlenz
Priority: major Milestone: 0.9
Component: Internationalization Version: 0.5.1
Keywords: i18n:msg Cc: palgarvio

Description

At least in one situation, a correctly extracted message from an <i18n:msg> tag didn't get translated during filtering (as reported in #9308).

The workaround was to use the i18n:msg directive as an attribute instead of a tag:

  • tracopt/ticket/templates/ticket_delete.html

    tracopt/ticket/templates/ticket_delete.html
     
    1717    <div id="content" class="ticket" py:choose="action">
    1818      <py:when test="'delete'">
    1919        <h1 id="trac-ticket-title">
    20           <i18n:msg params="id">Delete <a href="${href.ticket(ticket.id)}">Ticket #$ticket.id</a></i18n:msg>
     20          <span i18n:msg="id">Delete <a href="${href.ticket(ticket.id)}">Ticket #$ticket.id</a></span>
    2121          <span class="status">($ticket.status<py:if
    2222              test="ticket.type"> $ticket.type</py:if><py:if
    2323              test="ticket.resolution">: $ticket.resolution</py:if>)</span>

Surprising, no?

Change History (2)

comment:1 Changed 15 years ago by cboos

FYI, #T9307 was similar (and #9308 in the description is actually #T9308, of course).

comment:2 Changed 8 years ago by hodgestar

  • Milestone changed from 0.7 to 0.9

Moved to milestone 0.9.

Note: See TracTickets for help on using tickets.