Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

More i18n makemessages tests tweaks.

  • Loading branch information...
commit 57d439e2d4b1b22289cd9a16bac3324ce13a8e13 1 parent 57c6617
Ramiro Morales ramiro authored
16 tests/regressiontests/i18n/commands/extraction.py
View
@@ -116,7 +116,7 @@ def test_extraction_error(self):
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 @@ def test_template_message_context_extractor(self):
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)
2  tests/regressiontests/i18n/commands/templates/test.html
View
@@ -81,4 +81,4 @@
{% 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 %}
+{% blocktrans context "Special blocktrans context wrapped in double quotes" %}Translatable literal with context wrapped in double quotes{% endblocktrans %}
Please sign in to comment.
Something went wrong with that request. Please try again.