Edgewall Software
Modify

Opened 7 years ago

Closed 7 years ago

#12866 closed defect (fixed)

String isn't extraced from _("...") in py:with attribute

Reported by: Jun Omae Owned by: Jun Omae
Priority: normal Milestone: 1.0.17
Component: i18n Version: 1.0
Severity: normal Keywords: genshi
Cc: Branch:
Release Notes:

Fix non-translated strings in milestone view.

API Changes:
Internal Changes:

Description (last modified by Jun Omae)

tags/trac-1.0.15/trac/ticket/templates/milestone_view.html@:73#L72 has _('...') in py:with attribute:

Line 
72 <xi:include href="progress_bar_grouped.html" py:if="groups"
73 py:with="summary = _('Shows the milestone completion status grouped by %(grouped_by)s',
74 grouped_by=grouped_by)"/>

However, a string in the gettext keyword is not extracted.

$ git grep -c '%(grouped_by)s' trac-1.0.15 trac/ticket/templates/milestone_view.html
trac-1.0.15:trac/ticket/templates/milestone_view.html:1
$ echo $?
0
$ git grep -c '%(grouped_by)s' trac-1.0.15 trac/locale/*.pot
$ echo $?
1

That string is extracted in Jinja2 template on trunk.

Attachments (0)

Change History (5)

comment:1 by Jun Omae, 7 years ago

Description: modified (diff)
Keywords: genshi added

comment:2 by Ryan J Ollos, 7 years ago

Milestone: 1.0.161.0.17

Milestone renamed

comment:3 by Jun Omae, 7 years ago

Owner: set to Jun Omae
Status: newassigned

In [989146f7c/jomae.git], work around to move _("...") in the py:with attribute to python code. Ideally, Genshi should be fixed.

trac/versioncontrol/templates/dirlist_thead.html has the same issues but it's hard to apply the same work around.

comment:4 by Ryan J Ollos, 7 years ago

That seems like a reasonable workaround, particularly since it won't affect trunk.

comment:5 by Jun Omae, 7 years ago

Release Notes: modified (diff)
Resolution: fixed
Status: assignedclosed

Committed in [16555] and merged in [16556].

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.