summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClaude Paroz <claude@2xlibre.net>2016-03-06 01:11:45 +0100
committerClaude Paroz <claude@2xlibre.net>2016-03-08 21:39:59 +0100
commitecbdedfc6948d6c08c18ce935b02406139310e7f (patch)
tree7a2e89797dabb5cb800cad803796f405cf2ea3b1
parent11c60b529816c5d29c3b4145055bf59b2e389de5 (diff)
Refs #26319 -- Added test for English variant in javascript_catalog
-rw-r--r--tests/view_tests/locale/en_GB/LC_MESSAGES/djangojs.mobin0 -> 454 bytes
-rw-r--r--tests/view_tests/locale/en_GB/LC_MESSAGES/djangojs.po20
-rw-r--r--tests/view_tests/tests/test_i18n.py8
3 files changed, 28 insertions, 0 deletions
diff --git a/tests/view_tests/locale/en_GB/LC_MESSAGES/djangojs.mo b/tests/view_tests/locale/en_GB/LC_MESSAGES/djangojs.mo
new file mode 100644
index 0000000000..37761f0f9a
--- /dev/null
+++ b/tests/view_tests/locale/en_GB/LC_MESSAGES/djangojs.mo
Binary files differ
diff --git a/tests/view_tests/locale/en_GB/LC_MESSAGES/djangojs.po b/tests/view_tests/locale/en_GB/LC_MESSAGES/djangojs.po
new file mode 100644
index 0000000000..36c821109a
--- /dev/null
+++ b/tests/view_tests/locale/en_GB/LC_MESSAGES/djangojs.po
@@ -0,0 +1,20 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2007-09-15 19:15+0200\n"
+"PO-Revision-Date: 2010-05-12 12:41-0300\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+msgid "this color is to be translated"
+msgstr "this colour is to be translated"
diff --git a/tests/view_tests/tests/test_i18n.py b/tests/view_tests/tests/test_i18n.py
index 0e87856228..ae39f34421 100644
--- a/tests/view_tests/tests/test_i18n.py
+++ b/tests/view_tests/tests/test_i18n.py
@@ -166,6 +166,14 @@ class JsI18NTests(SimpleTestCase):
self.assertContains(response, 'il faut le traduire')
self.assertNotContains(response, "Untranslated string")
+ def test_i18n_english_variant(self):
+ with override('en-gb'):
+ response = self.client.get('/jsi18n/')
+ self.assertIn(
+ '"this color is to be translated": "this colour is to be translated"',
+ response.context['catalog_str']
+ )
+
def test_i18n_language_non_english_default(self):
"""
Check if the Javascript i18n view returns an empty language catalog