Ready for translation: add gettext functions to all messages, which has no translation tags.

This commit is contained in:
Mingun 2016-08-29 22:10:10 +05:00 committed by Mathieu Lutfy
parent 454aa28652
commit c2197a5f7d
4 changed files with 17 additions and 17 deletions

View File

@ -24,7 +24,7 @@
<ul class="wy-breadcrumbs"> <ul class="wy-breadcrumbs">
{% block breadcrumbs %} {% block breadcrumbs %}
<li><a href="{{ pathto(master_doc) }}">Docs</a> &raquo;</li> <li><a href="{{ pathto(master_doc) }}">{{ _('Docs') }}</a> &raquo;</li>
{% for doc in parents %} {% for doc in parents %}
<li><a href="{{ doc.link|e }}">{{ doc.title }}</a> &raquo;</li> <li><a href="{{ doc.link|e }}">{{ doc.title }}</a> &raquo;</li>
{% endfor %} {% endfor %}
@ -36,21 +36,21 @@
{% if display_github %} {% if display_github %}
{% if check_meta and 'github_url' in meta %} {% if check_meta and 'github_url' in meta %}
<!-- User defined GitHub URL --> <!-- User defined GitHub URL -->
<a href="{{ meta['github_url'] }}" class="fa fa-github"> Edit on GitHub</a> <a href="{{ meta['github_url'] }}" class="fa fa-github"> {{ _('Edit on GitHub') }}</a>
{% else %} {% else %}
<a href="https://{{ github_host|default("github.com") }}/{{ github_user }}/{{ github_repo }}/blob/{{ github_version }}{{ conf_py_path }}{{ pagename }}{{ suffix }}" class="fa fa-github"> Edit on GitHub</a> <a href="https://{{ github_host|default("github.com") }}/{{ github_user }}/{{ github_repo }}/blob/{{ github_version }}{{ conf_py_path }}{{ pagename }}{{ suffix }}" class="fa fa-github"> {{ _('Edit on GitHub') }}</a>
{% endif %} {% endif %}
{% elif display_bitbucket %} {% elif display_bitbucket %}
{% if check_meta and 'bitbucket_url' in meta %} {% if check_meta and 'bitbucket_url' in meta %}
<!-- User defined Bitbucket URL --> <!-- User defined Bitbucket URL -->
<a href="{{ meta['bitbucket_url'] }}" class="fa fa-bitbucket"> Edit on Bitbucket</a> <a href="{{ meta['bitbucket_url'] }}" class="fa fa-bitbucket"> {{ _('Edit on Bitbucket') }}</a>
{% else %} {% else %}
<a href="https://bitbucket.org/{{ bitbucket_user }}/{{ bitbucket_repo }}/src/{{ bitbucket_version}}{{ conf_py_path }}{{ pagename }}{{ suffix }}" class="fa fa-bitbucket"> Edit on Bitbucket</a> <a href="https://bitbucket.org/{{ bitbucket_user }}/{{ bitbucket_repo }}/src/{{ bitbucket_version}}{{ conf_py_path }}{{ pagename }}{{ suffix }}" class="fa fa-bitbucket"> {{ _('Edit on Bitbucket') }}</a>
{% endif %} {% endif %}
{% elif show_source and source_url_prefix %} {% elif show_source and source_url_prefix %}
<a href="{{ source_url_prefix }}{{ pagename }}{{ suffix }}">View page source</a> <a href="{{ source_url_prefix }}{{ pagename }}{{ suffix }}">{{ _('View page source') }}</a>
{% elif show_source and has_source and sourcename %} {% elif show_source and has_source and sourcename %}
<a href="{{ pathto('_sources/' + sourcename, true)|e }}" rel="nofollow"> View page source</a> <a href="{{ pathto('_sources/' + sourcename, true)|e }}" rel="nofollow"> {{ _('View page source') }}</a>
{% endif %} {% endif %}
{% endif %} {% endif %}
</li> </li>

View File

