aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Pipping <sebastian@pipping.org>2018-05-18 19:37:33 +0200
committerGitHub <noreply@github.com>2018-05-18 19:37:33 +0200
commitd8ddeba07683bf5a4884fa04d119cbb2fd39159a (patch)
treef9fed72efb925cdcdaaeff109c79b8791044ce9f
parentRelease 0.7.7 (diff)
parentUse unicode returning gettext functions, refs #8 (diff)
downloadelogv-d8ddeba07683bf5a4884fa04d119cbb2fd39159a.tar.gz
elogv-d8ddeba07683bf5a4884fa04d119cbb2fd39159a.tar.bz2
elogv-d8ddeba07683bf5a4884fa04d119cbb2fd39159a.zip
Merge pull request #9 from EvaSDK/fix-some-more-python3
Fix some more python3
-rwxr-xr-xelogv7
1 files changed, 4 insertions, 3 deletions
diff --git a/elogv b/elogv
index 9ead73b..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 = _("""
@@ -619,8 +620,8 @@ class ElogViewer:
def show_help(self):
# Setup help window
- helpwin_height = self.height / 3 * 2
- helpwin_corner = (self.height / 6, self.width// 2 - 40)
+ helpwin_height = self.height // 3 * 2
+ helpwin_corner = (self.height // 6, self.width // 2 - 40)
helpwin = curses.newwin(helpwin_height, 80,
helpwin_corner[0], helpwin_corner[1])
helplines = helptext.splitlines()