diff options
Diffstat (limited to 'theme/templates')
-rw-r--r-- | theme/templates/ebook/glossary.html | 6 | ||||
-rw-r--r-- | theme/templates/ebook/summary.html | 8 | ||||
-rw-r--r-- | theme/templates/website/glossary.html | 2 | ||||
-rw-r--r-- | theme/templates/website/includes/font-settings.html | 10 | ||||
-rw-r--r-- | theme/templates/website/includes/header.html | 30 | ||||
-rw-r--r-- | theme/templates/website/includes/summary.html | 8 | ||||
-rwxr-xr-x | theme/templates/website/langs.html | 4 | ||||
-rw-r--r-- | theme/templates/website/page.html | 2 |
8 files changed, 41 insertions, 29 deletions
diff --git a/theme/templates/ebook/glossary.html b/theme/templates/ebook/glossary.html index d4d46f2..1266f27 100644 --- a/theme/templates/ebook/glossary.html +++ b/theme/templates/ebook/glossary.html @@ -1,11 +1,11 @@ {% extends "./page.html" %} -{% block title %}{% i18n "GLOSSARY" %}Glossary{% endi18n %} | {{ title }}{% endblock %} +{% block title %}{{ __("GLOSSARY") }} | {{ title }}{% endblock %} {% block content %} <div class="page page-toc"> - <h1 class="book-chapter book-chapter-1">{% i18n "GLOSSARY" %}Glossary{% endi18n %}</h1> - <h1>{% i18n "GLOSSARY" %}Glossary{% endi18n %}</h1> + <h1 class="book-chapter book-chapter-1">{{ __("GLOSSARY") }}</h1> + <h1>{{ __("GLOSSARY") }}</h1> {% for item in glossary %} <section class="normal glossary" id="{{ item.id }}"> <h2><a href="#{{ item.id }}">{{ item.name }}</a></h2> diff --git a/theme/templates/ebook/summary.html b/theme/templates/ebook/summary.html index c0d6d1e..fa79a98 100644 --- a/theme/templates/ebook/summary.html +++ b/theme/templates/ebook/summary.html @@ -1,13 +1,13 @@ {% extends "./page.html" %} -{% block title %}{% i18n "SUMMARY" %}Table of Contents{% endi18n %} | {{ title }}{% endblock %} +{% block title %}{{ __("SUMMARY") }} | {{ title }}{% endblock %} {% macro articles(_articles) %} {% for item in _articles %} <li> {% if item.path and item.exists %} {% if not item.external %} - <a href="{{ basePath }}/{{ item.path|contentLink }}">{% if item.introduction %}{% i18n "SUMMARY_INTRODUCTION" %}Introduction{% endi18n %}{% else %}{{ item.title }}{% endif %}</a> + <a href="{{ basePath }}/{{ item.path|contentLink }}">{{ item.title }}</a> {% else %} <a target="_blank" href="{{ item.path }}">{{ item.title }}</a> {% endif %} @@ -25,12 +25,12 @@ {% block content %} <div class="page page-toc"> - <h1>{% i18n "SUMMARY" %}Table of Contents{% endi18n %}</h1> + <h1>{{ __("SUMMARY") }}</h1> <ol> {{ articles(summary.chapters) }} {% if glossary.length > 0 %} - <li><a href="{{ basePath }}/GLOSSARY.html">{% i18n "GLOSSARY" %}Glossary{% endi18n %}</a></li> + <li><a href="{{ basePath }}/GLOSSARY.html">{{ __("GLOSSARY") }}</a></li> {% endif %} </ol> </div> diff --git a/theme/templates/website/glossary.html b/theme/templates/website/glossary.html index 1a78c76..dd3f719 100644 --- a/theme/templates/website/glossary.html +++ b/theme/templates/website/glossary.html @@ -1,6 +1,6 @@ {% extends "page.html" %} -{% block title %}{% i18n "GLOSSARY" %}Glossary{% endi18n %} | {{ title }}{% endblock %} +{% block title %}{{ __("GLOSSARY") }} | {{ title }}{% endblock %} {% block page_inner %} {% for item in glossary %} diff --git a/theme/templates/website/includes/font-settings.html b/theme/templates/website/includes/font-settings.html index 6a54334..2d5024b 100644 --- a/theme/templates/website/includes/font-settings.html +++ b/theme/templates/website/includes/font-settings.html @@ -10,13 +10,13 @@ </div> <div class="buttons font-family-list"> - <button type="button" data-font="0" class="button">{% i18n "FONTSETTINGS_SERIF" %}Serif{% endi18n %}</button> - <button type="button" data-font="1" class="button">{% i18n "FONTSETTINGS_SANS" %}Sans{% endi18n %}</button> + <button type="button" data-font="0" class="button">{{ __("FONTSETTINGS_SERIF") }}</button> + <button type="button" data-font="1" class="button">{{ __("FONTSETTINGS_SANS") }}</button> </div> <div class="buttons color-theme-list"> - <button type="button" id="color-theme-preview-0" class="button size-3" data-theme="0">{% i18n "FONTSETTINGS_WHITE" %}White{% endi18n %}</button> - <button type="button" id="color-theme-preview-1" class="button size-3" data-theme="1">{% i18n "FONTSETTINGS_SEPIA" %}Sepia{% endi18n %}</button> - <button type="button" id="color-theme-preview-2" class="button size-3" data-theme="2">{% i18n "FONTSETTINGS_NIGHT" %}Night{% endi18n %}</button> + <button type="button" id="color-theme-preview-0" class="button size-3" data-theme="0">{{ __("FONTSETTINGS_WHITE") }}</button> + <button type="button" id="color-theme-preview-1" class="button size-3" data-theme="1">{{ __("FONTSETTINGS_SEPIA") }}</button> + <button type="button" id="color-theme-preview-2" class="button size-3" data-theme="2">{{ __("FONTSETTINGS_NIGHT") }}</button> </div> </div> diff --git a/theme/templates/website/includes/header.html b/theme/templates/website/includes/header.html index 119dd62..7a987b0 100644 --- a/theme/templates/website/includes/header.html +++ b/theme/templates/website/includes/header.html @@ -1,12 +1,12 @@ <div class="book-header"> <!-- Actions Left --> - <a href="#" class="btn pull-left toggle-summary" aria-label="{% i18n "SUMMARY_TOGGLE" %}Table of Contents{% endi18n %}"><i class="fa fa-align-justify"></i></a> - <a href="#" class="btn pull-left toggle-search" aria-label="{% i18n "SEARCH_TOGGLE" %}Search{% endi18n %}"><i class="fa fa-search"></i></a> + <a href="#" class="btn pull-left toggle-summary" aria-label="{{ __("SUMMARY_TOGGLE") }}"><i class="fa fa-align-justify"></i></a> + <a href="#" class="btn pull-left toggle-search" aria-label="{{ __("SEARCH_TOGGLE") }}"><i class="fa fa-search"></i></a> {% if glossary.length > 0 %} - <a href="{{ basePath }}/GLOSSARY.html" class="btn pull-left" aria-label="{% i18n "GLOSSARY_OPEN" %}Glossary{% endi18n %}"><i class="fa fa-sort-alpha-asc"></i></a> + <a href="{{ basePath }}/GLOSSARY.html" class="btn pull-left" aria-label="{{ __("GLOSSARY_OPEN") }}"><i class="fa fa-sort-alpha-asc"></i></a> {% endif %} <div id="font-settings-wrapper" class="dropdown pull-left"> - <a href="#" class="btn toggle-dropdown" aria-label="{% i18n "FONTSETTINGS_TOGGLE" %}Font Settings{% endi18n %}"><i class="fa fa-font"></i> + <a href="#" class="btn toggle-dropdown" aria-label="{{ __("FONTSETTINGS_TOGGLE") }}"><i class="fa fa-font"></i> </a> {% include "./font-settings.html" %} </div> @@ -14,7 +14,7 @@ <!-- Actions Right --> {% if options.links.sharing.all != false %} <div class="dropdown pull-right"> - <a href="#" class="btn toggle-dropdown" aria-label="{% i18n "SHARE_TOGGLE" %}Share{% endi18n %}"><i class="fa fa-share-alt"></i> + <a href="#" class="btn toggle-dropdown" aria-label="{{ __("SHARE_TOGGLE") }}"><i class="fa fa-share-alt"></i> </a> <div class="dropdown-menu font-settings dropdown-left"> <div class="dropdown-caret"> @@ -22,11 +22,21 @@ <span class="caret-inner"></span> </div> <div class="buttons"> - <button type="button" data-sharing="twitter" class="button">{% i18n "SHARE_ON", __platform__="Twitter" %}Share on __platform__{% endi18n %}</button> - <button type="button" data-sharing="google-plus" class="button">{% i18n "SHARE_ON", __platform__="Google" %}Share on __platform__{% endi18n %}</button> - <button type="button" data-sharing="facebook" class="button">{% i18n "SHARE_ON", __platform__="Facebook" %}Share on __platform__{% endi18n %}</button> - <button type="button" data-sharing="weibo" class="button">{% i18n "SHARE_ON", __platform__="Weibo" %}Share on __platform__{% endi18n %}</button> - <button type="button" data-sharing="instapaper" class="button">{% i18n "SHARE_ON", __platform__="Instapaper" %}Share on __platform__{% endi18n %}</button> + <button type="button" data-sharing="twitter" class="button"> + {{ __("SHARE_ON", platform="Twitter") }} + </button> + <button type="button" data-sharing="google-plus" class="button"> + {{ __("SHARE_ON", platform="Google") }} + </button> + <button type="button" data-sharing="facebook" class="button"> + {{ __("SHARE_ON", platform="Facebook") }} + </button> + <button type="button" data-sharing="weibo" class="button"> + {{ __("SHARE_ON", platform="Weibo") }} + </button> + <button type="button" data-sharing="instapaper" class="button"> + {{ __("SHARE_ON", platform="Instapaper") }} + </button> </div> </div> </div> diff --git a/theme/templates/website/includes/summary.html b/theme/templates/website/includes/summary.html index e016024..312fc2d 100644 --- a/theme/templates/website/includes/summary.html +++ b/theme/templates/website/includes/summary.html @@ -8,7 +8,7 @@ {% if item.level != "0" %} <b>{{ item.level }}.</b> {% endif %} - {% if item.introduction and not item.title %}{% i18n "SUMMARY_INTRODUCTION" %}Introduction{% endi18n %}{% else %}{{ item.title }}{% endif %} + {{ item.title }} </a> {% else %} <a target="_blank" href="{{ item.path }}"> @@ -33,7 +33,7 @@ <div class="book-summary"> <div class="book-search"> - <input type="text" placeholder="{% i18n "SEARCH_PLACEHOLDER" %}Type to search{% endi18n %}" class="form-control" /> + <input type="text" placeholder="{{ __("SEARCH_PLACEHOLDER") }}" class="form-control" /> </div> <ul class="summary"> {% set _divider = false %} @@ -55,7 +55,9 @@ {% if options.links.gitbook != false %} <li class="divider"></li> <li> - <a href="https://www.gitbook.com" target="blank" class="gitbook-link">{% i18n "GITBOOK_LINK" %}Published using GitBook{% endi18n %}</a> + <a href="https://www.gitbook.com" target="blank" class="gitbook-link"> + {{ __("GITBOOK_LINK") }} + </a> </li> {% endif %} </ul> diff --git a/theme/templates/website/langs.html b/theme/templates/website/langs.html index 89a075e..6005cbb 100755 --- a/theme/templates/website/langs.html +++ b/theme/templates/website/langs.html @@ -9,7 +9,7 @@ {% block content %} <div class="book-langs-index"> <div class="inner"> - <h3>{% i18n "LANGS_CHOOSE" %}Choose a language{% endi18n %}</h3> + <h3>{{ __("LANGS_CHOOSE") }}</h3> <ul class="languages"> {% for lang in langs %} @@ -22,4 +22,4 @@ </div> {% endblock %} -{% block javascript %}{% endblock %}
\ No newline at end of file +{% block javascript %}{% endblock %} diff --git a/theme/templates/website/page.html b/theme/templates/website/page.html index d4b5e0b..37fc9dd 100644 --- a/theme/templates/website/page.html +++ b/theme/templates/website/page.html @@ -10,7 +10,7 @@ {% endif %} {% endblock %} -{% block title %}{% if progress.current.introduction and not progress.current.title %}{% i18n "SUMMARY_INTRODUCTION" %}Introduction{% endi18n %}{% else %}{{ progress.current.title }}{% endif %} | {{ title }}{% endblock %} +{% block title %}{{ progress.current.title }} | {{ title }}{% endblock %} {% block description %}{% if progress.current.level == "0" %}{{ description }}{% endif %}{% endblock %} {% block content %} |