diff options
| author | Ramiro Morales <cramm0@gmail.com> | 2011-12-11 00:48:26 +0000 |
|---|---|---|
| committer | Ramiro Morales <cramm0@gmail.com> | 2011-12-11 00:48:26 +0000 |
| commit | f2e99ecfdad245e9425bad038d5006912728e10d (patch) | |
| tree | 40727869609a8a9774e29152dedb0bb6a4d6fe01 /django | |
| parent | 12a20b6c22854d5775388236ae289225ba388b17 (diff) | |
Made makemessages leave `'%%'` sequences untouched when extracting translatable literals from blocktrans template tags.
This makes it consistent with behavior introduced when fixing #11240 in
processing of literal passed to the trans tag to avoid double escaping
(i.e. `'%%%%'` sequences in resulting PO files.)
Also, cleaned up tests changes from r17190 (removed commented out code and
implemented compatibility with Python 2.5.)
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17192 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django')
| -rw-r--r-- | django/utils/translation/trans_real.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/django/utils/translation/trans_real.py b/django/utils/translation/trans_real.py index 3addf1ddfb..28d20127c8 100644 --- a/django/utils/translation/trans_real.py +++ b/django/utils/translation/trans_real.py @@ -514,7 +514,7 @@ def templatize(src, origin=None): else: singular.append('%%(%s)s' % t.contents) elif t.token_type == TOKEN_TEXT: - contents = t.contents.replace('%', '%%') + contents = one_percent_re.sub('%%', t.contents) if inplural: plural.append(contents) else: |
