|
21 | 21 | <link rel="stylesheet" href="{{ pathto('_static/icons.css', 1)|e }}" type="text/css" />
|
22 | 22 | {%- block scripts %}
|
23 | 23 | <script id="documentation_options" data-url_root="{{ pathto('', 1) }}" src="{{ pathto('_static/documentation_options.js', 1) }}"></script>
|
| 24 | + {#- In order to allow strings to be translated, they must be passed to gettext here #} |
| 25 | + {#- Any user-facing string that is translated must be in this object #} |
| 26 | + {#- Note that these can only be simple key-value translations #} |
| 27 | + {#- If something better comes along this will be removed #} |
| 28 | + <script type="text/javascript"> |
| 29 | + var DPY_TRANSLATIONS = {{ "{" }} |
| 30 | + copy_code: "{{ _('Copy Code') }}", |
| 31 | + copy_code_error: "{{ _('Could not copy codeblock:') }}", |
| 32 | + {{ "}" }} |
| 33 | + </script> |
24 | 34 | {%- for js in script_files %}
|
25 | 35 | {{ js_tag(js) }}
|
26 | 36 | {%- endfor %}
|
|
61 | 71 | <a href="{{ pathto(master_doc)|e }}" class="main-heading">discord.py</a>
|
62 | 72 | <a href="https://github.com/Rapptz/discord.py" title="GitHub"><span class="material-icons custom-icons">github</span></a>
|
63 | 73 | <a href="{{ discord_invite }}" title="{{ _('Discord') }}"><span class="material-icons custom-icons">discord</span></a>
|
64 |
| - <a href="{{ pathto('faq') }}" title="FAQ"><span class="material-icons">help_center</span></a> |
| 74 | + <a href="{{ pathto('faq') }}" title="{{ _('FAQ') }}"><span class="material-icons">help_center</span></a> |
65 | 75 | {#- If we have more links we can put them here #}
|
66 | 76 | <a onclick="mobileSearch.open();" title="{{ _('Search') }}" id="open-search" class="mobile-only"><span class="material-icons">search</span></a>
|
67 | 77 | <a onclick="mobileSearch.close();" title="{{ _('Close') }}" id="close-search" class="mobile-only" hidden><span class="material-icons">close</span></a>
|
|
157 | 167 |
|
158 | 168 | <div id="settings" class="modal" onclick="if (event.target == this){ settingsModal.close(); }" hidden>
|
159 | 169 | <div class="modal-content">
|
160 |
| - <span class="close" onclick="settingsModal.close();" title="Close"> |
| 170 | + <span class="close" onclick="settingsModal.close();" title="{{ _('Close') }}"> |
161 | 171 | <span class="material-icons">close</span>
|
162 | 172 | </span>
|
163 | 173 | <h1>{{ _('Settings') }}</h1>
|
|
199 | 209 | </div>
|
200 | 210 |
|
201 | 211 | <div id="to-top" onclick="scrollToTop()"{%- if READTHEDOCS %} class="is-rtd"{%- endif %} hidden>
|
202 |
| - <span><span class="material-icons">arrow_upward</span> to top</span> |
| 212 | + <span><span class="material-icons">arrow_upward</span> {{ _('to top') }}</span> |
203 | 213 | </div>
|
204 | 214 |
|
205 | 215 | </body>
|
|
0 commit comments