(self)
| 1870 | class AppResolutionOrderI18NTests(ResolutionOrderI18NTests): |
| 1871 | @override_settings(LANGUAGE_CODE="de") |
| 1872 | def test_app_translation(self): |
| 1873 | # Original translation. |
| 1874 | self.assertGettext("Date/time", "Datum/Zeit") |
| 1875 | |
| 1876 | # Different translation. |
| 1877 | with self.modify_settings(INSTALLED_APPS={"append": "i18n.resolution"}): |
| 1878 | # Force refreshing translations. |
| 1879 | activate("de") |
| 1880 | |
| 1881 | # Doesn't work because it's added later in the list. |
| 1882 | self.assertGettext("Date/time", "Datum/Zeit") |
| 1883 | |
| 1884 | with self.modify_settings( |
| 1885 | INSTALLED_APPS={"remove": "django.contrib.admin.apps.SimpleAdminConfig"} |
| 1886 | ): |
| 1887 | # Force refreshing translations. |
| 1888 | activate("de") |
| 1889 | |
| 1890 | # Unless the original is removed from the list. |
| 1891 | self.assertGettext("Date/time", "Datum/Zeit (APP)") |
| 1892 | |
| 1893 | |
| 1894 | @override_settings(LOCALE_PATHS=extended_locale_paths) |
nothing calls this directly
no test coverage detected