support modules using new documentation build system with docbook files
This commit is contained in:
parent
6fe61b0b14
commit
c5c7c26330
|
@ -501,8 +501,12 @@ class Lgo(App):
|
|||
# merge lines continued with \
|
||||
makefile_am = re.sub(r'\\\s*\n', r' ', makefile_am)
|
||||
if 'HELP_ID' in makefile_am and '@YELP_HELP_RULES@' in makefile_am:
|
||||
logging.debug('found usage of mallard (via YELP_HELP_RULES) in %s' % tarinfo.name)
|
||||
doc = MallardModule.create_from_tar(tar, tarinfo, makefile_am, nightly)
|
||||
if '.page' in makefile_am:
|
||||
logging.debug('found usage of mallard (via YELP_HELP_RULES) in %s' % tarinfo.name)
|
||||
doc = MallardModule.create_from_tar(tar, tarinfo, makefile_am, nightly)
|
||||
else:
|
||||
logging.debug('found usage of docbook (via YELP_HELP_RULES) in %s' % tarinfo.name)
|
||||
doc = GnomeDocbookModule.create_from_tar(tar, tarinfo, makefile_am, nightly)
|
||||
elif 'DOC_ID' in makefile_am and regex_gdu.findall(makefile_am):
|
||||
logging.debug('found usage of mallard in %s' % tarinfo.name)
|
||||
doc = MallardModule.create_from_tar(tar, tarinfo, makefile_am, nightly)
|
||||
|
|
|
@ -83,7 +83,7 @@ class GnomeDocbookModule(DocModule):
|
|||
ext_dirname = os.path.join(app.config.private_dir, 'extracts')
|
||||
|
||||
try:
|
||||
doc_linguas = re.findall(r'DOC_LINGUAS\s+=[\t ](.*)',
|
||||
doc_linguas = re.findall(r'(?:DOC_LINGUAS|HELP_LINGUAS)\s+=[\t ](.*)',
|
||||
self.makefile_am)[0].split()
|
||||
if not 'en' in doc_linguas:
|
||||
doc_linguas.append('en')
|
||||
|
@ -93,7 +93,7 @@ class GnomeDocbookModule(DocModule):
|
|||
doc_linguas = ['en']
|
||||
|
||||
try:
|
||||
doc_figures = re.findall('DOC_FIGURES\s+=\s+(.*)',
|
||||
doc_figures = re.findall(r'(?:DOC_FIGURES|HELP_FIGURES)\s+=\s+(.*)',
|
||||
self.makefile_am)[0].split()
|
||||
figures_dirname = os.path.join(ext_dirname, self.dirname, 'C')
|
||||
for doc_figure in doc_figures:
|
||||
|
@ -161,11 +161,13 @@ class GnomeDocbookModule(DocModule):
|
|||
else:
|
||||
lang_dirname = os.path.join(ext_dirname, self.dirname, lang)
|
||||
|
||||
xml_file = os.path.join(lang_dirname, doc_module + '.xml')
|
||||
xml_file = os.path.join(lang_dirname, 'index.docbook')
|
||||
if not os.path.exists(xml_file):
|
||||
# the document had a translation available in a previous
|
||||
# version, and it got removed
|
||||
continue
|
||||
xml_file = os.path.join(lang_dirname, doc_module + '.xml')
|
||||
if not os.path.exists(xml_file):
|
||||
# the document had a translation available in a previous
|
||||
# version, and it got removed
|
||||
continue
|
||||
|
||||
xml_index_file = os.path.join(web_output_dir, 'index.xml.%s' % lang)
|
||||
skip_html_files = False
|
||||
|
|
Reference in New Issue