[Spambayes-checkins] spambayes/spambayes i18n.py,1.6,1.7

Mark Hammond mhammond at users.sourceforge.net
Fri Mar 9 00:21:34 CET 2007


Update of /cvsroot/spambayes/spambayes/spambayes
In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv3342

Modified Files:
	i18n.py 
Log Message:
Patch [ 1676576 ] gettext localization broken at all
from Marko von Oppen


Index: i18n.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/spambayes/i18n.py,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** i18n.py	13 Apr 2005 05:56:44 -0000	1.6
--- i18n.py	8 Mar 2007 23:21:30 -0000	1.7
***************
*** 88,92 ****
          this_filename = __file__
      LC_DIR = os.path.dirname(os.path.dirname(this_filename))
!     DIALOGS_DIR = os.path.join(os.path.dirname(__file__), "languages")
  else:
      try:
--- 88,93 ----
          this_filename = __file__
      LC_DIR = os.path.dirname(os.path.dirname(this_filename))
!     LANG_DIR = os.path.join(os.path.dirname(__file__), "languages")
! 
  else:
      try:
***************
*** 94,100 ****
      except NameError: # no __file__ - means Py2.2 and __name__=='__main__'
          this_filename = os.path.abspath(sys.argv[0])
!     LC_DIR = os.path.dirname(this_filename)
!     DIALOGS_DIR = os.path.join(LC_DIR, "languages")
!     
  
  class LanguageManager:
--- 95,101 ----
      except NameError: # no __file__ - means Py2.2 and __name__=='__main__'
          this_filename = os.path.abspath(sys.argv[0])
!     LANG_DIR = os.path.join(os.path.dirname(this_filename), "languages")
!     LC_DIR = LANG_DIR
! 
  
  class LanguageManager:
***************
*** 168,173 ****
          self._clear_syspath()
          for lcode in self.current_langs_codes:
!             code_and_country = os.path.join(DIALOGS_DIR, lcode, 'DIALOGS')
!             code_only = os.path.join(DIALOGS_DIR, lcode.split("_")[0], 'DIALOGS')
              if code_and_country not in sys.path:
                  sys.path.append(code_and_country)
--- 169,174 ----
          self._clear_syspath()
          for lcode in self.current_langs_codes:
!             code_and_country = os.path.join(LANG_DIR, lcode, 'DIALOGS')
!             code_only = os.path.join(LANG_DIR, lcode.split("_")[0], 'DIALOGS')
              if code_and_country not in sys.path:
                  sys.path.append(code_and_country)



More information about the Spambayes-checkins mailing list