@ -2,10 +2,10 @@
{% if (theme_prev_next_buttons_location == 'bottom' or theme_prev_next_buttons_location == 'both') and (next or prev) %} {% if (theme_prev_next_buttons_location == 'bottom' or theme_prev_next_buttons_location == 'both') and (next or prev) %}
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation"> <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
{% if next %} {% if next %}
<a href="{{ next.link|e }}" class="btn btn-neutral float-right" title="{{ next.title|striptags|e }}" accesskey="n">Next <span class="fa fa-arrow-circle-right"></span></a> <a href="{{ next.link|e }}" class="btn btn-neutral float-right" title="{{ next.title|striptags|e }}" accesskey="n">{{ _('Next') }} <span class="fa fa-arrow-circle-right"></span></a>
{% endif %} {% endif %}
{% if prev %} {% if prev %}
<a href="{{ prev.link|e }}" class="btn btn-neutral" title="{{ prev.title|striptags|e }}" accesskey="p"><span class="fa fa-arrow-circle-left"></span> Previous</a> <a href="{{ prev.link|e }}" class="btn btn-neutral" title="{{ prev.title|striptags|e }}" accesskey="p"><span class="fa fa-arrow-circle-left"></span> {{ _('Previous') }}</a>
{% endif %} {% endif %}
</div> </div>
{% endif %} {% endif %}

View File

@ -1,7 +1,7 @@
{%- if builder != 'singlehtml' %} {%- if builder != 'singlehtml' %}
<div role="search"> <div role="search">
<form id="rtd-search-form" class="wy-form" action="{{ pathto('search') }}" method="get"> <form id="rtd-search-form" class="wy-form" action="{{ pathto('search') }}" method="get">
<input type="text" name="q" placeholder="Search docs" /> <input type="text" name="q" placeholder="{{ _('Search docs') }}" />
<input type="hidden" name="check_keywords" value="yes" /> <input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" /> <input type="hidden" name="area" value="default" />
</form> </form>

View File

@ -2,34 +2,34 @@
{# Add rst-badge after rst-versions for small badge style. #} {# Add rst-badge after rst-versions for small badge style. #}
<div class="rst-versions" data-toggle="rst-versions" role="note" aria-label="versions"> <div class="rst-versions" data-toggle="rst-versions" role="note" aria-label="versions">
<span class="rst-current-version" data-toggle="rst-current-version"> <span class="rst-current-version" data-toggle="rst-current-version">
<span class="fa fa-book"> Read the Docs</span> <span class="fa fa-book"> {{ _('Read the Docs') }}</span>
v: {{ current_version }} v: {{ current_version }}
<span class="fa fa-caret-down"></span> <span class="fa fa-caret-down"></span>
</span> </span>
<div class="rst-other-versions"> <div class="rst-other-versions">
<dl> <dl>
<dt>Versions</dt> <dt>{{ _('Versions') }}</dt>
{% for slug, url in versions %} {% for slug, url in versions %}
<dd><a href="{{ url }}">{{ slug }}</a></dd> <dd><a href="{{ url }}">{{ slug }}</a></dd>
{% endfor %} {% endfor %}
</dl> </dl>
<dl> <dl>
<dt>Downloads</dt> <dt>{{ _('Downloads') }}</dt>
{% for type, url in downloads %} {% for type, url in downloads %}
<dd><a href="{{ url }}">{{ type }}</a></dd> <dd><a href="{{ url }}">{{ type }}</a></dd>
{% endfor %} {% endfor %}
</dl> </dl>
<dl> <dl>
<dt>On Read the Docs</dt> <dt>{{ _('On Read the Docs') }}</dt>
<dd> <dd>
<a href="//{{ PRODUCTION_DOMAIN }}/projects/{{ slug }}/?fromdocs={{ slug }}">Project Home</a> <a href="//{{ PRODUCTION_DOMAIN }}/projects/{{ slug }}/?fromdocs={{ slug }}">{{ _('Project Home') }}</a>
</dd> </dd>
<dd> <dd>
<a href="//{{ PRODUCTION_DOMAIN }}/builds/{{ slug }}/?fromdocs={{ slug }}">Builds</a> <a href="//{{ PRODUCTION_DOMAIN }}/builds/{{ slug }}/?fromdocs={{ slug }}">{{ _('Builds') }}</a>
</dd> </dd>
</dl> </dl>
<hr/> <hr/>
Free document hosting provided by <a href="http://www.readthedocs.org">Read the Docs</a>. {% trans %}Free document hosting provided by <a href="http://www.readthedocs.org">Read the Docs</a>.{% endtrans %}
</div> </div>
</div> </div>