From f75ea236e5656d016a9f369153b2386eff4c2001 Mon Sep 17 00:00:00 2001 From: Eli Schwartz Date: Sun, 19 May 2019 17:04:32 -0400 Subject: [PATCH] py3: make templite templates use python3-compatible syntax --- resources/templates/html_export_default.tmpl | 24 +++++++++---------- .../templates/html_export_default_index.tmpl | 18 +++++++------- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/resources/templates/html_export_default.tmpl b/resources/templates/html_export_default.tmpl index c3ed921255..7aac247e59 100644 --- a/resources/templates/html_export_default.tmpl +++ b/resources/templates/html_export_default.tmpl @@ -14,16 +14,16 @@ ${head_content}$ ${for title in meta.titles():}$ ${if pos1:}$

- ${print title}$ + ${print(title)}$

${:else:}$ -
${print title}$
+
${print(title)}$
${:endif}$ ${pos1=0}$ ${:endfor}$
- ${print ', '.join(meta.creators())}$ + ${print(', '.join(meta.creators()))}$
@@ -33,13 +33,13 @@ ${head_content}$ ${if prevLink or nextLink:}$
${if prevLink:}$ - ${print _('previous page'),}$ + ${print(_('previous page'))}$ ${:else:}$ - ${print _('previous page'),}$ + ${print(_('previous page'))}$ ${:endif}$ ${if nextLink:}$ - ${print _('next page'),}$ + ${print(_('next page'))}$ ${:endif}$
${:endif}$ @@ -49,22 +49,22 @@ ${head_content}$ ${if has_toc:}$
-

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

- ${print toc()}$ +

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

+ ${print(toc())}$
${:endif}$
${if prevLink:}$ - ${print _('previous page'),}$ + ${print(_('previous page'))}$ ${:else:}$ - ${print _('previous page'),}$ + ${print(_('previous page'))}$ ${:endif}$ - ${print _('start'),}$ + ${print(_('start'))}$ ${if nextLink:}$ - ${print _('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 4a9e8ab6f3..f0665ad275 100644 --- a/resources/templates/html_export_default_index.tmpl +++ b/resources/templates/html_export_default_index.tmpl @@ -6,10 +6,10 @@ -${print ', '.join(meta.creators()),}$ - ${print meta.titles().next(); meta.titles().close()}$ +${print(', '.join(meta.creators()))}$ - ${print(next(meta.titles())); print(meta.titles().close())}$ ${for item in meta:}$ - + ${:endfor}$ @@ -22,16 +22,16 @@ ${:endfor}$ ${for title in meta.titles():}$ ${if pos1:}$

- ${print title}$ + ${print(title)}$

${:else:}$ -
${print title}$
+
${print(title)}$
${:endif}$ ${pos1=0}$ ${:endfor}$
- ${print ', '.join(meta.creators()),}$ + ${print(', '.join(meta.creators()))}$
@@ -40,19 +40,19 @@ ${:endfor}$ ${if has_toc:}$
-

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

+

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

${toc}$
${:else:}$ -

${print _('No table of contents present'),}$

-
${print _('begin to read'),}$
+

${print(_('No table of contents present'))}$

+
${print(_('begin to read'))}$
${:endif}$
${if nextLink:}$ - ${print _('next page'),}$ + ${print(_('next page'))}$ ${:endif}$