#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
163 163 Most recent call last: 164 164 <ul py:if="frames" style="display: none"> 165 165 <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> 169 168 <var>${frame.function}</var> 170 169 </a> 171 170 <div py:if="frame.line" class="source" style="display: none">
Attachments (1)
Change History (4)
comment:1 by , 15 years ago
comment:2 by , 15 years ago
Cc: | added |
---|---|
Milestone: | 0.12 → 0.12.1 |
Resolution: | → fixed |
Status: | new → closed |
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: 163 163 Most recent call last: 164 164 <ul py:if="frames" style="display: none"> 165 165 <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}", 168 168 line <b>${frame.lineno + 1}</b>, in</span> 169 <var>${frame.function}</var> 169 <var>${frame.function}</var></i18n:msg> 170 170 </a> 171 171 <div py:if="frame.line" class="source" style="display: none"> 172 172 <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 , 15 years ago
Attachment: | t9307-genshi-i18-filter-issue-r9623.patch added |
---|
the change to error.html + make extraction update-fr
+ translation of that message in french
comment:3 by , 15 years ago
Milestone: | 0.12.1 → 0.12 |
---|---|
Owner: | set to |
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!)
Ah yes, wrong nesting. Well spotted!