mirror of
https://github.com/django/django.git
synced 2025-04-04 13:36:42 +00:00
Fixed #35278 -- Tested fixed versions of and functions.
This commit is contained in:
parent
76f4b0c0f3
commit
54fa8b5693
Binary file not shown.
@ -42,3 +42,11 @@ msgstr[1] "%s Resultate"
|
||||
|
||||
msgid "Image"
|
||||
msgstr "Bild"
|
||||
|
||||
msgid "empty"
|
||||
msgid_plural "empty"
|
||||
msgstr[0] ""
|
||||
|
||||
msgid "%s element"
|
||||
msgid_plural "%s element"
|
||||
msgstr[0] ""
|
||||
|
@ -18,6 +18,12 @@
|
||||
</script>
|
||||
</p>
|
||||
|
||||
<p id="gettext_empty_array">
|
||||
<script>
|
||||
document.write(gettext("empty"));
|
||||
</script>
|
||||
</p>
|
||||
|
||||
<p id="ngettext_sing">
|
||||
<script>
|
||||
document.write(interpolate(ngettext("%s item", "%s items", 1), [1]));
|
||||
@ -37,6 +43,13 @@
|
||||
</script>
|
||||
</p>
|
||||
|
||||
<p id="ngettext_plural_empty_array">
|
||||
<!-- The po file contains empty array on "%s element" id. -->
|
||||
<script>
|
||||
document.write(interpolate(npgettext("%s element", "%s element", "%s elements", 455), [455]));
|
||||
</script>
|
||||
</p>
|
||||
|
||||
<p id="pgettext">
|
||||
<script>
|
||||
document.write(pgettext("verb", "May"));
|
||||
|
@ -540,12 +540,16 @@ class I18nSeleniumTests(SeleniumTestCase):
|
||||
self.selenium.get(self.live_server_url + "/jsi18n_template/")
|
||||
elem = self.selenium.find_element(By.ID, "gettext")
|
||||
self.assertEqual(elem.text, "Entfernen")
|
||||
elem = self.selenium.find_element(By.ID, "gettext_empty_array")
|
||||
self.assertEqual(elem.text, "empty")
|
||||
elem = self.selenium.find_element(By.ID, "ngettext_sing")
|
||||
self.assertEqual(elem.text, "1 Element")
|
||||
elem = self.selenium.find_element(By.ID, "ngettext_plur")
|
||||
self.assertEqual(elem.text, "455 Elemente")
|
||||
elem = self.selenium.find_element(By.ID, "ngettext_onnonplural")
|
||||
self.assertEqual(elem.text, "Bild")
|
||||
elem = self.selenium.find_element(By.ID, "ngettext_plural_empty_array")
|
||||
self.assertEqual(elem.text, "455 element")
|
||||
elem = self.selenium.find_element(By.ID, "pgettext")
|
||||
self.assertEqual(elem.text, "Kann")
|
||||
elem = self.selenium.find_element(By.ID, "npgettext_sing")
|
||||
|
Loading…
x
Reference in New Issue
Block a user