summaryrefslogtreecommitdiff
path: root/django/utils/translation/template.py
diff options
context:
space:
mode:
authorClaude Paroz <claude@2xlibre.net>2017-02-06 09:15:25 +0100
committerClaude Paroz <claude@2xlibre.net>2017-02-06 17:35:03 +0100
commit2757209c9de3764364a8e8af39cefa2445312546 (patch)
tree02d8958db4b15bb9d71232703950949c1f35333b /django/utils/translation/template.py
parent15c14f6f16af22b970e5693b349113d80f10f82d (diff)
Refs #27795 -- Removed force_text from templatize function
Diffstat (limited to 'django/utils/translation/template.py')
-rw-r--r--django/utils/translation/template.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/django/utils/translation/template.py b/django/utils/translation/template.py
index c471dd489f..3659fab3b6 100644
--- a/django/utils/translation/template.py
+++ b/django/utils/translation/template.py
@@ -6,7 +6,6 @@ from django.template.base import (
TOKEN_BLOCK, TOKEN_COMMENT, TOKEN_TEXT, TOKEN_VAR, TRANSLATOR_COMMENT_MARK,
Lexer,
)
-from django.utils.encoding import force_text
from . import TranslatorCommentWarning, trim_whitespace
@@ -36,13 +35,12 @@ plural_re = re.compile(r"""^\s*plural$""")
constant_re = re.compile(r"""_\(((?:".*?")|(?:'.*?'))\)""")
-def templatize(src, origin=None, charset='utf-8'):
+def templatize(src, origin=None):
"""
Turn a Django template into something that is understood by xgettext. It
does so by translating the Django translation tags into standard gettext
function invocations.
"""
- src = force_text(src, charset)
out = StringIO('')
message_context = None
intrans = False