devtools/devctl.py
changeset 2551 91f579b7a1e1
parent 2534 cda22bc0e6ef
child 2615 1ea41b7c0836
--- a/devtools/devctl.py	Wed Jul 29 09:08:26 2009 +0200
+++ b/devtools/devctl.py	Wed Jul 29 09:09:11 2009 +0200
@@ -12,7 +12,7 @@
 from datetime import datetime
 from os import mkdir, chdir
 from os.path import join, exists, abspath, basename, normpath, split, isdir
-
+from warnings import warn
 
 from logilab.common import STD_BLACKLIST
 from logilab.common.modutils import get_module_files
@@ -357,8 +357,14 @@
     tempdir = tempfile.mkdtemp()
     print underline_title('Updating i18n catalogs for cube %s' % cube)
     chdir(cubedir)
-    potfiles = [join('i18n', scfile) for scfile in ('static-messages.pot',)
-                if exists(join('i18n', scfile))]
+    if exists(join('i18n', 'entities.pot')):
+        warn('entities.pot is deprecated, rename file to static-messages.pot (%s)'
+             % join('i18n', 'entities.pot'), DeprecationWarning)
+        potfiles = [join('i18n', 'entities.pot')]
+    elif exists(join('i18n', 'static-messages.pot')):
+        potfiles = [join('i18n', 'static-messages.pot')]
+    else:
+        potfiles = []
     print '-> extract schema messages'
     schemapot = join(tempdir, 'schema.pot')
     potfiles.append(schemapot)