Commit 79fed878954509d95bad4eb1310a00de6085ba73
1 parent
9ca2dffd
Exists in
master
and in
68 other branches
ADD: Greek i18n support
Showing
3 changed files
with
18 additions
and
13 deletions
Show diff stats
invesalius/gui/data_notebook.py
@@ -198,6 +198,7 @@ class MasksListCtrlPanel(wx.ListCtrl, listmix.TextEditMixin): | @@ -198,6 +198,7 @@ class MasksListCtrlPanel(wx.ListCtrl, listmix.TextEditMixin): | ||
198 | 198 | ||
199 | def OnKeyEvent(self, event): | 199 | def OnKeyEvent(self, event): |
200 | keycode = event.GetKeyCode() | 200 | keycode = event.GetKeyCode() |
201 | + # Delete key | ||
201 | if (sys.platform == 'darwin') and (keycode == wx.WXK_BACK): | 202 | if (sys.platform == 'darwin') and (keycode == wx.WXK_BACK): |
202 | selected = self.GetSelected() | 203 | selected = self.GetSelected() |
203 | for item in selected: | 204 | for item in selected: |
@@ -207,13 +208,11 @@ class MasksListCtrlPanel(wx.ListCtrl, listmix.TextEditMixin): | @@ -207,13 +208,11 @@ class MasksListCtrlPanel(wx.ListCtrl, listmix.TextEditMixin): | ||
207 | for item in selected: | 208 | for item in selected: |
208 | self.RemoveMask(item) | 209 | self.RemoveMask(item) |
209 | 210 | ||
210 | - | ||
211 | def OnCloseProject(self, pubsub_evt): | 211 | def OnCloseProject(self, pubsub_evt): |
212 | self.DeleteAllItems() | 212 | self.DeleteAllItems() |
213 | self.mask_list_index = {} | 213 | self.mask_list_index = {} |
214 | 214 | ||
215 | def OnChangeCurrentMask(self, pubsub_evt): | 215 | def OnChangeCurrentMask(self, pubsub_evt): |
216 | - | ||
217 | mask_index = pubsub_evt.data | 216 | mask_index = pubsub_evt.data |
218 | try: | 217 | try: |
219 | self.SetItemImage(mask_index, 1) | 218 | self.SetItemImage(mask_index, 1) |
invesalius/gui/language_dialog.py
@@ -50,22 +50,27 @@ class LanguageDialog(wx.Dialog): | @@ -50,22 +50,27 @@ class LanguageDialog(wx.Dialog): | ||
50 | bmp_english_flag = wx.Bitmap(os.path.join(ICON_DIR, "en_GB.bmp"), wx.BITMAP_TYPE_BMP) | 50 | bmp_english_flag = wx.Bitmap(os.path.join(ICON_DIR, "en_GB.bmp"), wx.BITMAP_TYPE_BMP) |
51 | bmp_brazilian_flag = wx.Bitmap(os.path.join(ICON_DIR, "pt_BR.bmp"), wx.BITMAP_TYPE_BMP) | 51 | bmp_brazilian_flag = wx.Bitmap(os.path.join(ICON_DIR, "pt_BR.bmp"), wx.BITMAP_TYPE_BMP) |
52 | bmp_spanish_flag = wx.Bitmap(os.path.join(ICON_DIR, "es.bmp"), wx.BITMAP_TYPE_BMP) | 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 | bitmapCmb.SetSelection(3) | 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 | bitmapCmb.SetSelection(0) | 71 | bitmapCmb.SetSelection(0) |
67 | else: | 72 | else: |
68 | - bitmapCmb.SetSelection(1) | 73 | + bitmapCmb.SetSelection(2) |
69 | 74 | ||
70 | def __init_gui(self): | 75 | def __init_gui(self): |
71 | self.txtMsg = wx.StaticText(self, -1, | 76 | self.txtMsg = wx.StaticText(self, -1, |
invesalius/i18n.py
@@ -33,7 +33,8 @@ def GetLocales(): | @@ -33,7 +33,8 @@ def GetLocales(): | ||
33 | locale_descriptions = {'en': u'English', | 33 | locale_descriptions = {'en': u'English', |
34 | 'es': u'Español', | 34 | 'es': u'Español', |
35 | 'pt_BR': u'Português (Brasil)', | 35 | 'pt_BR': u'Português (Brasil)', |
36 | - 'fr':u'Français'} | 36 | + 'fr':u'Français', |
37 | + 'el_GR':u'Ελληνική'} | ||
37 | return locale_descriptions | 38 | return locale_descriptions |
38 | 39 | ||
39 | def GetLocaleOS(): | 40 | def GetLocaleOS(): |