------------------------------------------------------------
revno: 6766
committer: Barry Warsaw <[email protected]>
branch nick: 3.0
timestamp: Wed 2009-08-12 00:32:47 -0400
message:
  Refactor.
modified:
  src/mailman/i18n.py


--
lp:mailman
https://code.launchpad.net/~mailman-coders/mailman/3.0

Your team Mailman Checkins is subscribed to branch lp:mailman.
To unsubscribe from this branch go to 
https://code.launchpad.net/~mailman-coders/mailman/3.0/+edit-subscription.
=== modified file 'src/mailman/i18n.py'
--- src/mailman/i18n.py	2009-08-09 14:49:35 +0000
+++ src/mailman/i18n.py	2009-08-12 04:32:47 +0000
@@ -41,11 +41,10 @@
 import mailman.messages
 from mailman.utilities.string import expand
 
+
 _translation = None
 _missing = object()
 
-MESSAGES_DIR = os.path.dirname(mailman.messages.__file__)
-
 
 
 class Template(string.Template):
@@ -72,12 +71,13 @@
     :param language_code: The two letter language code to set.
     :type language_code: str
     """
+    messages_dir = os.path.dirname(mailman.messages.__file__)
     # pylint: disable-msg=W0603
     global _translation
     # gettext.translation() API requires None or a sequence.
     codes = (None if language_code is None else [language_code])
     try:
-        _translation = gettext.translation('mailman', MESSAGES_DIR, codes)
+        _translation = gettext.translation('mailman', messages_dir, codes)
     except IOError:
         # The selected language was not installed in messages, so fall back to
         # untranslated English.

_______________________________________________
Mailman-checkins mailing list
[email protected]
Unsubscribe: 
http://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org

Reply via email to