mirror of
https://github.com/django/django.git
synced 2025-04-04 21:46:40 +00:00
Fixed #35278 -- Fixed tests for fallback translations key when catalog has empty array on provided .
This commit is contained in:
parent
c39c7133a0
commit
a9830a403b
@ -43,10 +43,17 @@
|
||||
</script>
|
||||
</p>
|
||||
|
||||
<p id="ngettext_empty_array">
|
||||
<!-- The po file contains empty array on "%s element" id. -->
|
||||
<script>
|
||||
document.write(interpolate(ngettext("%s element", "%s element", "%s elements", 1), [1]));
|
||||
</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]));
|
||||
document.write(interpolate(ngettext("%s element", "%s element", "%s elements", 455), [455]));
|
||||
</script>
|
||||
</p>
|
||||
|
||||
|
@ -548,8 +548,10 @@ class I18nSeleniumTests(SeleniumTestCase):
|
||||
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_empty_array")
|
||||
self.assertEqual(elem.text, "1 element")
|
||||
elem = self.selenium.find_element(By.ID, "ngettext_plural_empty_array")
|
||||
self.assertEqual(elem.text, "455 element")
|
||||
self.assertEqual(elem.text, "455 elements")
|
||||
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