Mercurial > p > roundup > code
diff roundup/roundupdb.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 | cf1b51a3a368 |
| children | de3118b4d224 |
line wrap: on
line diff
--- a/roundup/roundupdb.py Mon May 02 17:04:27 2022 -0400 +++ b/roundup/roundupdb.py Tue May 03 14:51:59 2022 +0200 @@ -36,6 +36,7 @@ from roundup.hyperdb import iter_roles from roundup.mailer import Mailer, MessageSendError, nice_sender_header +from roundup.i18n import RoundupNullTranslations from roundup.anypy.strings import b2s, s2u import roundup.anypy.random_ as random_ @@ -54,6 +55,9 @@ # (eg. the current user edits their username) journal_uid = None + def __init__(self): + self.i18n = RoundupNullTranslations() + def getuid(self): """Return the id of the "user" node associated with the user that owns this connection to the hyperdatabase."""
