Modify ↓
#13939 closed defect (fixed)
Import 'ngettext' is missed
Reported by: | Andrew G. Khodotov | Owned by: | Jun Omae |
---|---|---|---|
Priority: | normal | Component: | AdvancedTicketWorkflowPlugin |
Severity: | major | Keywords: | |
Cc: | Trac Release: | 1.2 |
Description
When I set "clear_fields" operation, I get "NameError: global name 'ngettext' is not defined" error. Quote from trace log:
File "/home/and/.local/lib/python2.7/site-packages/advancedworkflow/controller.py", line 269, in render_ticket_action_control hint = ngettext("The %(fields)s field will be cleared.",
Need to append import section:
from trac.util.translation import domain_functions, ngettext
has solve.
Attachments (0)
Change History (4)
comment:1 Changed 4 years ago by
comment:2 Changed 4 years ago by
Well, so be it. Please apply this patch to version in repository. 1.2.2.dev0 from https://trac-hacks.org/svn/advancedticketworkflowplugin/1.2/ has a bug.
comment:3 Changed 4 years ago by
Owner: | set to Ryan J Ollos |
---|---|
Resolution: | → fixed |
Status: | new → closed |
In 17954:
comment:4 Changed 4 years ago by
Owner: | changed from Ryan J Ollos to Jun Omae |
---|
Note: See
TracTickets for help on using
tickets.
The use of
ngettext
is introduced in r16901 (#13237).We should use
ngettext
fromdomain_functions()
rather than importing fromtrac.util.translation
.advancedworkflow/controller.py
add_domain = domain_functions('advancedworkflow','_', 'tag_', 'add_domain')