cubicweb/cwconfig.py
changeset 12578 d06a2feae373
parent 12567 26744ad37953
child 12709 280c9db41038
equal deleted inserted replaced
12576:3aa0c203747c 12578:d06a2feae373
   203         raise ConfigurationError('no such config %r (check it exists with "cubicweb-ctl list")' % name)
   203         raise ConfigurationError('no such config %r (check it exists with "cubicweb-ctl list")' % name)
   204 
   204 
   205 
   205 
   206 def possible_configurations(directory):
   206 def possible_configurations(directory):
   207     """return a list of installed configurations in a directory
   207     """return a list of installed configurations in a directory
   208     according to \*-ctl files
   208     according to *-ctl files
   209     """
   209     """
   210     return [name for name in ('repository', 'all-in-one', 'pyramid')
   210     return [name for name in ('repository', 'all-in-one', 'pyramid')
   211             if exists(join(directory, '%s.conf' % name))]
   211             if exists(join(directory, '%s.conf' % name))]
   212 
   212 
   213 
   213 
  1147 
  1147 
  1148     def available_languages(self, *args):
  1148     def available_languages(self, *args):
  1149         """return available translation for an instance, by looking for
  1149         """return available translation for an instance, by looking for
  1150         compiled catalog
  1150         compiled catalog
  1151 
  1151 
  1152         take \*args to be usable as a vocabulary method
  1152         take *args to be usable as a vocabulary method
  1153         """
  1153         """
  1154         from glob import glob
  1154         from glob import glob
  1155         yield 'en' # ensure 'en' is yielded even if no .mo found
  1155         yield 'en' # ensure 'en' is yielded even if no .mo found
  1156         for path in glob(join(self.apphome, 'i18n',
  1156         for path in glob(join(self.apphome, 'i18n',
  1157                               '*', 'LC_MESSAGES')):
  1157                               '*', 'LC_MESSAGES')):