Fix updated strings in simple_index.rst not being marked for translation

This commit is contained in:
Kovid Goyal 2014-11-10 16:10:29 +05:30
parent 9eae6a99c7
commit f8c7d1ae07
2 changed files with 6 additions and 1 deletions

View File

@ -64,7 +64,7 @@ def build_manual(language, base):
epub_to_azw3(epub_dest) epub_to_azw3(epub_dest)
def build_pot(base): def build_pot(base):
cmd = [SPHINX_BUILD, '-b', 'gettext', '-t', 'online', '.', base] cmd = [SPHINX_BUILD, '-b', 'gettext', '-t', 'online', '-t', 'gettext', '.', base]
print (' '.join(cmd)) print (' '.join(cmd))
subprocess.check_call(cmd) subprocess.check_call(cmd)
os.remove(j(base, 'generated.pot')) os.remove(j(base, 'generated.pot'))

View File

@ -41,6 +41,11 @@ source_suffix = '.rst'
master_doc = 'index' if tags.has('online') else 'simple_index' # noqa master_doc = 'index' if tags.has('online') else 'simple_index' # noqa
# kill the warning about index/simple_index not being in a toctree # kill the warning about index/simple_index not being in a toctree
exclude_patterns = ['simple_index.rst'] if master_doc == 'index' else ['index.rst'] exclude_patterns = ['simple_index.rst'] if master_doc == 'index' else ['index.rst']
if tags.has('gettext'): # noqa
# Do not exclude simple_index as its string must be translated. This will
# generate a warning about simple_index not being in a toctree, just ignore
# it.
exclude_patterns = []
# The language # The language
language = os.environ.get('CALIBRE_OVERRIDE_LANG', 'en') language = os.environ.get('CALIBRE_OVERRIDE_LANG', 'en')