Mercurial > p > roundup > code
diff roundup/cgi/templating.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 | b7093aa16895 |
| children | 994893cf3e1a |
line wrap: on
line diff
--- a/roundup/cgi/templating.py Mon May 02 17:04:27 2022 -0400 +++ b/roundup/cgi/templating.py Tue May 03 14:51:59 2022 +0200 @@ -197,13 +197,7 @@ markdown = _import_markdown2() or _import_markdown() or _import_mistune() # bring in the templating support -from roundup.cgi import TranslationService, ZTUtils - -### i18n services -# this global translation service is not thread-safe. -# it is left here for backward compatibility -# until all Web UI translations are done via client.translator object -translationService = TranslationService.get_translation() +from roundup.cgi import ZTUtils def anti_csrf_nonce(client, lifetime=None): ''' Create a nonce for defending against CSRF attack.
