summaryrefslogtreecommitdiff
path: root/tests/view_tests/templates
diff options
context:
space:
mode:
authorClaude Paroz <claude@2xlibre.net>2016-03-07 21:52:08 +0100
committerClaude Paroz <claude@2xlibre.net>2016-04-15 17:28:54 +0200
commitde40cfbe74642df1e94c131e1adaa3363173c0cf (patch)
tree447388e6b08d67f2c8c1f168d1ffc6df851beb03 /tests/view_tests/templates
parent79a091820f46f00cba217a9e05daec855272c3ad (diff)
downloaddjango-de40cfbe74642df1e94c131e1adaa3363173c0cf.tar.gz
Fixed #19567 -- Added JavaScriptCatalog and JSONCatalog class-based views
Thanks Cristiano Coelho and Tim Graham for the reviews.
Diffstat (limited to 'tests/view_tests/templates')
-rw-r--r--tests/view_tests/templates/old_jsi18n-multi-catalogs.html17
-rw-r--r--tests/view_tests/templates/old_jsi18n.html44
2 files changed, 61 insertions, 0 deletions
diff --git a/tests/view_tests/templates/old_jsi18n-multi-catalogs.html b/tests/view_tests/templates/old_jsi18n-multi-catalogs.html
new file mode 100644
index 0000000000..eccd2d6043
--- /dev/null
+++ b/tests/view_tests/templates/old_jsi18n-multi-catalogs.html
@@ -0,0 +1,17 @@
+<html>
+<head>
+ <script type="text/javascript" src="/old_jsi18n/app1/"></script>
+ <script type="text/javascript" src="/old_jsi18n/app2/"></script>
+<body>
+ <p id="app1string">
+ <script type="text/javascript">
+ document.write(gettext('this app1 string is to be translated'))
+ </script>
+ </p>
+ <p id="app2string">
+ <script type="text/javascript">
+ document.write(gettext('this app2 string is to be translated'))
+ </script>
+ </p>
+</body>
+</html>
diff --git a/tests/view_tests/templates/old_jsi18n.html b/tests/view_tests/templates/old_jsi18n.html
new file mode 100644
index 0000000000..03e738d867
--- /dev/null
+++ b/tests/view_tests/templates/old_jsi18n.html
@@ -0,0 +1,44 @@
+<html>
+<head>
+ <script type="text/javascript" src="/old_jsi18n_admin/"></script>
+</head>
+
+<body>
+ <p id="gettext">
+ <script type="text/javascript">
+ document.write(gettext("Remove"));
+ </script>
+ </p>
+
+ <p id="ngettext_sing">
+ <script type="text/javascript">
+ document.write(interpolate(ngettext("%s item", "%s items", 1), [1]));
+ </script>
+ </p>
+
+ <p id="ngettext_plur">
+ <script type="text/javascript">
+ document.write(interpolate(ngettext("%s item", "%s items", 455), [455]));
+ </script>
+ </p>
+
+ <p id="pgettext">
+ <script type="text/javascript">
+ document.write(pgettext("verb", "May"));
+ </script>
+ </p>
+
+ <p id="npgettext_sing">
+ <script type="text/javascript">
+ document.write(interpolate(npgettext("search", "%s result", "%s results", 1), [1]));
+ </script>
+ </p>
+
+ <p id="npgettext_plur">
+ <script type="text/javascript">
+ document.write(interpolate(npgettext("search", "%s result", "%s results", 455), [455]));
+ </script>
+ </p>
+
+</body>
+</html>