Bug 22350

Summary: telepathy-butterfly crashed with NameError in on_conversation_nudge_received()
Product: Telepathy Reporter: Olivier Le Thanh Duong <olivier>
Component: butterflyAssignee: Telepathy bugs list <telepathy-bugs>
Status: RESOLVED FIXED QA Contact: Telepathy bugs list <telepathy-bugs>
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: Other   
OS: All   
URL: https://bugs.launchpad.net/ubuntu/+source/telepathy-butterfly/+bug/274400
Whiteboard:
i915 platform: i915 features:
Attachments: nudge.patch

Description Olivier Le Thanh Duong 2009-06-18 08:01:16 UTC
This bug was originally reported by K. Aning on Launchpad (see URL).

"Apparently I was nudged by someone on MSN"

Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/pymsn/switchboard_manager.py", line 365, in _sb_message_received
    handler._on_message_received(message)
  File "/usr/lib/python2.5/site-packages/pymsn/conversation.py", line 374, in _on_message_received
    self._dispatch("on_conversation_nudge_received", sender)
  File "/usr/lib/python2.5/site-packages/pymsn/event/__init__.py", line 44, in _dispatch
    if event_handler._dispatch_event(name, *args):
  File "/usr/lib/python2.5/site-packages/pymsn/event/__init__.py", line 65, in _dispatch_event
    handler(*params)
  File "/usr/lib/python2.5/site-packages/butterfly/channel/text.py", line 121, in on_conversation_nudge_received
    text = unicode(_("sends you a nudge"), "utf-8")
NameError: global name '_' is not defined

Dev note :
I don't even know why we are passing it to _() since we don't use gettext at all. Easy fix
Comment 1 Guillaume Desmottes 2009-06-22 02:12:42 UTC
CM are not supposed to contain translatable strings.
Comment 2 Nicolò Chieffo 2009-06-27 02:35:43 UTC
Created attachment 27186 [details] [review]
nudge.patch

if so it's a simple patch
Comment 3 Olivier Le Thanh Duong 2009-07-05 09:05:09 UTC
Thanks for your patch Nicolò, it has been merged in master

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.