packaging.python.org icon indicating copy to clipboard operation
packaging.python.org copied to clipboard

📙 Translate our guides in your native language! 🌍

Open dukecat0 opened this issue 3 years ago • 152 comments

🌐 Start translating in your language at https://hosted.weblate.org/projects/pypa/packaging-python-org/

❓ See additional information in the Contributing Guide section for Translation.

Updated: Nov. 17, 2023


Original post:

Hi,

I would like to ask if there is any translation plan of packaging.python.org?

dukecat0 avatar Jun 26 '21 14:06 dukecat0

Hi @meowmeowmeowcat, no. At the moment nobody raised this question AFAIK. But I like the idea and I think it would be great to set up a translation process. This may require a discussion with other maintainers first, but I'd definitely support such an effort.

webknjaz avatar Jun 27 '21 07:06 webknjaz

@pypa/packaging-user-guide-editors @ewdurbin @di @pradyunsg do you think it'd be possible to use Warehouse's Weblate for this? I think the configuration pointers are present here https://docs.weblate.org/en/latest/devel/sphinx.html.

webknjaz avatar Jun 27 '21 07:06 webknjaz

@meowmeowmeowcat as a side note, the translation would require a dedicated person per language to continuously update the articles as the canonical English versions change and new articles appear. Would you commit to something like this? You'd need to take ownership over curating your language.

webknjaz avatar Jun 27 '21 07:06 webknjaz

I would like to ask if there is any translation plan of packaging.python.org?

None at this time, no.

Sphinx and ReadTheDocs have fairly strong internationalization support -- so if someone is interested in translating and maintaining that translated guide, I'm pretty sure we can make that happen. Personally, I wouldn't be pushing for setting up that infrastructure and figuring those details out, unless someone is actually interested in doing the translation.

pradyunsg avatar Jun 27 '21 07:06 pradyunsg

It would be nice to have packaging.python.org in different languages. I would even contribute to Ukrainian translation time to time, but, unfortunately i cannot constantly look at the original English articles and update translation on daily or weekly basis

anxolerd avatar Jun 27 '21 08:06 anxolerd

@meowmeowmeowcat as a side note, the translation would require a dedicated person per language to continuously update the articles as the canonical English versions change and new articles appear. Would you commit to something like this? You'd need to take ownership over curating your language.

Sure.

dukecat0 avatar Jun 27 '21 09:06 dukecat0

None at this time, no.

Sphinx and ReadTheDocs have fairly strong internationalization support -- so if someone is interested in translating and maintaining that translated guide, I'm pretty sure we can make that happen. Personally, I wouldn't be pushing for setting up that infrastructure and figuring those details out, unless someone is actually interested in doing the translation.

Actually I am interested in doing the translation and that's why I opened this issue. 🤣

dukecat0 avatar Jun 27 '21 09:06 dukecat0

@meowmeowmeowcat it would be useful if somebody checked what we need to start doing this and maybe outlined the mechanics of the whole process. PRs adding the necessary configuration (including CI checks and a guide for translators into existing and new languages) are welcome too.

webknjaz avatar Jun 27 '21 20:06 webknjaz

@webknjaz Is it possible to create a new translation project under pypa on weblate?

dukecat0 avatar Jun 27 '21 23:06 dukecat0

I have already made an example on Weblate.

dukecat0 avatar Jun 28 '21 04:06 dukecat0

So I think here are the few steps we have to do for starting the translation:

  • We should generate .po of the docs for translation (which is done)
  • Put .po files on the Weblate
  • Add Translation CI check
  • Writing a guide for Translators

dukecat0 avatar Jun 28 '21 05:06 dukecat0

@webknjaz Is it possible to create a new translation project under pypa on weblate?

Probably yes. But I don't have such access. That's why I've tagged @di and @ewdurbin earlier — they should have a better answer to how this could be implemented.

webknjaz avatar Jun 28 '21 06:06 webknjaz

  • We should generate .po of the docs for translation (which is done)
  • Put .po files on the Weblate

I think the Weblate bot (integration?) is able to generate those files if set up properly. My understanding is that we'll need to generate them often or even embed this into the merging process. I hope folks who have set it up for Warehouse could shed some light on how it's done.

webknjaz avatar Jun 28 '21 06:06 webknjaz

@webknjaz Is it possible to create a new translation project under pypa on weblate?

Probably yes. But I don't have such access. That's why I've tagged @di and @ewdurbin earlier — they should have a better answer to how this could be implemented.

Okay. Thanks

dukecat0 avatar Jun 28 '21 06:06 dukecat0

I think the Weblate bot (integration?) is able to generate those files if set up properly. My understanding is that we'll need to generate them often or even embed this into the merging process. I hope folks who have set it up for Warehouse could shed some light on how it's done.

So probably we should wait someone answering this before we proceed to the next step.

dukecat0 avatar Jun 28 '21 06:06 dukecat0

