[Spambayes-checkins] spambayes/spambayes i18n.py,1.7,1.8
Mark Hammond
mhammond at users.sourceforge.net
Fri Jun 29 03:08:45 CEST 2007
Update of /cvsroot/spambayes/spambayes/spambayes
In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv21706/spambayes
Modified Files:
i18n.py
Log Message:
To help in testing localizations, let SPAMBAYES_LANG in the environment
override getdefaultlocale()[0]
Index: i18n.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/spambayes/i18n.py,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** i18n.py 8 Mar 2007 23:21:30 -0000 1.7
--- i18n.py 29 Jun 2007 01:08:43 -0000 1.8
***************
*** 115,120 ****
"""Get the default language for the locale."""
# Note that this may return None.
! return getdefaultlocale()[0]
!
def add_language(self, lang_code=None):
"""Add a language to the current languages list.
--- 115,123 ----
"""Get the default language for the locale."""
# Note that this may return None.
! try:
! return os.environ["SPAMBAYES_LANG"]
! except KeyError:
! return getdefaultlocale()[0]
!
def add_language(self, lang_code=None):
"""Add a language to the current languages list.
More information about the Spambayes-checkins
mailing list