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

Let's localize this theme #194

Open
rffontenelle opened this issue Jul 31, 2024 · 6 comments
Open

Let's localize this theme #194

rffontenelle opened this issue Jul 31, 2024 · 6 comments

Comments

@rffontenelle
Copy link
Contributor

While Python docs is available for translation, this theme is still used in English. I see strings marked for translation, but there is no localization infra (no message catalog template; no babel's extract, update, compile, etc. commands set; no translation platform) or workflow set.

Is this project accepting contributions for enabling the theme's localization?

@AA-Turner
Copy link
Member

Is this project accepting contributions for enabling the theme's localization?

I think we should.

Do you have recommendations for what we ought to do?

A

@rffontenelle
Copy link
Contributor Author

rffontenelle commented Jul 31, 2024

Basic steps are:

  • choose a workflow (receive translations and update source messages as a pre-release step during a string freeze, or automatically update source messages and receive translations anytime?)
  • set up a script that runs babel's extract, init, update and compile options (via pybabel or customized Python script that calls babel)
  • optionally set up a translation project in a web-based translation platform like Weblate or Transifex to gather contributions in a more translation-friendly environment (so the translator doesn't have to know how to handle git concepts or GitHub pull requests)

My 2 cents:

  • host translations in Hosted Weblate (free of charge for free/libre software)
  • have a CI workflow that updates POT file whenever there is a new commit; with webhook set, Weblate will make available new strings for every language
  • have a script for running the babel's commands; this script will be used by the CI workflow, and may be used manually by an maintainer (see Sphinx's babel_runner.py and pydata's noxfile.py).

By the way, PyPA uses Weblate for warehouse (PyPI) and for Python Packaging User Guide, and it is awesome.

@StanFromIreland
Copy link

StanFromIreland commented Feb 10, 2025

Any progress? We have the script but it not receiving much use at the moment. Webplate may take some time to set up but maybe PRs in the meantime? (I don't think its that many strings < 50?)

@rffontenelle
Copy link
Contributor Author

My bad. I'll get back to this. Indeed there are not many strings, so it's an easy translation.

@StanFromIreland
Copy link

No worries! Webplate/Transifex might just be overkill for this one. All translations have at least one translator that can submit PRs and I'd say this would under take an hour to translate.

@m-aciek
Copy link
Contributor

m-aciek commented Feb 10, 2025

My opinion: let's use just PO files in the repository, yet without a platform. And move it to Weblate along the Python docs (in the same project, for better discoverability), when it will be set up (hopefully soon).

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

No branches or pull requests

4 participants