summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRamiro Morales <cramm0@gmail.com>2013-01-24 07:51:14 -0300
committerRamiro Morales <cramm0@gmail.com>2013-01-24 07:51:14 -0300
commit57d439e2d4b1b22289cd9a16bac3324ce13a8e13 (patch)
tree7b88639ca2886ebb9c119e1242074a83dd9d8edb /tests
parent57c6617c92959856e8cacd809f0e29f57df4f318 (diff)
More i18n makemessages tests tweaks.
Diffstat (limited to 'tests')
-rw-r--r--tests/regressiontests/i18n/commands/extraction.py16
-rw-r--r--tests/regressiontests/i18n/commands/templates/test.html2
2 files changed, 9 insertions, 9 deletions
diff --git a/tests/regressiontests/i18n/commands/extraction.py b/tests/regressiontests/i18n/commands/extraction.py
index eeb2a9524b..ef711ec1bb 100644
--- a/tests/regressiontests/i18n/commands/extraction.py
+++ b/tests/regressiontests/i18n/commands/extraction.py
@@ -116,7 +116,7 @@ class BasicExtractorTests(ExtractorTests):
r'Translation blocks must not include other block tags: blocktrans \(file templates[/\\]template_with_error\.tpl, line 3\)'
)
# Check that the temporary file was cleaned up
- self.assertFalse(os.path.exists('./templates/template_with_error.html.py'))
+ self.assertFalse(os.path.exists('./templates/template_with_error.tpl.py'))
def test_extraction_warning(self):
os.chdir(self.test_dir)
@@ -139,23 +139,23 @@ class BasicExtractorTests(ExtractorTests):
po_contents = force_text(fp.read())
# {% trans %}
self.assertTrue('msgctxt "Special trans context #1"' in po_contents)
- self.assertTrue("Translatable literal #7a" in po_contents)
+ self.assertMsgId("Translatable literal #7a", po_contents)
self.assertTrue('msgctxt "Special trans context #2"' in po_contents)
- self.assertTrue("Translatable literal #7b" in po_contents)
+ self.assertMsgId("Translatable literal #7b", po_contents)
self.assertTrue('msgctxt "Special trans context #3"' in po_contents)
- self.assertTrue("Translatable literal #7c" in po_contents)
+ self.assertMsgId("Translatable literal #7c", po_contents)
# {% blocktrans %}
self.assertTrue('msgctxt "Special blocktrans context #1"' in po_contents)
- self.assertTrue("Translatable literal #8a" in po_contents)
+ self.assertMsgId("Translatable literal #8a", po_contents)
self.assertTrue('msgctxt "Special blocktrans context #2"' in po_contents)
- self.assertTrue("Translatable literal #8b-singular" in po_contents)
+ self.assertMsgId("Translatable literal #8b-singular", po_contents)
self.assertTrue("Translatable literal #8b-plural" in po_contents)
self.assertTrue('msgctxt "Special blocktrans context #3"' in po_contents)
- self.assertTrue("Translatable literal #8c-singular" in po_contents)
+ self.assertMsgId("Translatable literal #8c-singular", po_contents)
self.assertTrue("Translatable literal #8c-plural" in po_contents)
self.assertTrue('msgctxt "Special blocktrans context #4"' in po_contents)
- self.assertTrue("Translatable literal #8d" in po_contents)
+ self.assertMsgId("Translatable literal #8d %(a)s", po_contents)
def test_context_in_single_quotes(self):
os.chdir(self.test_dir)
diff --git a/tests/regressiontests/i18n/commands/templates/test.html b/tests/regressiontests/i18n/commands/templates/test.html
index e7d7f3ca53..6cb4493ef6 100644
--- a/tests/regressiontests/i18n/commands/templates/test.html
+++ b/tests/regressiontests/i18n/commands/templates/test.html
@@ -81,4 +81,4 @@ continued here.{% endcomment %}
{% trans "Translatable literal with context wrapped in single quotes" context 'Context wrapped in single quotes' as var %}
{% trans "Translatable literal with context wrapped in double quotes" context "Context wrapped in double quotes" as var %}
{% blocktrans context 'Special blocktrans context wrapped in single quotes' %}Translatable literal with context wrapped in single quotes{% endblocktrans %}
-{% blocktrans context "Special blocktrans context wrapped in double quotes" %}Translatable literal with context wrapped in double quotes{% endblocktrans %} \ No newline at end of file
+{% blocktrans context "Special blocktrans context wrapped in double quotes" %}Translatable literal with context wrapped in double quotes{% endblocktrans %}