From c6b2f727950d7f9bb7e861d7ead59d3b8fc95527 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20Gra=C3=9Fl?= Date: Fri, 15 Oct 2010 12:21:22 +0200 Subject: [PATCH] i18n added --- resources/templates/html_export_default.tmpl | 6 +++--- resources/templates/html_export_default_index.tmpl | 4 ++-- src/calibre/ebooks/html/output.py | 5 +++++ 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/resources/templates/html_export_default.tmpl b/resources/templates/html_export_default.tmpl index c0559cf2e7..f15858e37a 100644 --- a/resources/templates/html_export_default.tmpl +++ b/resources/templates/html_export_default.tmpl @@ -23,7 +23,7 @@ ${head_content}$
-

Table of contents

+

${print _('Table of contents'),}$

${print toc()}$
@@ -33,11 +33,11 @@ ${head_content}$
${if prevLink:}$ - previous page + ${print _('previous page'),}$ ${:endif}$ ${if nextLink:}$ - next page + ${print _('next page'),}$ ${:endif}$
diff --git a/resources/templates/html_export_default_index.tmpl b/resources/templates/html_export_default_index.tmpl index 46531d322f..6af97e1035 100644 --- a/resources/templates/html_export_default_index.tmpl +++ b/resources/templates/html_export_default_index.tmpl @@ -27,11 +27,11 @@ ${:endfor}$ ${:endfor}$
- ${print ', '.join(meta.creators())}$ + ${print ', '.join(meta.creators()),}$
-

Table of contents

+

${print _('Table of contents'),}$

diff --git a/src/calibre/ebooks/html/output.py b/src/calibre/ebooks/html/output.py index af216f789d..d76056ce14 100644 --- a/src/calibre/ebooks/html/output.py +++ b/src/calibre/ebooks/html/output.py @@ -56,6 +56,11 @@ class HTMLOutput(OutputFormatPlugin): return etree.tostring(root, pretty_print=True, encoding='utf-8', xml_declaration=False) def convert(self, oeb_book, output_path, input_plugin, opts, log): + if oeb_book.toc.count() == 0: + if len(oeb_book.spine) > 1: + pass + else: + pass self.log = log self.opts = opts output_file = output_path