Commit 018040181d942113467d5487b0e31e56dddf2d86

Authored by Paulo Henrique Junqueira Amorim
1 parent 934ecc2d

ADD: French options

invesalius/gui/language_dialog.py
... ... @@ -40,27 +40,33 @@ class LanguageDialog(wx.Dialog):
40 40 """Initialize combobox bitmap"""
41 41  
42 42 self.locales = i18n.GetLocales().values()
  43 + print self.locales
43 44  
44 45 self.locales_key = i18n.GetLocales().keys()
45 46 self.os_locale = i18n.GetLocaleOS()
46 47  
47 48 self.bitmapCmb = bitmapCmb = wx.combo.BitmapComboBox(self, style=wx.CB_READONLY)
48 49  
49   - bmp_brazilian_flag = wx.Bitmap(os.path.join(ICON_DIR, "pt_BR.bmp"), wx.BITMAP_TYPE_BMP)
  50 + bmp_french_flag = wx.Bitmap(os.path.join(ICON_DIR, "fr_FR.bmp"), wx.BITMAP_TYPE_BMP)
50 51 bmp_english_flag = wx.Bitmap(os.path.join(ICON_DIR, "en_GB.bmp"), wx.BITMAP_TYPE_BMP)
  52 + bmp_brazilian_flag = wx.Bitmap(os.path.join(ICON_DIR, "pt_BR.bmp"), wx.BITMAP_TYPE_BMP)
51 53 bmp_spanish_flag = wx.Bitmap(os.path.join(ICON_DIR, "es.bmp"), wx.BITMAP_TYPE_BMP)
52 54  
53   - bitmapCmb.Append(self.locales[0], bmp_english_flag,"en_GB")
54   - bitmapCmb.Append(self.locales[1], bmp_brazilian_flag,"pt_BR")
55   - bitmapCmb.Append(self.locales[2], bmp_spanish_flag,"es")
  55 + bitmapCmb.Append(self.locales[0], bmp_french_flag,"fr_FR")
  56 + bitmapCmb.Append(self.locales[1], bmp_english_flag,"en_GB")
  57 + bitmapCmb.Append(self.locales[2], bmp_brazilian_flag,"pt_BR")
  58 + bitmapCmb.Append(self.locales[3], bmp_spanish_flag,"es")
56 59  
57 60  
  61 +
58 62 if (self.os_locale[0:2] == 'pt'):
59   - bitmapCmb.SetSelection(1)
60   - elif (self.os_locale[0:2] == 'es'):
61 63 bitmapCmb.SetSelection(2)
62   - else:
  64 + elif (self.os_locale[0:2] == 'es'):
  65 + bitmapCmb.SetSelection(3)
  66 + elif (self.os_locale[0:2] == 'fr'):
63 67 bitmapCmb.SetSelection(0)
  68 + else:
  69 + bitmapCmb.SetSelection(1)
64 70  
65 71 def __init_gui(self):
66 72 self.txtMsg = wx.StaticText(self, -1,
... ...
invesalius/i18n.py
... ... @@ -32,7 +32,8 @@ def GetLocales():
32 32 """Return a dictionary which defines supported languages"""
33 33 locale_descriptions = {'en': u'English',
34 34 'es': u'Español',
35   - 'pt_BR': u'Português (Brasil)'}
  35 + 'pt_BR': u'Português (Brasil)',
  36 + 'fr':u'French'}
36 37 return locale_descriptions
37 38  
38 39 def GetLocaleOS():
... ...