With a non-English LANGUAGE_CODE and if the active language is English or one of its variants, the untranslated string should be returned (instead of falling back to LANGUAGE_CODE) (See #24413).
(self)
| 1545 | |
| 1546 | @override_settings(LANGUAGE_CODE="de") |
| 1547 | def test_english_fallback(self): |
| 1548 | """ |
| 1549 | With a non-English LANGUAGE_CODE and if the active language is English |
| 1550 | or one of its variants, the untranslated string should be returned |
| 1551 | (instead of falling back to LANGUAGE_CODE) (See #24413). |
| 1552 | """ |
| 1553 | self.assertEqual(gettext("Image"), "Bild") |
| 1554 | with translation.override("en"): |
| 1555 | self.assertEqual(gettext("Image"), "Image") |
| 1556 | with translation.override("en-us"): |
| 1557 | self.assertEqual(gettext("Image"), "Image") |
| 1558 | with translation.override("en-ca"): |
| 1559 | self.assertEqual(gettext("Image"), "Image") |
| 1560 | |
| 1561 | def test_parse_spec_http_header(self): |
| 1562 | """ |