From 57d439e2d4b1b22289cd9a16bac3324ce13a8e13 Mon Sep 17 00:00:00 2001 From: Ramiro Morales Date: Thu, 24 Jan 2013 07:51:14 -0300 Subject: [PATCH] More i18n makemessages tests tweaks. --- .../regressiontests/i18n/commands/extraction.py | 16 ++++++++-------- .../i18n/commands/templates/test.html | 2 +- 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 %}