Mercurial > p > roundup > code
diff roundup/cgi/form_parser.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 | ed19b123a7ac |
| children | 38dc223d90cc |
line wrap: on
line diff
--- a/roundup/cgi/form_parser.py Mon May 02 17:04:27 2022 -0400 +++ b/roundup/cgi/form_parser.py Tue May 03 14:51:59 2022 +0200 @@ -1,7 +1,7 @@ import re, mimetypes from roundup import hyperdb, date, password -from roundup.cgi import templating +from roundup.cgi import templating, TranslationService from roundup.cgi.exceptions import FormError @@ -38,7 +38,7 @@ self._ = self.gettext = client.gettext self.ngettext = client.ngettext except AttributeError: - _translator = templating.translationService + _translator = TranslationService.get_translation() self._ = self.gettext = _translator.gettext self.ngettext = _translator.ngettext