@pypa/packaging-user-guide-editors @ewdurbin @di @pradyunsg do you think it'd be possible to use Warehouse's Weblate for this? I think the configuration pointers are present here https://docs.weblate.org/en/latest/devel/sphinx.html.

I think we could add another component under the pypa project on weblate, yes. I'll contact them to ensure that would be OK.

ewdurbin avatar Jun 28 '21 13:06 ewdurbin

@pypa/packaging-user-guide-editors @ewdurbin @di @pradyunsg do you think it'd be possible to use Warehouse's Weblate for this? I think the configuration pointers are present here https://docs.weblate.org/en/latest/devel/sphinx.html.

I think we could add another component under the pypa project on weblate, yes. I'll contact them to ensure that would be OK.

Thanks!

dukecat0 avatar Jun 29 '21 04:06 dukecat0

@ewdurbin Could you add another component under the PyPA project on Weblate, please? The template of translation is located in locales/messages.pot.

dukecat0 avatar Jul 07 '21 04:07 dukecat0

The template of translation is located in locales/messages.pot.

Let's move the generation of this into a GitHub action and stop checking this file into the version control -- the output of this is purely deterministic, and checking it in doesn't really have any direct benefit. And, it's likely a merge conflict honeypot, which... isn't ideal either.

pradyunsg avatar Jul 09 '21 07:07 pradyunsg

@pradyunsg I'm pretty sure it needs to be checked in because Weblate is supposed to pick up the phrases from it per my understanding, I'm pretty sure Warehouse works like this.

webknjaz avatar Jul 09 '21 14:07 webknjaz

https://hosted.weblate.org/projects/pypa/packaging-python-org/ has been created. I'd like to ask for one or two folks involved in managing the translation to create accounts on weblate and share their usernames here so I can add them to administer the component.

ewdurbin avatar Jul 09 '21 15:07 ewdurbin

I'm pretty sure it needs to be checked in

Okay, that sucks. For starters, it doesn't change that we'd need the same automation -- but it'll instead ensure that it's properly generated on each revision instead of just generating it.

It's also a pretty bad state of "updates will need more than just changing the text" in our workflows IMO since it eliminates easy GitHub-UI only changes as well. As an easy example, we'd no longer be able to take GitHub UI driven typo fixes, which... is pretty bad IMO. And, this overhead would likely result in me being significantly less likely to actually write/update the content here myself -- admittedly I haven't done much so we're not losing out on much here, but that might change if other more-active contributors feel similarly.

pradyunsg avatar Jul 09 '21 16:07 pradyunsg

@pradyunsg

Okay, that sucks. For starters, it doesn't change that we'd need the same automation -- but it'll instead ensure that it's properly generated on each revision instead of just generating it.

I think we could come up with some solution pushing the updates to GH automatically, on PR merge, for example. Also, not having the extracted strings in main up-to-date shouldn't be a big deal, we could make sure to update it periodically for starters.

@ewdurbin

I'd like to ask for one or two folks involved in managing the translation to create accounts on weblate and share their usernames here so I can add them to administer the component.

@anxolerd and I have the same usernames as on GitHub, we both worked on the Ukrainian translation of Warehouse. I guess we'd need somebody from a different language background added later.

webknjaz avatar Jul 09 '21 19:07 webknjaz

@webknjaz @pradyunsg Is it possible for us to update messages.pot automatically by Github Action when merging the PR?

dukecat0 avatar Jul 10 '21 03:07 dukecat0

That's what I was thinking

webknjaz avatar Jul 10 '21 06:07 webknjaz

@webknjaz I think a better solution would be opening a new repo (probably called packaging.python.org-l10n) for translations, so the new repo will receive changes in packaging.python.org and update messages.pot constantly. Just like python docs.

dukecat0 avatar Jul 12 '21 09:07 dukecat0

I considered it but I don't see many problems with having a single repo. If it's autoupdated periodically, separately from PRs, it shouldn't cause any disturbance.

webknjaz avatar Jul 12 '21 15:07 webknjaz

So there would be a lot commits from Github Action (probably I should set it to update automatically every three/four days so there won't have so many commits), is this acceptable for this repo? :)

dukecat0 avatar Jul 12 '21 15:07 dukecat0

webknjaz and anxolerd users on Weblate have been added and should have administrative control over the whole PyPA project on Weblate. @webknjaz and @anxolerd please do not modify settings for the warehouse component or glossary without consulting the pypa/warehouse issue tracker.

I'm going to unsubscribe from this thread now. Please mention me again if there is something I need to do.

ewdurbin avatar Jul 12 '21 18:07 ewdurbin

So there would be a lot commits from Github Action (probably I should set it to update automatically every three/four days so there won't have so many commits), is this acceptable for this repo? :)

Absolutely. Note that using a pre-populated GITHUB_TOKEN secret will not generate any events on GitHub meaning there will be no test runs triggered and no GitHub Apps will react to those commits.

webknjaz avatar Jul 12 '21 18:07 webknjaz