From 9642774ac9e2f4f36fc1d0a3a90b97034565d56c Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 10 Nov 2014 08:52:48 +0530 Subject: [PATCH] Translate the title for the User Manual --- manual/conf.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/manual/conf.py b/manual/conf.py index bbbede5538..cf5b175198 100644 --- a/manual/conf.py +++ b/manual/conf.py @@ -73,6 +73,15 @@ today_fmt = '%B %d, %Y' unused_docs = ['global', 'cli/global'] locale_dirs = ['locale/'] +title = '%s User Manual' % __appname__ +if language not in {'en', 'eng'}: + import gettext + try: + t = gettext.translation('simple_index', locale_dirs[0], [language]) + except IOError: + pass + else: + title = t.ugettext(title) # If true, '()' will be appended to :func: etc. cross-reference text. # add_function_parentheses = True @@ -120,7 +129,7 @@ html_last_updated_fmt = '%b %d, %Y' html_use_smartypants = True # Overall title of the documentation -html_title = 'calibre User Manual' +html_title = title html_short_title = 'Start' html_logo = 'resources/logo.png' @@ -164,8 +173,7 @@ latex_font_size = '10pt' # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, author, document class [howto/manual]). -latex_documents = [(master_doc, 'calibre.tex', 'calibre User Manual', - 'Kovid Goyal', 'manual', False)] +latex_documents = [(master_doc, 'calibre.tex', title, 'Kovid Goyal', 'manual', False)] # Additional stuff for the LaTeX preamble. # latex_preamble = ''