Commit 79fed878954509d95bad4eb1310a00de6085ba73

Authored by tatiana
1 parent 9ca2dffd

ADD: Greek i18n support

invesalius/gui/data_notebook.py
... ... @@ -198,6 +198,7 @@ class MasksListCtrlPanel(wx.ListCtrl, listmix.TextEditMixin):
198 198  
199 199 def OnKeyEvent(self, event):
200 200 keycode = event.GetKeyCode()
  201 + # Delete key
201 202 if (sys.platform == 'darwin') and (keycode == wx.WXK_BACK):
202 203 selected = self.GetSelected()
203 204 for item in selected:
... ... @@ -207,13 +208,11 @@ class MasksListCtrlPanel(wx.ListCtrl, listmix.TextEditMixin):
207 208 for item in selected:
208 209 self.RemoveMask(item)
209 210  
210   -
211 211 def OnCloseProject(self, pubsub_evt):
212 212 self.DeleteAllItems()
213 213 self.mask_list_index = {}
214 214  
215 215 def OnChangeCurrentMask(self, pubsub_evt):
216   -
217 216 mask_index = pubsub_evt.data
218 217 try:
219 218 self.SetItemImage(mask_index, 1)
... ...
invesalius/gui/language_dialog.py
... ... @@ -50,22 +50,27 @@ class LanguageDialog(wx.Dialog):
50 50 bmp_english_flag = wx.Bitmap(os.path.join(ICON_DIR, "en_GB.bmp"), wx.BITMAP_TYPE_BMP)
51 51 bmp_brazilian_flag = wx.Bitmap(os.path.join(ICON_DIR, "pt_BR.bmp"), wx.BITMAP_TYPE_BMP)
52 52 bmp_spanish_flag = wx.Bitmap(os.path.join(ICON_DIR, "es.bmp"), wx.BITMAP_TYPE_BMP)
  53 + bmp_greek_flag = wx.Bitmap(os.path.join(ICON_DIR, "el_GR.bmp"), wx.BITMAP_TYPE_BMP)
  54 +
  55 + bitmapCmb.Append(self.locales[0], bmp_greek_flag, "el_GR")
  56 + bitmapCmb.Append(self.locales[1], bmp_french_flag,"fr")
  57 + bitmapCmb.Append(self.locales[2], bmp_english_flag,"en_GB")
  58 + bitmapCmb.Append(self.locales[3], bmp_brazilian_flag,"pt_BR")
  59 + bitmapCmb.Append(self.locales[4], bmp_spanish_flag,"es")
53 60  
54   - bitmapCmb.Append(self.locales[0], bmp_french_flag,"fr")
55   - bitmapCmb.Append(self.locales[1], bmp_english_flag,"en_GB")
56   - bitmapCmb.Append(self.locales[2], bmp_brazilian_flag,"pt_BR")
57   - bitmapCmb.Append(self.locales[3], bmp_spanish_flag,"es")
58 61  
59 62  
60   -
61   - if (self.os_locale[0:2] == 'pt'):
62   - bitmapCmb.SetSelection(2)
63   - elif (self.os_locale[0:2] == 'es'):
  63 + os_lang = self.os_locale[0:2]
  64 + if (os_lang == 'pt'):
64 65 bitmapCmb.SetSelection(3)
65   - elif (self.os_locale[0:2] == 'fr'):
  66 + elif (os_lang == 'es'):
  67 + bitmapCmb.SetSelection(4)
  68 + elif (os_lang == 'fr'):
  69 + bitmapCmb.SetSelection(1)
  70 + elif (os_lang == 'el'):
66 71 bitmapCmb.SetSelection(0)
67 72 else:
68   - bitmapCmb.SetSelection(1)
  73 + bitmapCmb.SetSelection(2)
69 74  
70 75 def __init_gui(self):
71 76 self.txtMsg = wx.StaticText(self, -1,
... ...
invesalius/i18n.py
... ... @@ -33,7 +33,8 @@ def GetLocales():
33 33 locale_descriptions = {'en': u'English',
34 34 'es': u'Español',
35 35 'pt_BR': u'Português (Brasil)',
36   - 'fr':u'Français'}
  36 + 'fr':u'Français',
  37 + 'el_GR':u'Ελληνική'}
37 38 return locale_descriptions
38 39  
39 40 def GetLocaleOS():
... ...