summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWolfgang Rohdewald <wolfgang@rohdewald.de>2016-08-11 10:47:27 (GMT)
committerWolfgang Rohdewald <wolfgang@rohdewald.de>2016-08-24 11:47:05 (GMT)
commitfe8d3a391e563bd42fd491f9b8091d41316baf5d (patch)
treeb3918a39e314ef57836ce81f85a4e006b872b71d
parent4d9d4213e486992bd218e75bcc942926a45e8b75 (diff)
m18n and friends expect args as unicode, not as utf-8
-rw-r--r--src/log.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/log.py b/src/log.py
index 7aa3062..93ece68 100644
--- a/src/log.py
+++ b/src/log.py
@@ -30,7 +30,7 @@ SERVERMARK = '&&SERVER&&'
# util must not import twisted or we need to change kajongg.py
from common import Internal, Debug, unicode, isPython3, ENGLISHDICT # pylint: disable=redefined-builtin
-from common import unicodeString, nativeString, nativeStringArgs
+from common import unicodeString, unicodeStringArgs, nativeString
from qt import Qt, QEvent
from util import elapsedSince, traceback, gitHead
from kde import i18n, i18nc
@@ -245,12 +245,15 @@ def m18n(englishText, *args):
@return: The translated text with args inserted.
@rtype: C{unicode}.
+
+ Since when do args have to be unicode? utf-8
+ encoded fails.
"""
result = unicodeString(
i18n(
nativeString(
englishText),
- *nativeStringArgs(args)))
+ *unicodeStringArgs(args)))
if not args:
ENGLISHDICT[result] = unicodeString(englishText)
return result
@@ -275,9 +278,8 @@ def m18nc(context, englishText, *args):
result = unicodeString(
i18nc(
context,
- nativeString(
- englishText),
- *nativeStringArgs(args)))
+ nativeString(englishText),
+ *unicodeStringArgs(args)))
if not args:
ENGLISHDICT[result] = unicodeString(englishText)
return result