Commit 126431dd62e7e74f7358d389f1e4353f68caf92c

Authored by tfmoraes
1 parent 0f11c770

FIX: UnicodeDecodeError in Linux

Showing 1 changed file with 6 additions and 4 deletions   Show diff stats
invesalius/i18n.py
  1 +#!/usr/bin/env python
  2 +# -*- coding: UTF-8 -*-
  3 +
1 4 #--------------------------------------------------------------------------
2 5 # Software: InVesalius - Software de Reconstrucao 3D de Imagens Medicas
3 6 # Copyright: (C) 2001 Centro de Pesquisas Renato Archer
... ... @@ -26,9 +29,9 @@ import constants as const
26 29  
27 30 def GetLocales():
28 31 """Return a dictionary which defines supported languages"""
29   - locale_descriptions = {'es':'Espa\xf1ol',\
  32 + locale_descriptions = {'es':'Español',\
30 33 'en_GB':'English',\
31   - 'pt_BR':'Portugu\xeas (Brasil)'}
  34 + 'pt_BR':'Português (Brasil)'}
32 35 return locale_descriptions
33 36  
34 37 def GetLocaleOS():
... ... @@ -39,7 +42,6 @@ def GetLocaleOS():
39 42 def InstallLanguage(language):
40 43  
41 44 lang = gettext.translation('invesalius', const.LANGUAGE_DIR,\
42   - languages=[language])
  45 + languages=[language], codeset='utf8')
43 46 lang.install()
44 47 return lang.gettext
45   -
46 48 \ No newline at end of file
... ...