Skip to content

Commit

Permalink
fix language issue
Browse files Browse the repository at this point in the history
When there are translations with äÜßêâáöÖ it doesn't work
  • Loading branch information
e-sailing committed Aug 23, 2017
1 parent 29bbb6f commit 09bebfd
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion classes/edit_i2c.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
class editI2c(wx.Dialog):
def __init__(self,name,magn,sk,rate,offset):

title = _('Edit')+' '+name+' - '+magn
title = _('Edit')+(' '+name+' - '+magn).encode('utf-8')

wx.Dialog.__init__(self, None, title=title, size=(450, 250))

Expand Down
6 changes: 4 additions & 2 deletions tools/NMEA_0183_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ def add_nmea(self,e):
self.edit_add_nmea(0)

def edit_add_nmea(self,edit):
self.SetStatusText('')
dlg = addNMEA_0183(edit)
res = dlg.ShowModal()
if res == wx.ID_OK:
Expand Down Expand Up @@ -133,6 +134,7 @@ def edit_add_nmea(self,edit):
dlg.Destroy()

def delete_nmea(self,e):
self.SetStatusText('')
selected_sentence=self.list_nmea.GetFirstSelected()
if selected_sentence==-1:
self.SetStatusText('Select a sentence to delete.')
Expand All @@ -142,8 +144,8 @@ def delete_nmea(self,e):
self.conf.set('NMEA0183', 'sentences', str(self.sentences))
self.start_d()

def compat_nmea(self,e):
if self.list_nmea.GetColumnCount()>3:
def compat_nmea(self,e):
if self.list_nmea.GetItemCount()>0:
self.SetStatusText(_('This function is only allowed when the list is empty.'))
return
self.conf.set('NMEA0183', 'sentences', "[['HDG', [['navigation.headingMagnetic', 'x.x|deg', '+', 0.0], '', '', '', ''], 0.5], ['XDR', ['A', ['navigation.attitude.roll', 'x.x|deg', '+', 0.0], 'D', 'ROLL'], 1.0], ['XDR', ['A', ['navigation.attitude.pitch', 'x.x|deg', '+', 0.0], 'D', 'PTCH'], 1.0], ['XDR', ['P', ['environment.outside.pressure', 'x.xxxx', '/', 100000.0], 'B', 'Barometer'], 5.0], ['XDR', ['C', ['environment.outside.temperature', 'x.x|C', '+', 0.0], 'C', 'ENV_OUTAIR_T'], 5.0], ['MTW', [['environment.water.temperature', 'x.x|C', '+', 0.0], 'C'], 5.0]]")
Expand Down
2 changes: 1 addition & 1 deletion tools/classes/add_NMEA_0183.py
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ def check_value_type(self, e):
def check_value_type_(self, selected):
self.value_type.SetValue(selected)
#none
if not selected or selected==self.list_value_type[0]:
if not selected or selected.encode('utf-8')==self.list_value_type[0]:
self.skvessels.Disable()
self.skgroups.Disable()
self.signalk.Disable()
Expand Down

0 comments on commit 09bebfd

Please sign in to comment.