-
Notifications
You must be signed in to change notification settings - Fork 327
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Add full i18n support #1192
Merged
Merged
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
bdad814
feat: Add full i18n support
jpmckinney 7485689
fix: Translate entire messages
jpmckinney 2408855
fix: Translate all ARIA labels
jpmckinney 010214d
chore: Fix indentation error
jpmckinney 7d5a2cf
feat: Add ES and FR translation
jpmckinney f0783e6
chore: Move add_message_catalog() to setup()
jpmckinney b6feaa5
chore: Fix interpolation of theme_version
jpmckinney bf0adca
test: Fix case in test fixture
jpmckinney cdbff27
chore: Remove extra newline added by pybabel commands
jpmckinney 415352d
test: Address TODOs in test_translations
jpmckinney bdbbf10
Merge branch 'main' into babelv2
choldgraf ed073ae
Add translation infrastructure
choldgraf 89fd0bc
Add dependency for pybabel
choldgraf f14bae7
Package translations with theme
choldgraf 95027b4
Resolve path with webpack
choldgraf a2dbe91
Resolve path with webpack
choldgraf cc34d28
Babel not pybabel
choldgraf 7b8670f
Apply suggestions from code review
choldgraf eef4c55
ci: Compile MO files for tests
jpmckinney e3c881d
ci: Install nox in run-pytest
jpmckinney File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
157 changes: 157 additions & 0 deletions
157
src/pydata_sphinx_theme/locale/en/LC_MESSAGES/sphinx.po
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 <EMAIL@ADDRESS>\n" | ||
"Language: en\n" | ||
"Language-Team: en <[email protected]>\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 "© <a href=\"%(path)s\">Copyright</a> %(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 <a href=\"https://sphinx-doc.org/\">Sphinx</a> " | ||
"%(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 <a href=\"https://pydata-sphinx-" | ||
"theme.readthedocs.io/en/stable/index.html\">PyData Sphinx Theme</a> " | ||
"%(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 "" |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
current (6.1.x) sphinx has this:
IDK though which is correct for us?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't have strong opinions on this, I suggest we just pick one and see if it has any tangible impact, then change it later if we want. IMO unless we have a strong rationale for excluding
placeholder
, we should just keep it 🤷