[Zope3-checkins] CVS: Zope3/src/zope/app/translation_files - extract.py:1.16.4.1

Sidnei da Silva sidnei at awkly.org
Thu Mar 4 11:05:18 EST 2004


Update of /cvs-repository/Zope3/src/zope/app/translation_files
In directory cvs.zope.org:/tmp/cvs-serv22012/app/translation_files

Modified Files:
      Tag: runyaga-sip-branch
	extract.py 
Log Message:
Remove whitespace. Use #. instead of # for Default.


=== Zope3/src/zope/app/translation_files/extract.py 1.16 => 1.16.4.1 ===
--- Zope3/src/zope/app/translation_files/extract.py:1.16	Thu Feb 19 10:20:37 2004
+++ Zope3/src/zope/app/translation_files/extract.py	Thu Mar  4 11:05:18 2004
@@ -81,7 +81,7 @@
         if isinstance(self.msgid, MessageID) and \
                self.msgid != self.msgid.default:
             default = self.msgid.default.strip()
-            file.write('# Default: %s\n' % normalize(default))
+            file.write('#. Default: %s\n' % normalize(default))
         file.write('msgid %s\n' % normalize(self.msgid))
         file.write('msgstr ""\n')
         file.write('\n')
@@ -93,7 +93,7 @@
     """This class inserts sets of strings into a POT file.
     """
     implements(IPOTMaker)
-    
+
     def __init__ (self, output_fn, path):
         self._output_filename = output_fn
         self.path = path
@@ -138,7 +138,7 @@
         # Write each entry to the file
         for entry in catalog:
             entry.write(file)
-            
+
         file.close()
 
 class TokenEater:
@@ -177,7 +177,7 @@
     Note that everything gets converted to unicode.
     """
     implements(ITokenEater)
-    
+
     def __init__(self):
         self.__messages = {}
         self.__state = self.__waiting
@@ -221,7 +221,7 @@
     def __openseen(self, ttype, tstring, lineno):
         if ttype == tokenize.OP and tstring == ')':
             # We've seen the last of the translatable strings.  Record the
-            # line number of the first line of the strings and update the list 
+            # line number of the first line of the strings and update the list
             # of messages seen.  Reset state for the next batch.  If there
             # were no strings inside _(), then just ignore this entry.
             if self.__data or self.__msgid:
@@ -269,7 +269,7 @@
             rentries.sort()
             for msgid, locations in rentries:
                 catalog[msgid] = []
-                
+
                 locations = locations.keys()
                 locations.sort()
 
@@ -285,7 +285,7 @@
         files += [os.path.join(dirname, name)
                   for name in fnmatch.filter(names, pattern)
                   if name not in exclude]
-        
+
     os.path.walk(dir, visit, files)
     return files
 
@@ -294,7 +294,7 @@
     """
     eater = TokenEater()
     make_escapes(0)
-    for filename in find_files(dir, '*.py', 
+    for filename in find_files(dir, '*.py',
                                exclude=('extract.py', 'pygettext.py')):
         fp = open(filename)
         try:
@@ -305,7 +305,7 @@
                 print >> sys.stderr, '%s: %s, line %d, column %d' % (
                     e[0], filename, e[1][0], e[1][1])
         finally:
-            fp.close()            
+            fp.close()
     # XXX: No support for domains yet :(
     return eater.getCatalog()
 




More information about the Zope3-Checkins mailing list