[Checkins] SVN: z3c.recipe.i18n/trunk/ - Makers are now called with additional keyword arguments.

Yvo Schubbe y.2009 at wcm-solutions.de
Fri Jul 17 08:27:42 EDT 2009


Log message for revision 101958:
  - Makers are now called with additional keyword arguments.

Changed:
  U   z3c.recipe.i18n/trunk/CHANGES.txt
  U   z3c.recipe.i18n/trunk/src/z3c/recipe/i18n/README.txt
  UU  z3c.recipe.i18n/trunk/src/z3c/recipe/i18n/i18nextract.py

-=-
Modified: z3c.recipe.i18n/trunk/CHANGES.txt
===================================================================
--- z3c.recipe.i18n/trunk/CHANGES.txt	2009-07-17 10:51:23 UTC (rev 101957)
+++ z3c.recipe.i18n/trunk/CHANGES.txt	2009-07-17 12:27:42 UTC (rev 101958)
@@ -5,6 +5,8 @@
 0.5.5 (unreleased)
 ------------------
 
+- Makers are now called with additional keyword arguments.
+
 - Fixed dependencies: The 'extract' extra of zope.app.locales is required.
 
 0.5.4 (2009-06-08)

Modified: z3c.recipe.i18n/trunk/src/z3c/recipe/i18n/README.txt
===================================================================
--- z3c.recipe.i18n/trunk/src/z3c/recipe/i18n/README.txt	2009-07-17 10:51:23 UTC (rev 101957)
+++ z3c.recipe.i18n/trunk/src/z3c/recipe/i18n/README.txt	2009-07-17 12:27:42 UTC (rev 101958)
@@ -47,6 +47,9 @@
   must be located in the python path because it get resolved by
   zope.configuration.name.resolve. For a sample maker see 
   z3c.csvvocabulary.csvStrings.
+  Makers are called with these arguments: 'path', 'base_path', 'exclude_dirs',
+  'domain', 'include_default_domain' and 'site_zcml'. The return value has to
+  be a catalog dictionary.
 
 zcml (required)
   The contents of configuration used for extraction. Normaly used for load 

Modified: z3c.recipe.i18n/trunk/src/z3c/recipe/i18n/i18nextract.py
===================================================================
--- z3c.recipe.i18n/trunk/src/z3c/recipe/i18n/i18nextract.py	2009-07-17 10:51:23 UTC (rev 101957)
+++ z3c.recipe.i18n/trunk/src/z3c/recipe/i18n/i18nextract.py	2009-07-17 12:27:42 UTC (rev 101958)
@@ -181,8 +181,20 @@
             maker.add(zcml_strings(path, domain, site_zcml), basePath)
             maker.add(tal_strings(path, domain, include_default_domain,
                                   exclude=exclude_dirs), basePath)
-        for m in makers:
-            maker.add(m(path, basePath, exclude_dirs), basePath)
+        for maker_func in makers:
+            try:
+                maker.add(
+                    maker_func(
+                        path=path,
+                        base_path=basePath,
+                        exclude_dirs=exclude_dirs,
+                        domain=domain,
+                        include_default_domain=include_default_domain,
+                        site_zcml=site_zcml,
+                        ), basePath)
+            except TypeError:
+                # BBB: old arguments
+                maker.add(maker_func(path, basePath, exclude_dirs), basePath)
 
     maker.write()
     print "output: %r\n" % output_file


Property changes on: z3c.recipe.i18n/trunk/src/z3c/recipe/i18n/i18nextract.py
___________________________________________________________________
Added: svn:keywords
   + Id



More information about the Checkins mailing list