Commit 126431dd62e7e74f7358d389f1e4353f68caf92c
1 parent
0f11c770
Exists in
master
and in
68 other branches
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 | # Software: InVesalius - Software de Reconstrucao 3D de Imagens Medicas | 5 | # Software: InVesalius - Software de Reconstrucao 3D de Imagens Medicas |
3 | # Copyright: (C) 2001 Centro de Pesquisas Renato Archer | 6 | # Copyright: (C) 2001 Centro de Pesquisas Renato Archer |
@@ -26,9 +29,9 @@ import constants as const | @@ -26,9 +29,9 @@ import constants as const | ||
26 | 29 | ||
27 | def GetLocales(): | 30 | def GetLocales(): |
28 | """Return a dictionary which defines supported languages""" | 31 | """Return a dictionary which defines supported languages""" |
29 | - locale_descriptions = {'es':'Espa\xf1ol',\ | 32 | + locale_descriptions = {'es':'Español',\ |
30 | 'en_GB':'English',\ | 33 | 'en_GB':'English',\ |
31 | - 'pt_BR':'Portugu\xeas (Brasil)'} | 34 | + 'pt_BR':'Português (Brasil)'} |
32 | return locale_descriptions | 35 | return locale_descriptions |
33 | 36 | ||
34 | def GetLocaleOS(): | 37 | def GetLocaleOS(): |
@@ -39,7 +42,6 @@ def GetLocaleOS(): | @@ -39,7 +42,6 @@ def GetLocaleOS(): | ||
39 | def InstallLanguage(language): | 42 | def InstallLanguage(language): |
40 | 43 | ||
41 | lang = gettext.translation('invesalius', const.LANGUAGE_DIR,\ | 44 | lang = gettext.translation('invesalius', const.LANGUAGE_DIR,\ |
42 | - languages=[language]) | 45 | + languages=[language], codeset='utf8') |
43 | lang.install() | 46 | lang.install() |
44 | return lang.gettext | 47 | return lang.gettext |
45 | - | ||
46 | \ No newline at end of file | 48 | \ No newline at end of file |