diff --git a/invesalius/data/vtk_utils.py b/invesalius/data/vtk_utils.py index 8044f01..6df54aa 100644 --- a/invesalius/data/vtk_utils.py +++ b/invesalius/data/vtk_utils.py @@ -237,7 +237,11 @@ class TextZero(object): # With some encoding in some dicom fields (like name) raises a # UnicodeEncodeError because they have non-ascii characters. To avoid # that we encode in utf-8. - self.actor.SetInput(value.encode("cp1252")) + try: + self.actor.SetInput(value.encode("cp1252")) + except(UnicodeEncodeError): + self.actor.SetInput(value.encode("utf-8")) + self.text = value def SetPosition(self, position): diff --git a/invesalius/i18n.py b/invesalius/i18n.py index 7259026..4691464 100644 --- a/invesalius/i18n.py +++ b/invesalius/i18n.py @@ -49,7 +49,7 @@ def GetLocales(): 'ro': u'Română', 'ru': u'Русский', 'ja': u'日本語', - }) + 'be': u'беларуская мова',}) return d def GetLocaleOS(): diff --git a/locale/be/LC_MESSAGES/invesalius.mo b/locale/be/LC_MESSAGES/invesalius.mo new file mode 100644 index 0000000..d4446a1 Binary files /dev/null and b/locale/be/LC_MESSAGES/invesalius.mo differ diff --git a/locale/ca/LC_MESSAGES/invesalius.mo b/locale/ca/LC_MESSAGES/invesalius.mo index 3c87464..a9ac328 100644 Binary files a/locale/ca/LC_MESSAGES/invesalius.mo and b/locale/ca/LC_MESSAGES/invesalius.mo differ diff --git a/locale/cs/LC_MESSAGES/invesalius.mo b/locale/cs/LC_MESSAGES/invesalius.mo index 15b74ea..6f24882 100644 Binary files a/locale/cs/LC_MESSAGES/invesalius.mo and b/locale/cs/LC_MESSAGES/invesalius.mo differ diff --git a/locale/de/LC_MESSAGES/invesalius.mo b/locale/de/LC_MESSAGES/invesalius.mo index ddad0c4..26f6823 100644 Binary files a/locale/de/LC_MESSAGES/invesalius.mo and b/locale/de/LC_MESSAGES/invesalius.mo differ diff --git a/locale/el/LC_MESSAGES/invesalius.mo b/locale/el/LC_MESSAGES/invesalius.mo index d284c72..50fe35c 100644 Binary files a/locale/el/LC_MESSAGES/invesalius.mo and b/locale/el/LC_MESSAGES/invesalius.mo differ diff --git a/locale/en/LC_MESSAGES/invesalius.mo b/locale/en/LC_MESSAGES/invesalius.mo index c51eb3f..4fb738d 100644 Binary files a/locale/en/LC_MESSAGES/invesalius.mo and b/locale/en/LC_MESSAGES/invesalius.mo differ diff --git a/locale/es/LC_MESSAGES/invesalius.mo b/locale/es/LC_MESSAGES/invesalius.mo index 4f031b6..6d5c941 100644 Binary files a/locale/es/LC_MESSAGES/invesalius.mo and b/locale/es/LC_MESSAGES/invesalius.mo differ diff --git a/locale/fa/LC_MESSAGES/invesalius.mo b/locale/fa/LC_MESSAGES/invesalius.mo index 7456d04..3c74293 100644 Binary files a/locale/fa/LC_MESSAGES/invesalius.mo and b/locale/fa/LC_MESSAGES/invesalius.mo differ diff --git a/locale/fr/LC_MESSAGES/invesalius.mo b/locale/fr/LC_MESSAGES/invesalius.mo index 1376f6f..3025695 100644 Binary files a/locale/fr/LC_MESSAGES/invesalius.mo and b/locale/fr/LC_MESSAGES/invesalius.mo differ diff --git a/locale/it/LC_MESSAGES/invesalius.mo b/locale/it/LC_MESSAGES/invesalius.mo index db03f94..ac09cf8 100644 Binary files a/locale/it/LC_MESSAGES/invesalius.mo and b/locale/it/LC_MESSAGES/invesalius.mo differ diff --git a/locale/ja/LC_MESSAGES/invesalius.mo b/locale/ja/LC_MESSAGES/invesalius.mo index 51c4b03..fee67da 100644 Binary files a/locale/ja/LC_MESSAGES/invesalius.mo and b/locale/ja/LC_MESSAGES/invesalius.mo differ diff --git a/locale/ko/LC_MESSAGES/invesalius.mo b/locale/ko/LC_MESSAGES/invesalius.mo index 549e43f..974e7c3 100644 Binary files a/locale/ko/LC_MESSAGES/invesalius.mo and b/locale/ko/LC_MESSAGES/invesalius.mo differ diff --git a/locale/ms/LC_MESSAGES/invesalius.mo b/locale/ms/LC_MESSAGES/invesalius.mo index b2cb17c..da80394 100644 Binary files a/locale/ms/LC_MESSAGES/invesalius.mo and b/locale/ms/LC_MESSAGES/invesalius.mo differ diff --git a/locale/nl/LC_MESSAGES/invesalius.mo b/locale/nl/LC_MESSAGES/invesalius.mo index 5157af5..c468ed7 100644 Binary files a/locale/nl/LC_MESSAGES/invesalius.mo and b/locale/nl/LC_MESSAGES/invesalius.mo differ diff --git a/locale/pt/LC_MESSAGES/invesalius.mo b/locale/pt/LC_MESSAGES/invesalius.mo index 080be79..d22b1a7 100644 Binary files a/locale/pt/LC_MESSAGES/invesalius.mo and b/locale/pt/LC_MESSAGES/invesalius.mo differ diff --git a/locale/pt_BR/LC_MESSAGES/invesalius.mo b/locale/pt_BR/LC_MESSAGES/invesalius.mo index e25ca58..0b07247 100644 Binary files a/locale/pt_BR/LC_MESSAGES/invesalius.mo and b/locale/pt_BR/LC_MESSAGES/invesalius.mo differ diff --git a/locale/ro/LC_MESSAGES/invesalius.mo b/locale/ro/LC_MESSAGES/invesalius.mo index 6738c6f..633fc5b 100644 Binary files a/locale/ro/LC_MESSAGES/invesalius.mo and b/locale/ro/LC_MESSAGES/invesalius.mo differ diff --git a/locale/ru/LC_MESSAGES/invesalius.mo b/locale/ru/LC_MESSAGES/invesalius.mo index 6a1b2f1..f6c6d28 100644 Binary files a/locale/ru/LC_MESSAGES/invesalius.mo and b/locale/ru/LC_MESSAGES/invesalius.mo differ diff --git a/locale/sr/LC_MESSAGES/invesalius.mo b/locale/sr/LC_MESSAGES/invesalius.mo index 0546865..a4bed8e 100644 Binary files a/locale/sr/LC_MESSAGES/invesalius.mo and b/locale/sr/LC_MESSAGES/invesalius.mo differ diff --git a/locale/tr_TR/LC_MESSAGES/invesalius.mo b/locale/tr_TR/LC_MESSAGES/invesalius.mo index bd67366..1bdd20a 100644 Binary files a/locale/tr_TR/LC_MESSAGES/invesalius.mo and b/locale/tr_TR/LC_MESSAGES/invesalius.mo differ diff --git a/locale/ur_PK/LC_MESSAGES/invesalius.mo b/locale/ur_PK/LC_MESSAGES/invesalius.mo index 1bde23f..c3d0a59 100644 Binary files a/locale/ur_PK/LC_MESSAGES/invesalius.mo and b/locale/ur_PK/LC_MESSAGES/invesalius.mo differ diff --git a/locale/zh_CN/LC_MESSAGES/invesalius.mo b/locale/zh_CN/LC_MESSAGES/invesalius.mo index 02298ce..36a420d 100644 Binary files a/locale/zh_CN/LC_MESSAGES/invesalius.mo and b/locale/zh_CN/LC_MESSAGES/invesalius.mo differ diff --git a/locale/zh_TW/LC_MESSAGES/invesalius.mo b/locale/zh_TW/LC_MESSAGES/invesalius.mo index 03d1f16..f2474eb 100644 Binary files a/locale/zh_TW/LC_MESSAGES/invesalius.mo and b/locale/zh_TW/LC_MESSAGES/invesalius.mo differ diff --git a/po/be.po b/po/be.po index a3178ab..f5c4549 100644 --- a/po/be.po +++ b/po/be.po @@ -755,7 +755,7 @@ msgstr "У выбранай папцы няма файлаў DICOM." #: dialogs.py:613 msgid "Warning! InVesalius has limited support to Analyze format.\n" -msgstr "Увага! InVesalius мае абмежаваную падтрымку для фармату Analyze.\\n" +msgstr "Увага! InVesalius мае абмежаваную падтрымку для фармату Analyze.\n" #: dialogs.py:614 msgid "Slices may be wrongly oriented and functions may not work properly." -- libgit2 0.21.2