summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRamiro Morales <cramm0@gmail.com>2011-04-18 21:10:42 +0000
committerRamiro Morales <cramm0@gmail.com>2011-04-18 21:10:42 +0000
commit1d499d50d08f8b36aed9e008dadfc26e4fe1b208 (patch)
treee7249b4d72d5097e5a817cfd4d507268b1610feb /tests
parent9b21a0c92132f5b5c9c8ca33fba88c1eab2f2933 (diff)
[1.3.X] Fixed #15848 -- Fixed regression introduced in [15882] in makemessages management command when processing multi-line comments that contain non-ASCCI characters in templates. Thanks for the report Denis Drescher.
Backport of r16038/r16039 from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.3.X@16040 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests')
-rw-r--r--tests/regressiontests/i18n/commands/extraction.py4
-rw-r--r--tests/regressiontests/i18n/commands/templates/test.html7
2 files changed, 11 insertions, 0 deletions
diff --git a/tests/regressiontests/i18n/commands/extraction.py b/tests/regressiontests/i18n/commands/extraction.py
index 0d70d2641d..e5290406ab 100644
--- a/tests/regressiontests/i18n/commands/extraction.py
+++ b/tests/regressiontests/i18n/commands/extraction.py
@@ -1,3 +1,4 @@
+# -*- encoding: utf-8 -*-
import os
import re
import shutil
@@ -63,6 +64,9 @@ class BasicExtractorTests(ExtractorTests):
self.assertTrue('#. Translators: One-line translator comment #4' in po_contents)
self.assertTrue('#. Translators: Two-line translator comment #4\n#. continued here.' in po_contents)
+ self.assertTrue('#. Translators: One-line translator comment #5 -- with non ASCII characters: áéíóúö' in po_contents)
+ self.assertTrue('#. Translators: Two-line translator comment #5 -- with non ASCII characters: áéíóúö\n#. continued here.' in po_contents)
+
def test_templatize(self):
os.chdir(self.test_dir)
management.call_command('makemessages', locale=LOCALE, verbosity=0)
diff --git a/tests/regressiontests/i18n/commands/templates/test.html b/tests/regressiontests/i18n/commands/templates/test.html
index 86c7772580..b5d705c132 100644
--- a/tests/regressiontests/i18n/commands/templates/test.html
+++ b/tests/regressiontests/i18n/commands/templates/test.html
@@ -50,3 +50,10 @@ continued here.
{% comment %} Translators: Two-line translator comment #4
continued here.{% endcomment %}
{% trans "Translatable literal #4b" %}
+
+{% comment %} Translators: One-line translator comment #5 -- with non ASCII characters: áéíóúö{% endcomment %}
+{% trans "Translatable literal #5a" %}
+
+{% comment %} Translators: Two-line translator comment #5 -- with non ASCII characters: áéíóúö
+continued here.{% endcomment %}
+{% trans "Translatable literal #6b" %}