Skip to content

Commit

Permalink
trainling whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
Carreau committed Aug 28, 2024
1 parent ec2c747 commit b3dacbd
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 31 deletions.
10 changes: 5 additions & 5 deletions docs/community/topics/i18n.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Remember to `manually escape variables <https://jinja.palletsprojects.com/en/2.1
For example, to mark the text "Next page" as translatable, you would write:

.. code-block:: jinja
<button type="button">
{{- _("Next page") -}}
</button>
Expand All @@ -54,7 +54,7 @@ When you add or change natural language text in the theme, you must update the m
#. Generate/update the message catalog template (``POT`` file):

.. code-block:: bash
tox run -e i18n-extract
#. Update the message catalogs (``PO`` files) for the existing locales:
Expand Down Expand Up @@ -90,7 +90,7 @@ To add a new language, follow these steps:
#. Make a copy of the ``POT`` file for this new language:

.. code-block:: bash
# for example, to add Quechua (ISO 639-1 code: qu)
tox -e i18n-new-locale -- qu
Expand All @@ -108,7 +108,7 @@ To contribute translations, follow these steps:

#. Sign up for a `Transifex account <https://www.transifex.com/signup/>`__.
#. Join the `PyData Sphinx Theme project <https://explore.transifex.com/12rambau/pydata-sphinx-theme/>`__.
#. Select the language you want to translate. If the language you are looking for is not listed, you can `open an issue
#. Select the language you want to translate. If the language you are looking for is not listed, you can `open an issue
on GitHub to request it <https://github.com/pydata/pydata-sphinx-theme/issues>`__.
#. Now you are ready to start translating the theme. If you are new to Transifex you can visit the `Transifex documentation <https://help.transifex.com/en/articles/6240403-translating-html-content>`__ for more information.

Expand All @@ -132,7 +132,7 @@ Otherwise, the word order in other languages can be incorrect. In a Jinja templa
.. code-block:: jinja
{% 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.

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:
Expand Down
2 changes: 1 addition & 1 deletion docs/user_guide/i18n.rst
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ Note you will also need to install `pybabel <https://babel.pocoo.org/en/latest/i
# for example, to add French (ISO 639-1 code: fr)
pybabel init --input-file=locale/messages.pot --domain=messages --output-dir=locale --locale=fr
#. Translate the message catalog by editing the file.
Expand Down
13 changes: 0 additions & 13 deletions src/pydata_sphinx_theme/locale/ru/LC_MESSAGES/sphinx.po
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,6 @@
#
msgid ""
msgstr ""
"Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2024-08-20 12:53+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language: ru\n"
"Language-Team: ru <[email protected]>\n"
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && "
"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 2.16.0\n"

#: docs/conf.py:108
msgid "Click to expand"
Expand Down
12 changes: 0 additions & 12 deletions src/pydata_sphinx_theme/locale/zh/LC_MESSAGES/sphinx.po
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,6 @@
#
msgid ""
msgstr ""
"Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2024-08-20 12:53+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language: zh\n"
"Language-Team: zh <[email protected]>\n"
"Plural-Forms: nplurals=1; plural=0;\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 2.16.0\n"

#: docs/conf.py:108
msgid "Click to expand"
Expand Down

0 comments on commit b3dacbd

Please sign in to comment.