[0.5] "Send to the calculator" doesn't work in non-english

Bug #363382 reported by Steve Dodier-Lazaro on 2009-04-18
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
wxBanker
Medium
Michael Rooney

Bug Description

As said in the summary, the "send/add/substract to/from calculator" context menu entries don't work in wxBanker 0.5 (at least, they don't here ;) ).

Steve Dodier-Lazaro (sidi) wrote :

Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/wxbanker/transactionolv.py", line 192, in <lambda>
    menu.Bind(wx.EVT_MENU, lambda e, s=actionStr: self.onCalculatorAction(transactions, col, s), source=item)
  File "/usr/lib/python2.5/site-packages/wxbanker/transactionolv.py", line 240, in onCalculatorAction
    pushStr = {'SEND': 'C%s', 'SUBTRACT': '-%s=', 'ADD': '+%s='}[command]
KeyError: 'ENVOYER'

(python:26052): Gtk-WARNING **: /build/buildd/gtk+2.0-2.14.4/gtk/gtkwidget.c:9042: widget class `GtkPizza' has no property named `row-ending-details'

See here :
KeyError: 'ENVOYER' , envoyer means SEND in french. I suppose you parse the string and use this as a key, which would cause the problem.

Steve Dodier-Lazaro (sidi) wrote :

transactionolv.py : line 230 : command = actionStr.split(' ')[0].upper()

This is what should be changed. I don't know much about Python but you should change the last arg of onCalculatorAction to an unique identifier for the menu entry that is clicked (i guess they have indexes, or maybe you can give them IDs, dunno).

Changed in wxbanker:
status: New → Confirmed
Michael Rooney (mrooney) wrote :

Thanks, relying on those strings was indeed a bad idea. Indexes are now used to determine the action. Thanks for reporting this in time for 0.5!

Changed in wxbanker:
assignee: nobody → Michael Rooney (mrooney)
importance: Undecided → Medium
milestone: none → 0.5
status: Confirmed → Fix Committed
summary: - "Send to the calculator" doesn't work in 0.5
+ [0.5] "Send to the calculator" doesn't work in non-english
tags: added: localization
Michael Rooney (mrooney) wrote :

Released in 0.5!

Changed in wxbanker:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers