cubicweb/devtools/devctl.py
changeset 12508 a8c1ea390400
parent 12080 b8c4a8bab7b3
child 12567 26744ad37953
equal deleted inserted replaced
12507:211472ab15c8 12508:a8c1ea390400
    28 import tempfile
    28 import tempfile
    29 import sys
    29 import sys
    30 from datetime import datetime, date
    30 from datetime import datetime, date
    31 from os import getcwd, mkdir, chdir, path as osp
    31 from os import getcwd, mkdir, chdir, path as osp
    32 import pkg_resources
    32 import pkg_resources
    33 from warnings import warn
       
    34 
    33 
    35 from pytz import UTC
    34 from pytz import UTC
    36 
    35 
    37 from six.moves import input
    36 from six.moves import input
    38 
    37 
   479         - one ``pot`` file for each inspected format (.py, .js, etc.)
   478         - one ``pot`` file for each inspected format (.py, .js, etc.)
   480         """
   479         """
   481         print('-> extracting messages:', end=' ')
   480         print('-> extracting messages:', end=' ')
   482         potfiles = []
   481         potfiles = []
   483         # static messages
   482         # static messages
   484         if osp.exists(osp.join('i18n', 'entities.pot')):
   483         if osp.exists(osp.join('i18n', 'static-messages.pot')):
   485             warn('entities.pot is deprecated, rename file '
       
   486                  'to static-messages.pot (%s)'
       
   487                  % osp.join('i18n', 'entities.pot'), DeprecationWarning)
       
   488             potfiles.append(osp.join('i18n', 'entities.pot'))
       
   489         elif osp.exists(osp.join('i18n', 'static-messages.pot')):
       
   490             potfiles.append(osp.join('i18n', 'static-messages.pot'))
   484             potfiles.append(osp.join('i18n', 'static-messages.pot'))
   491         # messages from schema
   485         # messages from schema
   492         potfiles.append(self.schemapot())
   486         potfiles.append(self.schemapot())
   493         # messages from sourcecode
   487         # messages from sourcecode
   494         for fmt in self.formats:
   488         for fmt in self.formats: