Modify ↓
#9206 closed defect (fixed)
[PATCH] AttributeError: 'XmppPreferencePanel' object has no attribute 'xmpp_format_setting'
| Reported by: | Jun Omae | Owned by: | Jun Omae |
|---|---|---|---|
| Priority: | normal | Component: | AnnouncerPlugin |
| Severity: | normal | Keywords: | i18n |
| Cc: | Ryan J Ollos, Robert Corsaro | Trac Release: | 0.12 |
Description
I'm working Japanese translations for the AnnouncerPlugin. While working, the following error occurs when visiting /prefs/announcer page.
2011-09-25 20:53:43,117 Trac[main] ERROR: Internal Server Error:
Traceback (most recent call last):
File "/home/jun66j5/venv/trac-0.12/lib/python2.4/site-packages/trac/web/main.py", line 522, in _dispatch_request
dispatcher.dispatch(req)
File "/home/jun66j5/venv/trac-0.12/lib/python2.4/site-packages/trac/web/main.py", line 243, in dispatch
resp = chosen_handler.process_request(req)
File "/home/jun66j5/venv/trac-0.12/lib/python2.4/site-packages/trac/prefs/web_ui.py", line 77, in process_request
template, data = chosen_provider.render_preference_panel(req, panel_id)
File "/home/jun66j5/src/trac/announcerplugin/announcer/pref.py", line 92, in render_preference_panel
for name, label, template, data in self._get_boxes(req):
File "/home/jun66j5/src/trac/announcerplugin/announcer/pref.py", line 86, in _get_boxes
yield ((boxname, boxlabel) +
File "/home/jun66j5/src/trac/announcerplugin/announcer/distributors/xmppd.py", line 254, in render_announcement_preference_box
self.xmpp_format_setting.default)
AttributeError: 'XmppPreferencePanel' object has no attribute 'xmpp_format_setting'
XmppDistributor module has xmpp_format_setting attrubute, I think that it should be as the following patch.
-
announcer/distributors/xmppd.py
diff --git a/announcer/distributors/xmppd.py b/announcer/distributors/xmppd.py index 3cf9f3f..55ed788 100644
a b class XmppPreferencePanel(Component): 251 251 for realm in supported_realms: 252 252 name = 'xmpp_format_%s'%realm 253 253 settings[realm] = SubscriptionSetting(self.env, name, 254 self.xmpp_format_setting.default)254 XmppDistributor(self.env).xmpp_format_setting.default) 255 255 if req.method == "POST": 256 256 for realm, setting in settings.items(): 257 257 name = 'xmpp_format_%s'%realm
Attachments (0)
Change History (7)
comment:1 follow-up: 3 Changed 14 years ago by
| Cc: | Robert Corsaro added; Steffen Hoffmann removed |
|---|---|
| Keywords: | i18n added |
| Owner: | changed from Robert Corsaro to Steffen Hoffmann |
comment:2 Changed 13 years ago by
comment:3 Changed 13 years ago by
Replying to hasienda:
Would you be so kind as to assign any i18n stuff directly to me, please?
Ok. I do so from next time.
comment:5 Changed 9 years ago by
| Owner: | Steffen Hoffmann deleted |
|---|
comment:6 Changed 9 years ago by
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
comment:7 Changed 9 years ago by
| Owner: | set to Jun Omae |
|---|
Note: See
TracTickets for help on using
tickets.



Would you be so kind as to assign any i18n stuff directly to me, please?
I'll have to resolve it anyway, since I did the initial implementation, and I'm on the way to improve it within next few weeks due to suspected Trac 0.11 backwards-compatibility issues, that I found in similar code for AccountManagerPlugin before. Thank you for taking care.