diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 6fa7f1fa5..442dfcd97 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -20,6 +20,9 @@ jobs: uses: actions/setup-python@v4 with: python-version: "3.9" + - name: Install gettext for translations + run: | + sudo apt-get install gettext - name: Build package run: | python -m pip install -U pip build diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 47d1e7a13..7012dd3c5 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -84,6 +84,10 @@ jobs: python -m pip install -e .[test] sphinx==${{ matrix.sphinx-version }} - name: Show installed versions run: python -m pip list + - name: Compile MO files + run: | + pip install nox + nox -s compile - name: Run tests run: pytest --color=yes --cov pydata_sphinx_theme --cov-branch --cov-report term-missing:skip-covered --cov-fail-under ${{ env.COVERAGE_THRESHOLD }} diff --git a/.gitignore b/.gitignore index 802955843..8483ed852 100644 --- a/.gitignore +++ b/.gitignore @@ -46,10 +46,6 @@ coverage.xml *.cover .hypothesis/ -# Translations -*.mo -*.pot - # Django stuff: *.log local_settings.py @@ -113,11 +109,15 @@ node_modules/ .vscode .idea +# MacOSX store files +**/.DS_Store + +# THEME FILES # files from the gallery screenshots docs/_static/gallery # Our site profile tests profile.svg -# MacOSX store files -**/.DS_Store +# Compiled translation files (are compiled at build time) +src/pydata_sphinx_theme/locale/*/*/*.mo diff --git a/babel.cfg b/babel.cfg new file mode 100644 index 000000000..6d040b9b9 --- /dev/null +++ b/babel.cfg @@ -0,0 +1,5 @@ +# See https://github.com/sphinx-doc/sphinx/blob/6.1.x/babel.cfg +[jinja2: **.html] +encoding = utf-8 +ignore_tags = script,style +include_attrs = alt title summary placeholder diff --git a/docs/community/topics/i18n.rst b/docs/community/topics/i18n.rst index 6f52941f3..68a8d0da7 100644 --- a/docs/community/topics/i18n.rst +++ b/docs/community/topics/i18n.rst @@ -65,14 +65,26 @@ These steps cover how to add or change text that has been marked as translateabl pybabel extract . -F babel.cfg -o src/pydata_sphinx_theme/locale/sphinx.pot -k '_ __ l_ lazy_gettext' + **To run this in ``.nox``**: ``nox -s translate -- extract``. + #. Update the message catalogs (``PO`` files) with `the PyBabel update command `__: .. code-block:: bash pybabel update -i src/pydata_sphinx_theme/locale/sphinx.pot -d src/pydata_sphinx_theme/locale -D sphinx + **To run this in ``.nox``**: ``nox -s translate -- update``. + + This will update these files with new information about the position and text of the language you have modified. +If you *only* change non-translatable text (like HTML markup), the `extract` and `update` commands will only update the positions (line numbers) of the translatable strings. Updating positions is optional - the line numbers are to inform the human translator, not to perform the translation. + +If you change translatable strings, the `extract` command will extract the new or updated strings to the POT file, and the `update` command will try to fuzzy match the new or updated strings with existing translations in the PO files. +If there is a fuzzy match, a comment like `#, fuzzy` is added before the matched entry. +Otherwise, a new entry is added and needs to be translated. + + .. _translating-the-theme: Add translations to translateable text @@ -92,13 +104,41 @@ This section covers how to do so. pybabel init -i src/pydata_sphinx_theme/locale/sphinx.pot -d src/pydata_sphinx_theme/locale -D sphinx -l es + **To run this in ``.nox``**: ``nox -s translate -- init es`` + #. Edit the language's message catalog at ``pydata_sphinx_theme/locale/es/LC_MESSAGES/sphinx.po``. For each source string introduced by the ``msgid`` keyword, add its translation after the ``msgstr`` keyword. #. Compile the message catalogs of every language. This creates or updates the MO files with `PyBabel compile `__: -.. code-block:: bash + .. code-block:: bash + + pybabel compile -d src/pydata_sphinx_theme/locale -D sphinx + + **To run this in ``.nox``**: ``nox -s translate -- compile``. + +Translation tips +---------------- + +Translate phrases, not words +```````````````````````````` + +Full sentences and clauses must always be a single translatable string. +Otherwise, you can get ``next page`` translated as ``suivant page`` instead of as ``page suivante``, etc. + +Deal with variables and markup in translations +````````````````````````````````````````````````````````````` + +If a variable (like the ``edit_page_provider_name`` theme option) is used as part of a phrase, it must be included within the translatable string. +Otherwise, the word order in other languages can be incorrect. +In a Jinja template, simply surround the translatable string with ``{% trans variable=variable %}`` and ``{% endtrans %}}`. +For example: ``{% trans provider=provider %}Edit on {{ provider }}{% endtrans %}`` +The translatable string is extracted as the Python format string ``Edit on %(provider)s``. +This is so that the same translatable string can be used in both Python code and Jinja templates. +It is the translator's responsibility to use ``%(provider)s`` verbatim in the translation. - pybabel compile -d src/pydata_sphinx_theme/locale -D sphinx +If a non-translatable word or token (like HTML markup) is used as part of a phrase, it must also be included within the translatable string. +For example: ``{% trans theme_version=theme_version|e %}Built with the PyData Sphinx Theme {{ theme_version }}.{% endtrans %}`` +It is the translator's responsibility to use the HTML markup verbatim in the translation. References diff --git a/noxfile.py b/noxfile.py index 35a1b2edc..ea9a809f1 100644 --- a/noxfile.py +++ b/noxfile.py @@ -8,6 +8,7 @@ """ import nox from pathlib import Path +from shlex import split nox.options.reuse_existing_virtualenvs = True @@ -35,6 +36,10 @@ def _should_install(session): return should_install +def _compile_translations(session): + session.run(*split("pybabel compile -d src/pydata_sphinx_theme/locale -D sphinx")) + + @nox.session(name="compile") def compile(session): """Compile the theme's web assets with sphinx-theme-builder.""" @@ -55,6 +60,7 @@ def docs(session): @nox.session(name="docs-live") def docs_live(session): """Build the docs with a live server that re-loads as you make changes.""" + _compile_translations(session) if _should_install(session): session.install("-e", ".[doc]") session.install("sphinx-theme-builder[cli]") @@ -66,6 +72,7 @@ def test(session): """Run the test suite.""" if _should_install(session): session.install("-e", ".[test]") + _compile_translations(session) session.run("pytest", *session.posargs) @@ -79,6 +86,38 @@ def test_sphinx(session, sphinx): session.run("pytest", *session.posargs) +@nox.session() +def translate(session): + """Translation commands. Available commands after `--` : extract, update, compile""" + session.install("Babel") + if "extract" in session.posargs: + session.run( + *split( + "pybabel extract . -F babel.cfg -o src/pydata_sphinx_theme/locale/sphinx.pot -k '_ __ l_ lazy_gettext'" + ) + ) + elif "update" in session.posargs: + session.run( + *split( + "pybabel update -i src/pydata_sphinx_theme/locale/sphinx.pot -d src/pydata_sphinx_theme/locale -D sphinx" + ) + ) + elif "compile" in session.posargs: + _compile_translations(session) + elif "init" in session.posargs: + language = session.posargs[-1] + session.run( + *split( + f"pybabel init -i src/pydata_sphinx_theme/locale/sphinx.pot -d src/pydata_sphinx_theme/locale -D sphinx -l {language}" + ) + ) + else: + print( + "No translate command found. Use like: `nox -s translate -- COMMAND`." + "\n\n Available commands: extract, update, compile, init" + ) + + @nox.session(name="profile") def profile(session): """Generate a profile chart with py-spy. The chart will be placed at profile.svg.""" diff --git a/pyproject.toml b/pyproject.toml index d6d78bcdd..de750fc33 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -9,7 +9,8 @@ additional-compiled-static-assets = [ "webpack-macros.html", "vendor/", "styles/bootstrap.css", - "scripts/bootstrap.js" + "scripts/bootstrap.js", + "locale/" ] [project] @@ -24,6 +25,7 @@ dependencies = [ "beautifulsoup4", "docutils!=0.17.0", "packaging", + "Babel", "pygments>=2.7", "accessible-pygments" ] diff --git a/src/pydata_sphinx_theme/__init__.py b/src/pydata_sphinx_theme/__init__.py index 3f787cc89..bbf080920 100644 --- a/src/pydata_sphinx_theme/__init__.py +++ b/src/pydata_sphinx_theme/__init__.py @@ -1160,6 +1160,9 @@ def setup(app): app.connect("build-finished", _overwrite_pygments_css) app.connect("build-finished", copy_logo_images) + # https://www.sphinx-doc.org/en/master/extdev/i18n.html#extension-internationalization-i18n-and-localization-l10n-using-i18n-api + app.add_message_catalog("sphinx", here / "locale") + # Include component templates app.config.templates_path.append(str(theme_path / "components")) diff --git a/src/pydata_sphinx_theme/locale/en/LC_MESSAGES/sphinx.po b/src/pydata_sphinx_theme/locale/en/LC_MESSAGES/sphinx.po new file mode 100644 index 000000000..96bd5070f --- /dev/null +++ b/src/pydata_sphinx_theme/locale/en/LC_MESSAGES/sphinx.po @@ -0,0 +1,157 @@ +# English translations for pydata-sphinx-theme. +# Copyright (C) 2023 PyData developers +# This file is distributed under the same license as the pydata-sphinx-theme project. +# +msgid "" +msgstr "" +"Project-Id-Version: PROJECT VERSION\n" +"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" +"POT-Creation-Date: 2023-02-16 14:32-0500\n" +"PO-Revision-Date: 2023-02-16 13:19-0500\n" +"Last-Translator: FULL NAME \n" +"Language: en\n" +"Language-Team: en \n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.11.0\n" + +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/layout.html:50 +msgid "Skip to main content" +msgstr "" + +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/search-button.html:7 +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/search.html:5 +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/search.html:28 +msgid "Search" +msgstr "" + +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/search.html:8 +msgid "Error" +msgstr "" + +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/search.html:9 +msgid "Please activate JavaScript to enable the search functionality." +msgstr "" + +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/breadcrumbs.html:12 +msgid "Breadcrumbs" +msgstr "" + +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/breadcrumbs.html:13 +msgid "Breadcrumb" +msgstr "" + +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/breadcrumbs.html:16 +msgid "Home" +msgstr "" + +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/copyright.html:4 +#, python-format +msgid "© Copyright %(copyright)s." +msgstr "" + +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/copyright.html:7 +#, python-format +msgid "© Copyright %(copyright)s." +msgstr "" + +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/edit-this-page.html:9 +#, python-format +msgid "Edit on %(provider)s" +msgstr "" + +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/edit-this-page.html:11 +msgid "Edit" +msgstr "" + +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/icon-links.html:31 +msgid "GitHub" +msgstr "" + +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/icon-links.html:32 +msgid "GitLab" +msgstr "" + +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/icon-links.html:33 +msgid "Bitbucket" +msgstr "" + +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/icon-links.html:34 +msgid "Twitter" +msgstr "" + +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/indices.html:2 +msgid "Indices" +msgstr "" + +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/indices.html:9 +msgid "General Index" +msgstr "" + +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/indices.html:13 +msgid "Global Module Index" +msgstr "" + +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/indices.html:17 +msgid "Python Module Index" +msgstr "" + +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/last-updated.html:2 +#, python-format +msgid "Last updated on %(last_updated)s." +msgstr "" + +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/navbar-nav.html:5 +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/navbar-nav.html:6 +msgid "Site Navigation" +msgstr "" + +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/page-toc.html:4 +msgid "On this page" +msgstr "" + +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/sidebar-nav-bs.html:2 +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/sidebar-nav-bs.html:3 +msgid "Section Navigation" +msgstr "" + +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/sourcelink.html:4 +msgid "Show Source" +msgstr "" + +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/sphinx-version.html:3 +#, python-format +msgid "" +"Created using Sphinx " +"%(sphinx_version)s." +msgstr "" + +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/theme-switcher.html:5 +msgid "light/dark" +msgstr "" + +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/theme-version.html:2 +#, python-format +msgid "" +"Built with the PyData Sphinx Theme " +"%(theme_version)s." +msgstr "" + +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/footer-article/prev-next.html:6 +msgid "previous page" +msgstr "" + +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/footer-article/prev-next.html:9 +msgid "previous" +msgstr "" + +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/footer-article/prev-next.html:17 +msgid "next page" +msgstr "" + +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/footer-article/prev-next.html:19 +msgid "next" +msgstr "" diff --git a/src/pydata_sphinx_theme/locale/es/LC_MESSAGES/sphinx.po b/src/pydata_sphinx_theme/locale/es/LC_MESSAGES/sphinx.po new file mode 100644 index 000000000..b9464f5ea --- /dev/null +++ b/src/pydata_sphinx_theme/locale/es/LC_MESSAGES/sphinx.po @@ -0,0 +1,163 @@ +# Spanish translations for PROJECT. +# Copyright (C) 2023 ORGANIZATION +# This file is distributed under the same license as the PROJECT project. +# FIRST AUTHOR , 2023. +# +msgid "" +msgstr "" +"Project-Id-Version: PROJECT VERSION\n" +"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" +"POT-Creation-Date: 2023-02-16 14:32-0500\n" +"PO-Revision-Date: 2023-02-16 13:23-0500\n" +"Last-Translator: FULL NAME \n" +"Language: es\n" +"Language-Team: es \n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.11.0\n" + +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/layout.html:50 +msgid "Skip to main content" +msgstr "Saltar al contenido principal" + +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/search-button.html:7 +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/search.html:5 +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/search.html:28 +msgid "Search" +msgstr "Buscar" + +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/search.html:8 +msgid "Error" +msgstr "Error" + +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/search.html:9 +msgid "Please activate JavaScript to enable the search functionality." +msgstr "Por favor, active JavaScript para habilitar la funcionalidad de búsqueda." + +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/breadcrumbs.html:12 +msgid "Breadcrumbs" +msgstr "Migas de pan" + +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/breadcrumbs.html:13 +msgid "Breadcrumb" +msgstr "Miga de pan" + +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/breadcrumbs.html:16 +msgid "Home" +msgstr "Inicio" + +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/copyright.html:4 +#, python-format +msgid "© Copyright %(copyright)s." +msgstr "© Copyright %(copyright)s." + +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/copyright.html:7 +#, python-format +msgid "© Copyright %(copyright)s." +msgstr "© Copyright %(copyright)s." + +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/edit-this-page.html:9 +#, python-format +msgid "Edit on %(provider)s" +msgstr "Editar en %(provider)s" + +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/edit-this-page.html:11 +msgid "Edit" +msgstr "Editar" + +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/icon-links.html:31 +msgid "GitHub" +msgstr "GitHub" + +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/icon-links.html:32 +msgid "GitLab" +msgstr "GitLab" + +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/icon-links.html:33 +msgid "Bitbucket" +msgstr "Bitbucket" + +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/icon-links.html:34 +msgid "Twitter" +msgstr "Twitter" + +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/indices.html:2 +msgid "Indices" +msgstr "Índices" + +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/indices.html:9 +msgid "General Index" +msgstr "Índice General" + +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/indices.html:13 +msgid "Global Module Index" +msgstr "Índice Global de Módulos" + +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/indices.html:17 +msgid "Python Module Index" +msgstr "Índice de Módulos Python" + +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/last-updated.html:2 +#, python-format +msgid "Last updated on %(last_updated)s." +msgstr "Actualizado por última vez en %(last_updated)s." + +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/navbar-nav.html:5 +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/navbar-nav.html:6 +msgid "Site Navigation" +msgstr "Navegación del sitio" + +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/page-toc.html:4 +msgid "On this page" +msgstr "En esta página" + +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/sidebar-nav-bs.html:2 +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/sidebar-nav-bs.html:3 +msgid "Section Navigation" +msgstr "Navegación del sección" + +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/sourcelink.html:4 +msgid "Show Source" +msgstr "Mostrar el código" + +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/sphinx-version.html:3 +#, python-format +msgid "" +"Created using Sphinx " +"%(sphinx_version)s." +msgstr "" +"Creado usando Sphinx " +"%(sphinx_version)s." + +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/theme-switcher.html:5 +msgid "light/dark" +msgstr "claro/oscuro" + +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/theme-version.html:2 +#, python-format +msgid "" +"Built with the PyData Sphinx Theme " +"%(theme_version)s." +msgstr "" +"Construido con el Tema PyData Sphinx " +"%(theme_version)s." + +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/footer-article/prev-next.html:6 +msgid "previous page" +msgstr "página anterior" + +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/footer-article/prev-next.html:9 +msgid "previous" +msgstr "anterior" + +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/footer-article/prev-next.html:17 +msgid "next page" +msgstr "siguiente página" + +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/footer-article/prev-next.html:19 +msgid "next" +msgstr "siguiente" diff --git a/src/pydata_sphinx_theme/locale/fr/LC_MESSAGES/sphinx.po b/src/pydata_sphinx_theme/locale/fr/LC_MESSAGES/sphinx.po new file mode 100644 index 000000000..d92422c68 --- /dev/null +++ b/src/pydata_sphinx_theme/locale/fr/LC_MESSAGES/sphinx.po @@ -0,0 +1,163 @@ +# French translations for PROJECT. +# Copyright (C) 2023 ORGANIZATION +# This file is distributed under the same license as the PROJECT project. +# FIRST AUTHOR , 2023. +# +msgid "" +msgstr "" +"Project-Id-Version: PROJECT VERSION\n" +"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" +"POT-Creation-Date: 2023-02-16 14:32-0500\n" +"PO-Revision-Date: 2023-02-16 13:23-0500\n" +"Last-Translator: FULL NAME \n" +"Language: fr\n" +"Language-Team: fr \n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.11.0\n" + +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/layout.html:50 +msgid "Skip to main content" +msgstr "Passer au contenu principal" + +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/search-button.html:7 +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/search.html:5 +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/search.html:28 +msgid "Search" +msgstr "Recherche" + +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/search.html:8 +msgid "Error" +msgstr "Erreur" + +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/search.html:9 +msgid "Please activate JavaScript to enable the search functionality." +msgstr "Veuillez activer le JavaScript pour que la recherche fonctionne." + +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/breadcrumbs.html:12 +msgid "Breadcrumbs" +msgstr "Fils d'Ariane" + +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/breadcrumbs.html:13 +msgid "Breadcrumb" +msgstr "Fil d'Ariane" + +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/breadcrumbs.html:16 +msgid "Home" +msgstr "Acceuil" + +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/copyright.html:4 +#, python-format +msgid "© Copyright %(copyright)s." +msgstr "© Copyright %(copyright)s." + +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/copyright.html:7 +#, python-format +msgid "© Copyright %(copyright)s." +msgstr "© Copyright %(copyright)s." + +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/edit-this-page.html:9 +#, python-format +msgid "Edit on %(provider)s" +msgstr "Modifier sur %(provider)s" + +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/edit-this-page.html:11 +msgid "Edit" +msgstr "Modifier" + +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/icon-links.html:31 +msgid "GitHub" +msgstr "GitHub" + +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/icon-links.html:32 +msgid "GitLab" +msgstr "GitLab" + +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/icon-links.html:33 +msgid "Bitbucket" +msgstr "Bitbucket" + +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/icon-links.html:34 +msgid "Twitter" +msgstr "Twitter" + +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/indices.html:2 +msgid "Indices" +msgstr "Indices" + +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/indices.html:9 +msgid "General Index" +msgstr "Index général" + +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/indices.html:13 +msgid "Global Module Index" +msgstr "Index général des modules" + +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/indices.html:17 +msgid "Python Module Index" +msgstr "Index des modules Python" + +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/last-updated.html:2 +#, python-format +msgid "Last updated on %(last_updated)s." +msgstr "Mis à jour le %(last_updated)s." + +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/navbar-nav.html:5 +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/navbar-nav.html:6 +msgid "Site Navigation" +msgstr "Navigation du site" + +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/page-toc.html:4 +msgid "On this page" +msgstr "Sur cette page" + +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/sidebar-nav-bs.html:2 +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/sidebar-nav-bs.html:3 +msgid "Section Navigation" +msgstr "Navigation de la section" + +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/sourcelink.html:4 +msgid "Show Source" +msgstr "Montrer le code source" + +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/sphinx-version.html:3 +#, python-format +msgid "" +"Created using Sphinx " +"%(sphinx_version)s." +msgstr "" +"Créé en utilisant Sphinx " +"%(sphinx_version)s." + +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/theme-switcher.html:5 +msgid "light/dark" +msgstr "clair/sombre" + +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/theme-version.html:2 +#, python-format +msgid "" +"Built with the PyData Sphinx Theme " +"%(theme_version)s." +msgstr "" +"Construit avec le Thème PyData Sphinx " +"%(theme_version)s." + +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/footer-article/prev-next.html:6 +msgid "previous page" +msgstr "page précédente" + +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/footer-article/prev-next.html:9 +msgid "previous" +msgstr "précédente" + +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/footer-article/prev-next.html:17 +msgid "next page" +msgstr "page suivante" + +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/footer-article/prev-next.html:19 +msgid "next" +msgstr "suivante" diff --git a/src/pydata_sphinx_theme/locale/sphinx.pot b/src/pydata_sphinx_theme/locale/sphinx.pot new file mode 100644 index 000000000..994360230 --- /dev/null +++ b/src/pydata_sphinx_theme/locale/sphinx.pot @@ -0,0 +1,157 @@ +# Translations template for PROJECT. +# Copyright (C) 2023 ORGANIZATION +# This file is distributed under the same license as the PROJECT project. +# FIRST AUTHOR , 2023. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PROJECT VERSION\n" +"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" +"POT-Creation-Date: 2023-02-16 14:32-0500\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.9.1\n" + +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/layout.html:50 +msgid "Skip to main content" +msgstr "" + +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/search-button.html:7 +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/search.html:5 +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/search.html:28 +msgid "Search" +msgstr "" + +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/search.html:8 +msgid "Error" +msgstr "" + +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/search.html:9 +msgid "Please activate JavaScript to enable the search functionality." +msgstr "" + +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/breadcrumbs.html:12 +msgid "Breadcrumbs" +msgstr "" + +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/breadcrumbs.html:13 +msgid "Breadcrumb" +msgstr "" + +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/breadcrumbs.html:16 +msgid "Home" +msgstr "" + +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/copyright.html:4 +#, python-format +msgid "© Copyright %(copyright)s." +msgstr "" + +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/copyright.html:7 +#, python-format +msgid "© Copyright %(copyright)s." +msgstr "" + +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/edit-this-page.html:9 +#, python-format +msgid "Edit on %(provider)s" +msgstr "" + +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/edit-this-page.html:11 +msgid "Edit" +msgstr "" + +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/icon-links.html:31 +msgid "GitHub" +msgstr "" + +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/icon-links.html:32 +msgid "GitLab" +msgstr "" + +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/icon-links.html:33 +msgid "Bitbucket" +msgstr "" + +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/icon-links.html:34 +msgid "Twitter" +msgstr "" + +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/indices.html:2 +msgid "Indices" +msgstr "" + +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/indices.html:9 +msgid "General Index" +msgstr "" + +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/indices.html:13 +msgid "Global Module Index" +msgstr "" + +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/indices.html:17 +msgid "Python Module Index" +msgstr "" + +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/last-updated.html:2 +#, python-format +msgid "Last updated on %(last_updated)s." +msgstr "" + +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/navbar-nav.html:5 +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/navbar-nav.html:6 +msgid "Site Navigation" +msgstr "" + +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/page-toc.html:4 +msgid "On this page" +msgstr "" + +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/sidebar-nav-bs.html:2 +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/sidebar-nav-bs.html:3 +msgid "Section Navigation" +msgstr "" + +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/sourcelink.html:4 +msgid "Show Source" +msgstr "" + +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/sphinx-version.html:3 +#, python-format +msgid "" +"Created using Sphinx " +"%(sphinx_version)s." +msgstr "" + +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/theme-switcher.html:5 +msgid "light/dark" +msgstr "" + +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/theme-version.html:2 +#, python-format +msgid "" +"Built with the PyData Sphinx Theme " +"%(theme_version)s." +msgstr "" + +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/footer-article/prev-next.html:6 +msgid "previous page" +msgstr "" + +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/footer-article/prev-next.html:9 +msgid "previous" +msgstr "" + +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/footer-article/prev-next.html:17 +msgid "next page" +msgstr "" + +#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/footer-article/prev-next.html:19 +msgid "next" +msgstr "" diff --git a/src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/breadcrumbs.html b/src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/breadcrumbs.html index c9e9cf067..d5c73b7de 100644 --- a/src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/breadcrumbs.html +++ b/src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/breadcrumbs.html @@ -9,11 +9,11 @@ {#- Hide breadcrumbs on the home page #} {% if title and pagename != root_doc %} -