Skip to content
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

Start spanish translation #309

Merged
merged 3 commits into from
Jun 28, 2024
Merged

Conversation

flpm
Copy link
Member

@flpm flpm commented Jun 28, 2024

This PR adds the beginning of the Spanish translation, it is related to #298 and #304.

What was done

  • Translated the guide homepage (index.md) into Spanish
  • Translated the Tests section into Spanish

How to test

Build the Spanish translation using this command:

nox -s docs-live -- -D language=es

Browse to http://localhost:8000 to browse it.

Note: Once PR #298 is merged, it will add the new nox sessions and building a translation will be easier:

nox -s docs-live-lang -- es

@lwasser
Copy link
Member

lwasser commented Jun 28, 2024

@flpm i'm going to merge this as well. i have this working locally and want to see how it builds!
i am looking at the pydata_sphinx_theme to understand how we ensure the spanish version is published.

In your experience is it published via a drop down that a user can select OR is it something that the browser recognizes and alerts the user of an alternative language?

@lwasser lwasser merged commit 60bc03d into pyOpenSci:main Jun 28, 2024
4 checks passed
@flpm
Copy link
Member Author

flpm commented Jun 28, 2024

It's all handled by sphinx in the build, so when building for Spanish the Spanish locale of the theme will be used.

Right now nox builds translation in folders inside the English guide. So you would go to /es/index.html instead of index.html for the Spanish.

When the docs-test session is run, only translations for languages listed in the RELEASE_LANGUAGES list in the noxfile.py will be built, so when the GitHub action run to publish it will not publish a translation until you officially release it.

@lwasser
Copy link
Member

lwasser commented Jun 28, 2024

ok - that makes sense. I see that RELEASE_LANGUAGES is empty. so we can work on it for a while and then release it when we have the entire thing translated. thank you for helping me understand! i did see in my browser when i was looking at the spanish version i could jump back to the english version. this is really wonderful!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants