From b2a32f5bf6516b656911ba9e3e846cccbf33e66b Mon Sep 17 00:00:00 2001 From: Paulo Henrique Junqueira Amorim Date: Fri, 22 Feb 2019 08:21:53 -0300 Subject: [PATCH] Added Belarusian language --- invesalius/data/vtk_utils.py | 6 +++++- invesalius/i18n.py | 2 +- locale/be/LC_MESSAGES/invesalius.mo | Bin 0 -> 38715 bytes locale/ca/LC_MESSAGES/invesalius.mo | Bin 12324 -> 0 bytes locale/cs/LC_MESSAGES/invesalius.mo | Bin 33681 -> 0 bytes locale/de/LC_MESSAGES/invesalius.mo | Bin 28488 -> 0 bytes locale/el/LC_MESSAGES/invesalius.mo | Bin 8822 -> 0 bytes locale/en/LC_MESSAGES/invesalius.mo | Bin 11720 -> 0 bytes locale/es/LC_MESSAGES/invesalius.mo | Bin 34396 -> 0 bytes locale/fa/LC_MESSAGES/invesalius.mo | Bin 4004 -> 0 bytes locale/fr/LC_MESSAGES/invesalius.mo | Bin 16413 -> 0 bytes locale/it/LC_MESSAGES/invesalius.mo | Bin 32728 -> 0 bytes locale/ja/LC_MESSAGES/invesalius.mo | Bin 34577 -> 0 bytes locale/ko/LC_MESSAGES/invesalius.mo | Bin 13587 -> 0 bytes locale/ms/LC_MESSAGES/invesalius.mo | Bin 4371 -> 0 bytes locale/nl/LC_MESSAGES/invesalius.mo | Bin 557 -> 0 bytes locale/pt/LC_MESSAGES/invesalius.mo | Bin 24357 -> 0 bytes locale/pt_BR/LC_MESSAGES/invesalius.mo | Bin 34124 -> 0 bytes locale/ro/LC_MESSAGES/invesalius.mo | Bin 19380 -> 0 bytes locale/ru/LC_MESSAGES/invesalius.mo | Bin 42141 -> 0 bytes locale/sr/LC_MESSAGES/invesalius.mo | Bin 3367 -> 0 bytes locale/tr_TR/LC_MESSAGES/invesalius.mo | Bin 22935 -> 0 bytes locale/ur_PK/LC_MESSAGES/invesalius.mo | Bin 575 -> 0 bytes locale/zh_CN/LC_MESSAGES/invesalius.mo | Bin 568 -> 0 bytes locale/zh_TW/LC_MESSAGES/invesalius.mo | Bin 8759 -> 0 bytes po/be.po | 2 +- 26 files changed, 7 insertions(+), 3 deletions(-) create mode 100644 locale/be/LC_MESSAGES/invesalius.mo 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