Mercurial > p > roundup > code
changeset 7558:c8a931aa7514
fix(i18n): issue2551184 - improve i18n handling
Apply patch to make sure that the dates tests use the locale files in
the deployed tracker and not other roundup files.
| author | Marcus Preisch |
|---|---|
| date | Thu, 20 Jul 2023 20:08:28 -0400 |
| parents | 7b481ec7f169 |
| children | b5dff5dd4763 |
| files | CHANGES.txt test/test_dates.py |
| diffstat | 2 files changed, 11 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/CHANGES.txt Wed Jul 19 21:12:56 2023 -0400 +++ b/CHANGES.txt Thu Jul 20 20:08:28 2023 -0400 @@ -19,6 +19,9 @@ - issue2551063 - Rest/Xmlrpc interfaces needs failed login protection. Failed API login rate limiting with expiring lockout added. (John Rouillard) +- issue2551184 - improve i18n handling. Patch to test to make sure it + uses the test tracker's locale files and not other locale + files. (Marcus Priesch) Features:
--- a/test/test_dates.py Wed Jul 19 21:12:56 2023 -0400 +++ b/test/test_dates.py Thu Jul 20 20:08:28 2023 -0400 @@ -47,10 +47,14 @@ self.old_gettext_ = i18n.gettext self.old_ngettext_ = i18n.ngettext - i18n.gettext = i18n.get_translation(language='C').gettext - i18n.degettext = i18n.get_translation(language='de').gettext - i18n.ngettext = i18n.get_translation(language='C').ngettext - i18n.dengettext = i18n.get_translation(language='de').ngettext + i18n.gettext = i18n.get_translation( + language='C', tracker_home=".").gettext + i18n.degettext = i18n.get_translation( + language='de', tracker_home=".").gettext + i18n.ngettext = i18n.get_translation( + language='C', tracker_home=".").ngettext + i18n.dengettext = i18n.get_translation( + language='de', tracker_home=".").ngettext def tearDown(self): i18n.gettext = self.old_gettext_
