diff options
| author | bwarsaw | 2001-11-21 17:16:37 +0000 |
|---|---|---|
| committer | bwarsaw | 2001-11-21 17:16:37 +0000 |
| commit | f6191272ae3548060c345f4306411d66289dce32 (patch) | |
| tree | 1532a7ea04f958b7f4a47ba68ce776a29bf71428 | |
| parent | 3c9c18d106c82557e95a9d5627f210888a5eaac4 (diff) | |
| download | mailman-f6191272ae3548060c345f4306411d66289dce32.tar.gz mailman-f6191272ae3548060c345f4306411d66289dce32.tar.zst mailman-f6191272ae3548060c345f4306411d66289dce32.zip | |
I don't think we need to import Mailman.i18n anymore. Any
translatable strings here just need to be marked as such, using the
identity _() function. They'll always get translated before they're
used.
| -rw-r--r-- | Mailman/Errors.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Mailman/Errors.py b/Mailman/Errors.py index b98fd15d7..ba2e5184c 100644 --- a/Mailman/Errors.py +++ b/Mailman/Errors.py @@ -17,9 +17,6 @@ """Shared mailman errors and messages.""" -import Mailman.i18n - - # exceptions for problems related to opening a list class MMListError(Exception): pass @@ -103,6 +100,9 @@ class LostHeldMessage(MailmanError): +def _(s): + return s + # Exceptions for the Handler subsystem class HandlerError(MailmanError): """Base class for all handler errors.""" @@ -111,13 +111,13 @@ class HoldMessage(HandlerError): """Base class for all message-being-held short circuits.""" # funky spelling is necessary to break import loops - reason = Mailman.i18n._('For some unknown reason') + reason = _('For some unknown reason') def reason_notice(self): return self.reason # funky spelling is necessary to break import loops - rejection = Mailman.i18n._('Your message was rejected') + rejection = _('Your message was rejected') def rejection_notice(self, mlist): return self.rejection @@ -140,7 +140,7 @@ class RejectMessage(HandlerError): """The message will be bounced back to the sender""" def __init__(self, notice=None): if notice is None: - notice = Mailman.i18n._('Your message was rejected') + notice = _('Your message was rejected') self.__notice = notice def notice(self): |
