Skip to content

Update CI to include Translations from Scientific Python Repo #61380

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

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

goanpeca
Copy link

@goanpeca goanpeca commented Apr 30, 2025

Hello team!

As part of the work that @melissawm is doing to showcase the translations work this PR shows how we could pull the translations from https://github.com/Scientific-Python-Translations/pandas-translations as part of the website build step.


cc @mroeschke

@datapythonista
Copy link
Member

/preview

Copy link
Contributor

Website preview of this PR available at: https://pandas.pydata.org/preview/pandas-dev/pandas/61380/

@datapythonista
Copy link
Member

Thanks @goanpeca for this. Do you mind adding some more context here? I can't see in https://github.com/Scientific-Python-Translations/pandas-translations much information, like what languages are available, or how to fix a bad translation, which would be useful to know.

Also, in the docs generated from this PR I can see any language dropdown or anything different from our current docs. What are we expecting?

@melissawm
Copy link
Contributor

Hi @datapythonista - this is a follow up to #61220, a proof-of-concept CI job to build the website with translations that don't live in this repo. This PR and #61220 are meant to work together and I'm happy to incorporate one into the other once we agree on the general direction and workflow for this.

Let us know if we can answer any other questions. Unfortunately I'm not sure how to get the preview for the other PR, I relied on building locally to test that things were working.

@datapythonista
Copy link
Member

Sorry, I missed #61220 and the issue discussion.

I don't fully understand what you're doing here, but I describe next how to add translations without adding too much complexity in this repo, which I don't think any core dev would be onboard with.

  1. You decide on how to generate translations and manage it independently from this repo, and end up with a structure like this with the translated documents:
+ es/
  - index.md
  + about/
    - team.md
    - ...
  - ...
+ pt/
  - index.md
  + about/
    - team.md
    - ...
  - ...
  1. In our CI, before calling pandas_web.py you download this directory structure to the web/ directory. No other changes needed, this will create all translated pages.
  2. We add a dropdown with the languages to the website (you can add the language list to web/pandas/config.yml)

I think this makes everyone's life easy, and we get the expected result.

@melissawm
Copy link
Contributor

Thanks @datapythonista !

Can you clarify what is missing from #61220 to match your description? That is pretty much what is done in that PR. Maybe this is confusing because we chose to do it in two parts exactly because we wanted to decouple the reorganization of the repo + switcher (in #61220) from the actual translations (this PR).

Happy to follow up with any feedback in the other PR as well. Cheers!

@datapythonista
Copy link
Member

In #61220 you are moving all the current website pages, that should be undone. You are adding the translated pages to this repo, we don't want it. You are making changes to pandas_web.py, this is not needed based on what I described above.

Only changes in a PR to this pandas repo should be addi g a CI step as per step 2, editing the wevsite template with the language dropdown as per step 3.

@melissawm
Copy link
Contributor

I see! I will rework what I have there to match your proposal. Thanks!

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

Successfully merging this pull request may close these issues.

3 participants