Skip to content

Commit abd416c

Browse files
author
Marcus Preisch
committed
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.
1 parent 8ad545e commit abd416c

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

CHANGES.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ Fixed:
1919
- issue2551063 - Rest/Xmlrpc interfaces needs failed login protection.
2020
Failed API login rate limiting with expiring lockout added. (John
2121
Rouillard)
22+
- issue2551184 - improve i18n handling. Patch to test to make sure it
23+
uses the test tracker's locale files and not other locale
24+
files. (Marcus Priesch)
2225

2326
Features:
2427

test/test_dates.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,14 @@ def setUp(self):
4747

4848
self.old_gettext_ = i18n.gettext
4949
self.old_ngettext_ = i18n.ngettext
50-
i18n.gettext = i18n.get_translation(language='C').gettext
51-
i18n.degettext = i18n.get_translation(language='de').gettext
52-
i18n.ngettext = i18n.get_translation(language='C').ngettext
53-
i18n.dengettext = i18n.get_translation(language='de').ngettext
50+
i18n.gettext = i18n.get_translation(
51+
language='C', tracker_home=".").gettext
52+
i18n.degettext = i18n.get_translation(
53+
language='de', tracker_home=".").gettext
54+
i18n.ngettext = i18n.get_translation(
55+
language='C', tracker_home=".").ngettext
56+
i18n.dengettext = i18n.get_translation(
57+
language='de', tracker_home=".").ngettext
5458

5559
def tearDown(self):
5660
i18n.gettext = self.old_gettext_

0 commit comments

Comments
 (0)