Re: do we need i18n when serving static files ?
Marcus Priesch <[email protected]> Thu, 28 Apr 2022 14:29:15 +0200
| Newsgroups | gmane.comp.bug-tracking.roundup.devel |
|---|---|
| Organization | priesch.co.at - open source consulting |
| Message-ID | <[email protected]> |
> Fine with me!
good ;)
> Doesn't the static file code try to issue a (localized) error message in
> cases the file doesn't exist?
well, after some mor testing i came up with the solution to add the
Nulltranslator at the beginning of Client.__init__.
it potentially gets overwritte somewhere down the road ...
diff -r 6ac3667706be roundup/cgi/client.py
--- a/roundup/cgi/client.py Tue Apr 26 17:22:33 2022 -0400
+++ b/roundup/cgi/client.py Thu Apr 28 14:28:40 2022 +0200
@@ -387,7 +387,11 @@
self.instance = instance
self.request = request
self.env = env
- self.setTranslator(translator)
+ if translator is not None :
+ self.setTranslator(translator)
+ else :
+ self.setTranslator(TranslationService.NullTranslationService())
+
self.mailer = Mailer(instance.config)
# If True the form contents wins over the database contents when
# rendering html properties. This is set when an error occurs so
regards,
marcus.