diff --git a/tests/regressiontests/i18n/commands/extraction.py b/tests/regressiontests/i18n/commands/extraction.py
index fb9ca4e..87e2332 100644
|
a
|
b
|
class BasicExtractorTests(ExtractorTests):
|
| 148 | 148 | self.assertTrue('msgctxt "Special blocktrans context #4"' in po_contents) |
| 149 | 149 | self.assertTrue("Translatable literal #8d" in po_contents) |
| 150 | 150 | |
| | 151 | def test_template_message_context_extractor_same_string(self): |
| | 152 | """ |
| | 153 | Refs #18114. |
| | 154 | """ |
| | 155 | os.chdir(self.test_dir) |
| | 156 | management.call_command('makemessages', locale=LOCALE, verbosity=0) |
| | 157 | self.assertTrue(os.path.exists(self.PO_FILE)) |
| | 158 | with open(self.PO_FILE, 'r') as fp: |
| | 159 | po_contents = fp.read() |
| | 160 | print po_contents |
| | 161 | # {% trans %} |
| | 162 | self.assertTrue("Translatable literal #9" in po_contents) |
| | 163 | self.assertTrue('msgctxt "Special trans context #9a"' in po_contents) |
| | 164 | self.assertTrue('msgctxt "Special trans context #9b"' in po_contents) |
| | 165 | |
| 151 | 166 | class JavascriptExtractorTests(ExtractorTests): |
| 152 | 167 | |
| 153 | 168 | PO_FILE='locale/%s/LC_MESSAGES/djangojs.po' % LOCALE |
diff --git a/tests/regressiontests/i18n/commands/templates/test.html b/tests/regressiontests/i18n/commands/templates/test.html
index 5789346..2828282 100644
|
a
|
b
|
continued here.{% endcomment %}
|
| 77 | 77 | {% trans "Shouldn't double escape this sequence %% either" context "ctx1" %} |
| 78 | 78 | {% trans "Looks like a str fmt spec %s but shouldn't be interpreted as such" %} |
| 79 | 79 | {% trans "Looks like a str fmt spec % o but shouldn't be interpreted as such" %} |
| | 80 | |
| | 81 | {% trans "Translatable literal #9" %} |
| | 82 | {% trans "Translatable literal #9" context "Special trans context #9a" %} |
| | 83 | {% trans "Translatable literal #9" as var context "Special trans context #9b" %} |