diff -r 9f3fe52b7a2e roundup/cgi/engine_zopetal.py --- a/roundup/cgi/engine_zopetal.py Thu Apr 21 17:35:55 2022 -0400 +++ b/roundup/cgi/engine_zopetal.py Tue Apr 26 15:09:48 2022 +0200 @@ -8,12 +8,13 @@ import os import os.path -from roundup.cgi.templating import StringIO, context, translationService, TALLoaderBase +from roundup.cgi.templating import StringIO, context, TALLoaderBase from roundup.cgi.PageTemplates import PageTemplate, GlobalTranslationService from roundup.cgi.PageTemplates.Expressions import getEngine from roundup.cgi.TAL import TALInterpreter +from roundup.cgi import TranslationService -GlobalTranslationService.setGlobalTranslationService(translationService) +GlobalTranslationService.setGlobalTranslationService(TranslationService.get_translation()) class Loader(TALLoaderBase): diff -r 9f3fe52b7a2e roundup/cgi/form_parser.py --- a/roundup/cgi/form_parser.py Thu Apr 21 17:35:55 2022 -0400 +++ b/roundup/cgi/form_parser.py Tue Apr 26 15:09:48 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 diff -r 9f3fe52b7a2e roundup/cgi/templating.py --- a/roundup/cgi/templating.py Thu Apr 21 17:35:55 2022 -0400 +++ b/roundup/cgi/templating.py Tue Apr 26 15:09:48 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.