libreport/0001-Use-a-dgettext-function-returning-strings-instead-of.patch
Matej Habrnal 80acf9fdce Use a dgettext function returning strings instead of bytes
Signed-off-by: Matej Habrnal <mhabrnal@redhat.com>
2015-07-22 18:20:42 +02:00

30 lines
950 B
Diff

From f09c07c847bb5be6f749d102143e8b43a1a00b7c Mon Sep 17 00:00:00 2001
From: Matej Habrnal <mhabrnal@redhat.com>
Date: Wed, 22 Jul 2015 15:54:03 +0200
Subject: [PATCH] Use a dgettext function returning strings instead of bytes
ldgettext returns an array of bytes in system encoding and this, together with
Python3, causes troubles.
Signed-off-by: Matej Habrnal <mhabrnal@redhat.com>
---
src/client-python/reportclient/__init__.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/client-python/reportclient/__init__.py b/src/client-python/reportclient/__init__.py
index 7b59586..43afc53 100644
--- a/src/client-python/reportclient/__init__.py
+++ b/src/client-python/reportclient/__init__.py
@@ -36,7 +36,7 @@ GETTEXT_PROGNAME = "libreport"
import locale
import gettext
-_ = lambda x: gettext.ldgettext(GETTEXT_PROGNAME, x)
+_ = lambda x: gettext.dgettext(GETTEXT_PROGNAME, x)
def init_gettext():
try:
--
2.4.6