equal
deleted
inserted
replaced
113 except IndexError: |
113 except IndexError: |
114 raise ConfigurationError('no such config %r (check it exists with "cubicweb-ctl list")' % name) |
114 raise ConfigurationError('no such config %r (check it exists with "cubicweb-ctl list")' % name) |
115 |
115 |
116 def possible_configurations(directory): |
116 def possible_configurations(directory): |
117 """return a list of installed configurations in a directory |
117 """return a list of installed configurations in a directory |
118 according to *-ctl files |
118 according to \*-ctl files |
119 """ |
119 """ |
120 return [name for name in ('repository', 'twisted', 'all-in-one') |
120 return [name for name in ('repository', 'twisted', 'all-in-one') |
121 if exists(join(directory, '%s.conf' % name))] |
121 if exists(join(directory, '%s.conf' % name))] |
122 |
122 |
123 def guess_configuration(directory): |
123 def guess_configuration(directory): |
916 |
916 |
917 def available_languages(self, *args): |
917 def available_languages(self, *args): |
918 """return available translation for an instance, by looking for |
918 """return available translation for an instance, by looking for |
919 compiled catalog |
919 compiled catalog |
920 |
920 |
921 take *args to be usable as a vocabulary method |
921 take \*args to be usable as a vocabulary method |
922 """ |
922 """ |
923 from glob import glob |
923 from glob import glob |
924 yield 'en' # ensure 'en' is yielded even if no .mo found |
924 yield 'en' # ensure 'en' is yielded even if no .mo found |
925 for path in glob(join(self.apphome, 'i18n', |
925 for path in glob(join(self.apphome, 'i18n', |
926 '*', 'LC_MESSAGES')): |
926 '*', 'LC_MESSAGES')): |