diff --git a/docs/_static/copy.js b/docs/_static/copy.js index f70e3d67ad8b..156418d81a6c 100644 --- a/docs/_static/copy.js +++ b/docs/_static/copy.js @@ -9,7 +9,7 @@ const copy = async (obj) => { icon.textContent = COPIED; setTimeout(() => (icon.textContent = COPY), 2500); }, - (r) => alert('Could not copy codeblock:\n' + r.toString()) + (r) => alert(DPY_TRANSLATIONS.copy_code_error + '\n' + r.toString()) ); }; @@ -21,8 +21,8 @@ document.addEventListener("DOMContentLoaded", () => { let copyEl = document.createElement("span"); copyEl.addEventListener('click', () => copy(codeblock)); copyEl.className = "copy"; - copyEl.setAttribute("aria-label", "Copy Code"); - copyEl.setAttribute("title", "Copy Code"); + copyEl.setAttribute("aria-label", DPY_TRANSLATIONS.copy_code); + copyEl.setAttribute("title", DPY_TRANSLATIONS.copy_code); let copyIcon = document.createElement("span"); copyIcon.className = "material-icons"; diff --git a/docs/_templates/layout.html b/docs/_templates/layout.html index 229da72c46fa..2cba594e5f1d 100644 --- a/docs/_templates/layout.html +++ b/docs/_templates/layout.html @@ -21,6 +21,16 @@ {%- block scripts %} + {#- In order to allow strings to be translated, they must be passed to gettext here #} + {#- Any user-facing string that is translated must be in this object #} + {#- Note that these can only be simple key-value translations #} + {#- If something better comes along this will be removed #} + {%- for js in script_files %} {{ js_tag(js) }} {%- endfor %} @@ -61,7 +71,7 @@ discord.py github discord - help_center + help_center {#- If we have more links we can put them here #} search @@ -157,7 +167,7 @@