aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGilles Dartiguelongue <eva@gentoo.org>2018-05-18 11:17:46 +0200
committerGilles Dartiguelongue <eva@gentoo.org>2018-05-18 11:18:07 +0200
commita98c6ba7eabcdeafaf7bf27263073b77fd26a0d3 (patch)
treef9fed72efb925cdcdaaeff109c79b8791044ce9f
parentFix window computation not being int, closes #8 (diff)
downloadelogv-a98c6ba7eabcdeafaf7bf27263073b77fd26a0d3.tar.gz
elogv-a98c6ba7eabcdeafaf7bf27263073b77fd26a0d3.tar.bz2
elogv-a98c6ba7eabcdeafaf7bf27263073b77fd26a0d3.zip
Use unicode returning gettext functions, refs #8
There is a big fat warning in python documentation [1] hinting that l*gettext might be eventually deprecated. [1] https://docs.python.org/3.6/library/gettext.html?highlight=gettext%20lgettext#gettext.lgettext
-rwxr-xr-xelogv3
1 files changed, 2 insertions, 1 deletions
diff --git a/elogv b/elogv
index 86c67c2..e579e01 100755
--- a/elogv
+++ b/elogv
@@ -104,7 +104,8 @@ if reported_bad_locales:
# encoding, not encoded with the same codeset used in the translation
# file
gettext.textdomain('elogv')
-_ = gettext.lgettext
+gettext.bind_textdomain_codeset('elogv', locale.getpreferredencoding())
+_ = gettext.gettext
# This text is used on the in-line help
helptext = _("""