diff --git a/invesalius/gui/language_dialog.py b/invesalius/gui/language_dialog.py index 75ddec3..0ed9738 100644 --- a/invesalius/gui/language_dialog.py +++ b/invesalius/gui/language_dialog.py @@ -40,27 +40,33 @@ class LanguageDialog(wx.Dialog): """Initialize combobox bitmap""" self.locales = i18n.GetLocales().values() + print self.locales self.locales_key = i18n.GetLocales().keys() self.os_locale = i18n.GetLocaleOS() self.bitmapCmb = bitmapCmb = wx.combo.BitmapComboBox(self, style=wx.CB_READONLY) - bmp_brazilian_flag = wx.Bitmap(os.path.join(ICON_DIR, "pt_BR.bmp"), wx.BITMAP_TYPE_BMP) + bmp_french_flag = wx.Bitmap(os.path.join(ICON_DIR, "fr_FR.bmp"), wx.BITMAP_TYPE_BMP) bmp_english_flag = wx.Bitmap(os.path.join(ICON_DIR, "en_GB.bmp"), wx.BITMAP_TYPE_BMP) + bmp_brazilian_flag = wx.Bitmap(os.path.join(ICON_DIR, "pt_BR.bmp"), wx.BITMAP_TYPE_BMP) bmp_spanish_flag = wx.Bitmap(os.path.join(ICON_DIR, "es.bmp"), wx.BITMAP_TYPE_BMP) - bitmapCmb.Append(self.locales[0], bmp_english_flag,"en_GB") - bitmapCmb.Append(self.locales[1], bmp_brazilian_flag,"pt_BR") - bitmapCmb.Append(self.locales[2], bmp_spanish_flag,"es") + bitmapCmb.Append(self.locales[0], bmp_french_flag,"fr_FR") + bitmapCmb.Append(self.locales[1], bmp_english_flag,"en_GB") + bitmapCmb.Append(self.locales[2], bmp_brazilian_flag,"pt_BR") + bitmapCmb.Append(self.locales[3], bmp_spanish_flag,"es") + if (self.os_locale[0:2] == 'pt'): - bitmapCmb.SetSelection(1) - elif (self.os_locale[0:2] == 'es'): bitmapCmb.SetSelection(2) - else: + elif (self.os_locale[0:2] == 'es'): + bitmapCmb.SetSelection(3) + elif (self.os_locale[0:2] == 'fr'): bitmapCmb.SetSelection(0) + else: + bitmapCmb.SetSelection(1) def __init_gui(self): self.txtMsg = wx.StaticText(self, -1, diff --git a/invesalius/i18n.py b/invesalius/i18n.py index a9195d3..9b276f8 100644 --- a/invesalius/i18n.py +++ b/invesalius/i18n.py @@ -32,7 +32,8 @@ def GetLocales(): """Return a dictionary which defines supported languages""" locale_descriptions = {'en': u'English', 'es': u'Español', - 'pt_BR': u'Português (Brasil)'} + 'pt_BR': u'Português (Brasil)', + 'fr':u'French'} return locale_descriptions def GetLocaleOS(): -- libgit2 0.21.2