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

Tony Meyer anadelonbrin at users.sourceforge.net
Wed Apr 13 07:56:47 CEST 2005


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

Modified Files:
	i18n.py 
Log Message:
Fix loading translated dialogs from source.

Fix [ 1181160 ] Language fallback doesn't work

Index: i18n.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/spambayes/i18n.py,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** i18n.py	7 Apr 2005 05:58:31 -0000	1.5
--- i18n.py	13 Apr 2005 05:56:44 -0000	1.6
***************
*** 95,99 ****
          this_filename = os.path.abspath(sys.argv[0])
      LC_DIR = os.path.dirname(this_filename)
!     DIALOGS_DIR = LC_DIR
      
  
--- 95,99 ----
          this_filename = os.path.abspath(sys.argv[0])
      LC_DIR = os.path.dirname(this_filename)
!     DIALOGS_DIR = os.path.join(LC_DIR, "languages")
      
  
***************
*** 169,173 ****
          for lcode in self.current_langs_codes:
              code_and_country = os.path.join(DIALOGS_DIR, lcode, 'DIALOGS')
!             code_only = os.path.join(LC_DIR, lcode.split("_")[0], 'DIALOGS')
              if code_and_country not in sys.path:
                  sys.path.append(code_and_country)
--- 169,173 ----
          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)



More information about the Spambayes-checkins mailing list