Mercurial > p > roundup > code
diff roundup/mailgw.py @ 6658:408fd477761f
Add i18n object to roundupdb.Database
This makes the i18n object accessible everywhere (including in detectors
where localized error messages were impossible). See issue2551184
| author | Ralf Schlatterbeck <rsc@runtux.com> |
|---|---|
| date | Tue, 03 May 2022 14:51:59 +0200 |
| parents | 3e8f2104753b |
| children | 01216187a167 |
line wrap: on
line diff
--- a/roundup/mailgw.py Mon May 02 17:04:27 2022 -0400 +++ b/roundup/mailgw.py Tue May 03 14:51:59 2022 +0200 @@ -1603,6 +1603,12 @@ # get database handle for handling one email self.db = self.instance.open('admin') + language = self.instance.config["MAILGW_LANGUAGE"] or self.instance.config["TRACKER_LANGUAGE"] + self.db.i18n = i18n.get_language (language) + + global _ + _ = self.db.i18n.gettext + self.db.tx_Source = "email" try:
