# HG changeset patch # User Thierry Florac # Date 1482849671 -3600 # Node ID 5a04bf80d3d9ef3f55d70c0ef4c11b509291d04e # Parent 9a029b3a5cd1ed4fd22150eaa249a0563ed9c9ec Updated package include to add translations diff -r 9a029b3a5cd1 -r 5a04bf80d3d9 src/pyams_catalog/__init__.py --- a/src/pyams_catalog/__init__.py Thu Oct 08 09:50:57 2015 +0200 +++ b/src/pyams_catalog/__init__.py Tue Dec 27 15:41:11 2016 +0100 @@ -20,5 +20,9 @@ def includeme(config): """Pyramid include""" + # add translations + config.add_translation_dirs('pyams_catalog:locales') + + # load components from .include import include_package include_package(config) diff -r 9a029b3a5cd1 -r 5a04bf80d3d9 src/pyams_catalog/configure.zcml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/pyams_catalog/configure.zcml Tue Dec 27 15:41:11 2016 +0100 @@ -0,0 +1,10 @@ + + + + + + + + diff -r 9a029b3a5cd1 -r 5a04bf80d3d9 src/pyams_catalog/include.py --- a/src/pyams_catalog/include.py Thu Oct 08 09:50:57 2015 +0200 +++ b/src/pyams_catalog/include.py Tue Dec 27 15:41:11 2016 +0100 @@ -24,4 +24,12 @@ """Pyramid include""" # load registry components - config.scan() + try: + import pyams_zmi + except ImportError: + config.scan(ignore='pyams_catalog.zmi') + else: + config.scan() + + if hasattr(config, 'load_zcml'): + config.load_zcml('configure.zcml')