summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuido A.J. Stevens <guido.stevens@cosent.nl>2018-03-02 15:21:30 +0000
committerGuido A.J. Stevens <guido.stevens@cosent.nl>2018-03-02 15:21:30 +0000
commit70a610e848e92cd76138ef342c7bd061882bdad1 (patch)
tree071700392ca65a8196fde9dec6b9231bd231b77b
parent0b583d1e851c549a9d8a91e8fad2fbace8d72887 (diff)
downloadzope-tal-py3_unicode.tar.gz
Fix unicode issue, reported in https://github.com/collective/i18ndude/pull/48py3_unicode
-rw-r--r--src/zope/tal/talgettext.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/zope/tal/talgettext.py b/src/zope/tal/talgettext.py
index 4d8de80..a4e3917 100644
--- a/src/zope/tal/talgettext.py
+++ b/src/zope/tal/talgettext.py
@@ -44,6 +44,10 @@ from zope.tal.interfaces import ITALExpressionEngine
from zope.tal.taldefs import TALExpressionError
from zope.i18nmessageid import Message
+PY3 = sys.version_info > (3,)
+if PY3:
+ unicode = str
+
pot_header = '''\
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR ORGANIZATION
@@ -64,6 +68,7 @@ msgstr ""
NLSTR = '"\n"'
+
def usage(code, msg=''):
# Python 2.1 required
print(__doc__, file=sys.stderr)