[Zope3-checkins] CVS: Zope3/utilities - i18nextract.py:1.5

Dmitry Vasiliev dima at hlabs.spb.ru
Thu Apr 15 09:54:30 EDT 2004


Update of /cvs-repository/Zope3/utilities
In directory cvs.zope.org:/tmp/cvs-serv15153/utilities

Modified Files:
	i18nextract.py 
Log Message:
Default package for message id's extraction changed to 'zope'


=== Zope3/utilities/i18nextract.py 1.4 => 1.5 ===
--- Zope3/utilities/i18nextract.py:1.4	Thu Apr  1 13:09:35 2004
+++ Zope3/utilities/i18nextract.py	Thu Apr 15 09:54:30 2004
@@ -18,7 +18,7 @@
 This tool will extract all findable message strings from all
 internationalizable files in your Zope 3 product. It only extracts
 message ids of the specified domain. It defaults to the 'zope' domain
-and the zope.app package.
+and the zope package.
 
 Note: The Python Code extraction tool does not support domain
       registration, so that all message strings are returned for
@@ -51,10 +51,9 @@
 
 def app_dir():
     try:
-        import zope.app
+        import zope
     except ImportError:
-        # Couldn't import zope.app, need to add something to the Python
-        # path
+        # Couldn't import zope, need to add something to the Python path
 
         # Get the path of the src
         path = os.path.abspath(os.getcwd())
@@ -63,12 +62,12 @@
         sys.path.insert(0, path)
 
         try:
-            import zope.app
+            import zope
         except ImportError:
             usage(1, "Make sure the script has been executed "
                      "inside Zope 3 source tree.")
 
-    return os.path.dirname(zope.app.__file__)
+    return os.path.dirname(zope.__file__)
 
 def main(argv=sys.argv):
     try:
@@ -120,8 +119,10 @@
 
     print "base path: %r\nsearch path: %r\ndomain: %r\noutput file: %r" \
         % (base_dir, path, domain, output_file)
+
     from zope.app.translation_files.extract import POTMaker, \
          py_strings, tal_strings, zcml_strings
+
     maker = POTMaker(output_file, path)
     maker.add(py_strings(path, domain), base_dir)
     if not python_only:




More information about the Zope3-Checkins mailing list