devtools/devctl.py
changeset 2534 cda22bc0e6ef
parent 2528 6ae5d8082b39
child 2551 91f579b7a1e1
equal deleted inserted replaced
2533:07a744f64c2e 2534:cda22bc0e6ef
   258         import yams
   258         import yams
   259         from logilab.common.fileutils import ensure_fs_mode
   259         from logilab.common.fileutils import ensure_fs_mode
   260         from logilab.common.shellutils import globfind, find, rm
   260         from logilab.common.shellutils import globfind, find, rm
   261         from cubicweb.common.i18n import extract_from_tal, execute
   261         from cubicweb.common.i18n import extract_from_tal, execute
   262         tempdir = tempdir.mkdtemp()
   262         tempdir = tempdir.mkdtemp()
   263         potfiles = [join(I18NDIR, 'entities.pot')]
   263         potfiles = [join(I18NDIR, 'static-messages.pot')]
   264         print '-> extract schema messages.'
   264         print '-> extract schema messages.'
   265         schemapot = join(tempdir, 'schema.pot')
   265         schemapot = join(tempdir, 'schema.pot')
   266         potfiles.append(schemapot)
   266         potfiles.append(schemapot)
   267         # explicit close necessary else the file may not be yet flushed when
   267         # explicit close necessary else the file may not be yet flushed when
   268         # we'll using it below
   268         # we'll using it below
   355     toedit = []
   355     toedit = []
   356     cube = basename(normpath(cubedir))
   356     cube = basename(normpath(cubedir))
   357     tempdir = tempfile.mkdtemp()
   357     tempdir = tempfile.mkdtemp()
   358     print underline_title('Updating i18n catalogs for cube %s' % cube)
   358     print underline_title('Updating i18n catalogs for cube %s' % cube)
   359     chdir(cubedir)
   359     chdir(cubedir)
   360     potfiles = [join('i18n', scfile) for scfile in ('entities.pot',)
   360     potfiles = [join('i18n', scfile) for scfile in ('static-messages.pot',)
   361                 if exists(join('i18n', scfile))]
   361                 if exists(join('i18n', scfile))]
   362     print '-> extract schema messages'
   362     print '-> extract schema messages'
   363     schemapot = join(tempdir, 'schema.pot')
   363     schemapot = join(tempdir, 'schema.pot')
   364     potfiles.append(schemapot)
   364     potfiles.append(schemapot)
   365     # explicit close necessary else the file may not be yet flushed when
   365     # explicit close necessary else the file may not be yet flushed when