Edgewall Software
Modify

Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#9307 closed defect (fixed)

"function" argument of i18n:msg is missing in the extracted message

Reported by: Jun Omae Owned by: Jun Omae
Priority: normal Milestone: 0.12
Component: i18n Version: 0.12dev
Severity: normal Keywords:
Cc: Pedro Algarvio, aka, s0undt3ch, Christopher Lenz Branch:
Release Notes:
API Changes:
Internal Changes:

Description

"function" argument of i18n:msg is specified in error.html, howerver, the "function" argument is missing in the extracted message.

source:trunk/trac/locale/messages.pot@9605:1876-1877#L1876

#: trac/templates/error.html:167
#, python-format
msgid ""
"File \"%(file)s\",\n"
"                        line [1:%(line)s], in"
msgstr ""
  • trac/templates/error.html

     
    163163                  Most recent call last:
    164164                  <ul py:if="frames" style="display: none">
    165165                    <li class="frame" py:for="idx, frame in enumerate(frames)">
    166                       <a href="#frame${idx}" id="frame${idx}">
    167                         <span class="file" i18n:msg="file, line, function">File "${frame.filename}",
    168                         line <b>${frame.lineno + 1}</b>, in</span>
     166                      <a href="#frame${idx}" id="frame${idx}" i18n:msg="file, line, function">
     167                        <span class="file">File "${frame.filename}", line <b>${frame.lineno + 1}</b>, in</span>
    169168                        <var>${frame.function}</var>
    170169                      </a>
    171170                      <div py:if="frame.line" class="source" style="display: none">

Attachments (1)

t9307-genshi-i18-filter-issue-r9623.patch (8.1 KB ) - added by Christian Boos 14 years ago.
the change to error.html + make extraction update-fr + translation of that message in french

Download all attachments as: .zip

Change History (4)

comment:1 by Christian Boos, 14 years ago

Ah yes, wrong nesting. Well spotted!

comment:2 by Christian Boos, 14 years ago

Cc: Pedro Algarvio, aka, s0undt3ch Christopher Lenz added
Milestone: 0.120.12.1
Resolution: fixed
Status: newclosed

It should have been a simple matter of doing:

  • trac/templates/error.html

    diff --git a/trac/templates/error.html b/trac/templates/error.html
    a b Request parameters:  
    163163                  Most recent call last:
    164164                  <ul py:if="frames" style="display: none">
    165165                    <li class="frame" py:for="idx, frame in enumerate(frames)">
    166                       <a href="#frame${idx}" id="frame${idx}">
    167                         <span class="file" i18n:msg="file, line, function">File "${frame.filename}",
     166                      <a href="#frame${idx}" id="frame${idx}"><i18n:msg params="file, line, function">
     167                        <span class="file">File "${frame.filename}",
    168168                        line <b>${frame.lineno + 1}</b>, in</span>
    169                         <var>${frame.function}</var>
     169                        <var>${frame.function}</var></i18n:msg>
    170170                      </a>
    171171                      <div py:if="frame.line" class="source" style="display: none">
    172172                        <h3>Code fragment:</h3>

Then a new extraction:

#: trac/templates/error.html:166
#, python-format
msgid ""
"[1:File \"%(file)s\",\n"
"                        line [2:%(line)s], in]\n"
"                        [3:%(function)s]"
msgstr ""

And update:

#: trac/templates/error.html:166
#, python-format
msgid ""
"[1:File \"%(file)s\",\n"
"                        line [2:%(line)s], in]\n"
"                        [3:%(function)s]"
msgstr ""
"[1:Fichier « %(file)s »,\n"
"                        ligne [2:%(line)s], dans]\n"
"                        [3:%(function)s]"

Unfortunately, that message wasn't translated. Likely a Genshi 0.6 bug, as other test changes I made to the messages.po file did show correctly while testing that page.

Attaching the whole diff for easier testing and confirmation of the issue.

by Christian Boos, 14 years ago

the change to error.html + make extraction update-fr + translation of that message in french

comment:3 by Christian Boos, 14 years ago

Milestone: 0.12.10.12
Owner: set to Jun Omae

The problem was very similar to #9308 and the same fix was applied in r9631, hence credits go to Jun ;-)

Extraction + french updates done in r9632 and r9633.

In addition, r9632 will be very interesting for checking what Transifex does when the count of messages in the messages.pot doesn't change, in relation with #Tx583.

Note that translators should be very careful with this update, in order to avoid issues like #9171.

(I just noticed I already had closed that ticket by mistake, so I leave it closed only fixing the owner; thanks again Jun!)

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Jun Omae.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Jun Omae to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.