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

Translating the package guide to spanish 🚀 #287

Closed
flpm opened this issue May 30, 2024 · 7 comments
Closed

Translating the package guide to spanish 🚀 #287

flpm opened this issue May 30, 2024 · 7 comments
Labels
pyconus-24 translations Translation and localization of content

Comments

@flpm
Copy link
Member

flpm commented May 30, 2024

Have you considered translating the Python Packaging Guide into other languages?

During PyCon US I got to help with translating Flask documentation into Spanish and had a chance to see how they use sphinx-intl to enable internationalization.

The process is quite simple and, as a test, I reproduced the setup and translated a few strings into Spanish. The 'docs-live' session in nox even updates the browser as you are translating so you can see the context around it.

Screenshot from 2024-05-30 15-50-51

I am happy to help with that if you think it is interesting. It requires some editorial process to be defined to make sure the translations are accurate (e.g. the Flask Community Working Group assigns a coordinator per language to review translation PRs, etc.) but it creates lots of beginner-friendly opportunities to contribute.

@kierisi
Copy link
Contributor

kierisi commented May 31, 2024

@all-contributors add @flpm for review

Copy link
Contributor

@kierisi

I've put up a pull request to add @flpm! 🎉

@willingc willingc added the translations Translation and localization of content label May 31, 2024
@flpm
Copy link
Member Author

flpm commented Jun 2, 2024

After playing with nox a little more, here is a potential approach:

  1. Create new nox session (e.g. nox --session update-translation-files) that will prepare the translation files for each language in a list (e.g., LANGUAGES = ['es', 'pt']) using sphinx and sphinx-intl. This would create the translation template files (./_build/gettext/*.pot) and the translation files for each language (e.g., ./locales/es/LC_MESSAGES/*.po for Spanish).

  2. Translators work on these .po files, which map strings from the English version to their translated equivalents, and make a PR to update them.

  3. An language editor/coordinator reviews the translation, request changes as needed, and merge the PR.

  4. The current build sessions in nox (docs, docs-test and docs-live) would build the guide and the translations in the language list. The translations would be place in folders under the root of the guide (e.g., _build/html/es/ for Spanish) and would be accessed in the site in the same (https://www.pyopensci.org/python-package-guide/es/index.html)

As the guide evolves, the update-translation-files session will keep the translation files up to date with new strings and changes. To start translation into a new language, just add to the list and run the nox session to create the new translation files for that new language.

I was able to prototype this and I think it is very doable.

@lwasser
Copy link
Member

lwasser commented Jun 6, 2024

this is incredible. i left a note on your pr. but i'm SOOO thrilled to see this is even possible with infrastructure support. i'm really sorry that i'm so behind on pr's @flpm i'm trying to chip away at everything. it is all so good!

@lwasser lwasser changed the title Translating the package guide Translating the package guide to spanish 🚀 Jun 6, 2024
@lwasser
Copy link
Member

lwasser commented Jul 11, 2024

@flpm i am going through issues now - Given you have added the appropriate infrastructure to support this, can now close this issue in favor of #313 ?

@flpm
Copy link
Member Author

flpm commented Jul 11, 2024

Sure, the one can be closed

@lwasser
Copy link
Member

lwasser commented Jul 11, 2024

great - thanks!! @flpm i invited a few folks to our slack who want to help with the spanish translation!! i met them in our packaging workshop :) i'll be sure to connect everyone!

in the meantime i'm closing this!!

@lwasser lwasser closed this as completed Jul 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pyconus-24 translations Translation and localization of content
Projects
Development

No branches or pull requests

4 participants