diff --git a/src/templates/base/2019/base_chapter.html b/src/templates/base/2019/base_chapter.html index e36bf41401b..452e1536375 100644 --- a/src/templates/base/2019/base_chapter.html +++ b/src/templates/base/2019/base_chapter.html @@ -87,14 +87,14 @@ {% macro render_byline() %}
{{ self.written_by_before() }} {% for author in metadata.get('authors') %} - {{ config.contributors[author].name if author in config.contributors else author }}{{ self.comma() if not loop.last }} + {{ config.contributors[author].name if author in config.contributors else author }}{{ self.comma() if not loop.last and loop.length > 2 }} {% if loop.index == loop.length - 1 %}{{ self.and() }}{% endif %} {% endfor %}{{ self.written_by_after() }}
{{ self.reviewed_by_before() }} {% for reviewer in metadata.get('reviewers') %} - {{ config.contributors[reviewer].name if reviewer in config.contributors else reviewer }}{{ self.comma() if not loop.last }} + {{ config.contributors[reviewer].name if reviewer in config.contributors else reviewer }}{{ self.comma() if not loop.last and loop.length > 2 }} {% if loop.index == loop.length - 1 %}{{ self.and() }}{% endif %} {% endfor %}{{ self.reviewed_by_after() }}
@@ -102,7 +102,7 @@ {% if metadata.get('translators') | length >= 1 %}
{{ self.translated_by_before() }} {% for translator in metadata.get('translators') %} - {{ config.contributors[translator].name if translator in config.contributors else translator }}{{ self.comma() if not loop.last }} + {{ config.contributors[translator].name if translator in config.contributors else translator }}{{ self.comma() if not loop.last and loop.length > 2 }} {% if loop.index == loop.length - 1 %}{{ self.and() }}{% endif %} {% endfor %}{{ self.translated_by_after() }}
diff --git a/src/templates/base/2019/base_ebook.html b/src/templates/base/2019/base_ebook.html index e4b8f15dbf9..352acaff8fd 100644 --- a/src/templates/base/2019/base_ebook.html +++ b/src/templates/base/2019/base_ebook.html @@ -390,7 +390,7 @@

{% endif %}
{% for id in contributor.teams | sort() %} - {{ localizedTeamNames[id] if localizedTeamNames[id]|length else team.name }}{{ self.comma() if not loop.last }} + {{ localizedTeamNames[id] if localizedTeamNames[id]|length else team.name }}{{ self.comma() if not loop.last and loop.length > 2 }} {% endfor %}
diff --git a/src/templates/base/2019/ebook.ejs.html b/src/templates/base/2019/ebook.ejs.html index 66e81613197..01cb6705e1c 100644 --- a/src/templates/base/2019/ebook.ejs.html +++ b/src/templates/base/2019/ebook.ejs.html @@ -35,14 +35,14 @@

{{ self.written_by_before() }} {% for author in metadata.get('authors') %} - {{ config.contributors[author].name if author in config.contributors else author }}{{ self.comma() if not loop.last }} + {{ config.contributors[author].name if author in config.contributors else author }}{{ self.comma() if not loop.last and loop.length > 2 }} {% if loop.index == loop.length - 1 %}{{ self.and() }}{% endif %} {% endfor %}{{ self.written_by_after() }}
{{ self.reviewed_by_before() }} {% for reviewer in metadata.get('reviewers') %} - {{ config.contributors[reviewer].name if reviewer in config.contributors else reviewer }}{{ self.comma() if not loop.last }} + {{ config.contributors[reviewer].name if reviewer in config.contributors else reviewer }}{{ self.comma() if not loop.last and loop.length > 2 }} {% if loop.index == loop.length - 1 %}{{ self.and() }}{% endif %} {% endfor %}{{ self.reviewed_by_after() }}
@@ -50,7 +50,7 @@

{% if metadata.get('translators') | length >= 1 %}
{{ self.translated_by_before() }} {% for translator in metadata.get('translators') %} - {{ config.contributors[translator].name if translator in config.contributors else translator }}{{ self.comma() if not loop.last }} + {{ config.contributors[translator].name if translator in config.contributors else translator }}{{ self.comma() if not loop.last and loop.length > 2 }} {% if loop.index == loop.length - 1 %}{{ self.and() }}{% endif %} {% endfor %}{{ self.translated_by_after() }}