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

πŸ“™ Translate our guides in your native language! 🌍 #927

Open
dukecat0 opened this issue Jun 26, 2021 · 152 comments
Open

πŸ“™ Translate our guides in your native language! 🌍 #927

dukecat0 opened this issue Jun 26, 2021 · 152 comments

Comments

@dukecat0
Copy link
Member

dukecat0 commented Jun 26, 2021

🌐 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?

@webknjaz webknjaz added type: task Something that needs to be done that is not a bug or feature type: enhancement A self-contained enhancement or new feature type: question A user question that needs/needed an answer labels Jun 27, 2021
@webknjaz
Copy link
Member

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
Copy link
Member

@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
Copy link
Member

@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.

@pradyunsg
Copy link
Member

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.

@anxolerd
Copy link
Contributor

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

@dukecat0
Copy link
Member Author

dukecat0 commented Jun 27, 2021

@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
Copy link
Member Author

dukecat0 commented Jun 27, 2021

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. 🀣

@webknjaz
Copy link
Member

@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.

@dukecat0
Copy link
Member Author

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

@dukecat0
Copy link
Member Author

dukecat0 commented Jun 28, 2021

I have already made an example on Weblate.

@dukecat0
Copy link
Member Author

dukecat0 commented Jun 28, 2021

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

@webknjaz
Copy link
Member

@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
Copy link
Member

  • 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.

@dukecat0
Copy link
Member Author

@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
Copy link
Member Author

dukecat0 commented Jun 28, 2021

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.

@ewdurbin
Copy link
Member

@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.

@dukecat0
Copy link
Member Author

@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
Copy link
Member Author

dukecat0 commented Jul 7, 2021

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

@pradyunsg
Copy link
Member

pradyunsg commented Jul 9, 2021

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.

@webknjaz
Copy link
Member

webknjaz commented Jul 9, 2021

@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.

@ewdurbin
Copy link
Member

ewdurbin commented Jul 9, 2021

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.

@pradyunsg
Copy link
Member

pradyunsg commented Jul 9, 2021

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.

@webknjaz
Copy link
Member

webknjaz commented Jul 9, 2021

@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.

@dukecat0
Copy link
Member Author

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

@webknjaz
Copy link
Member

That's what I was thinking

@webknjaz
Copy link
Member

webknjaz commented Dec 6, 2021

@rffontenelle I guess we can sort it over time. I don't care about this specific thing too much.

@di @ewdurbin there's a problem with the new setup that was raised in #1026 β€” could any of you implement that prefix redirect setting? Only you have the access to do this.

@ewdurbin
Copy link
Member

ewdurbin commented Dec 6, 2021

Added prefix redirect. Does that resolve the issue?

ee-imac:~ ee$ curl -s -I  https://packaging.python.org/contribute/ | grep location
location: https://packaging.python.org/en/latest/contribute/

@webknjaz
Copy link
Member

webknjaz commented Dec 6, 2021

Works for me, thanks!

@webknjaz
Copy link
Member

webknjaz commented Dec 7, 2021

Just tweeted about this: https://twitter.com/webknjaz/status/1468240848450166797.

@pradyunsg pradyunsg added help wanted type: discussion Discussion of general ideas, design, etc. and removed type: enhancement A self-contained enhancement or new feature type: question A user question that needs/needed an answer type: task Something that needs to be done that is not a bug or feature labels Mar 19, 2022
@webknjaz
Copy link
Member

webknjaz commented Jun 23, 2022

Hey @motok, I see you're almost finished with your translation. Could you share your RTD handle so I could add you to the preview site @ https://packagingpythonorg-ja.rtfd.io?

@webknjaz
Copy link
Member

webknjaz commented Aug 3, 2022

@motok?

@webknjaz
Copy link
Member

@di @ewdurbin I think it's time to add Japanese officially. It's got higher percentage than Brazilian Portuguese which is already published. Could you do this?

@ewdurbin
Copy link
Member

@webknjaz what is your RTD name? I think it'd be great to add you as a maintainer on the packaging.python.org RTD project so you can self-service these.

@ewdurbin
Copy link
Member

I've added the Japanese project as a translation for now.

@webknjaz
Copy link
Member

webknjaz commented Sep 17, 2022

Same as GH β€” @webknjaz. Thanks!

@ewdurbin
Copy link
Member

Same as GH β€” @webknjaz. Thanks!

invite sent.

@webknjaz
Copy link
Member

@rffontenelle over time, the translations become stale. PT-BR probably needs updates, FYI.

@rffontenelle
Copy link
Contributor

I'll work on it. Thanks, @webknjaz

@rffontenelle
Copy link
Contributor

I noticed a :pep:`440` flag is set in Weblate and was thinking that using a regex check regex:':pep:`[\d]+`' (haven't tested!) would be more efficient to all PEPs. Could this be tested? If it works, I can look around for other potential regex checks.

@willingc willingc removed the type: discussion Discussion of general ideas, design, etc. label Nov 17, 2023
@willingc
Copy link
Contributor

willingc commented Nov 17, 2023

🌐 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

This info is also in the first post as well.

@rffontenelle
Copy link
Contributor

Hi all, I created #1431 as a way for testing translations and bringing up reST syntax errors in order to improve their quality. Feedback is welcome.

@rffontenelle
Copy link
Contributor

@webknjaz Could you please mark the source string "Summary" with the read-only flag in Weblate? The text is the title of the core metadata, so I assume it should not be translated, but its translation propagates to warehouse's Summary which is a normal word and should be translated. You can find it by searching for location:../source/specifications/core-metadata.rst:173 in the component's search box.

@webknjaz
Copy link
Member

Apparently, the searches URLs seem linkable? https://hosted.weblate.org/translate/pypa/packaging-python-org/en/?q=location%3A..%2Fsource%2Fspecifications%2Fcore-metadata.rst%3A173&sort_by=-priority%2Cposition&checksum=

I wonder if this word can appear as a title in some later documents. Should we try coming up with special markup for things that are keywords...?

So... I checked https://hosted.weblate.org/translate/pypa/packaging-python-org/en/?q=location%3A..%2Fsource%2Fspecifications%2Fcore-metadata.rst%3A173&sort_by=-priority%2Cposition&checksum=#nearby and apparently I've already marked it as read-only in the past.

There's an alert

 Multiple failing checks 
Following checks are failing:
Inconsistent: Portuguese (Brazil), Portuguese (Brazil), Japanese, Japanese, Ukrainian, Ukrainian

there but I don't understand why it's showing up (and why is every language repeated twice there)...

Is this because some of the languages ended up submitting a translation earlier, before the phrase became read-only?

@webknjaz
Copy link
Member

https://hosted.weblate.org/translate/pypa/packaging-python-org/uk/?q=location%3A..%2Fsource%2Fspecifications%2Fcore-metadata.rst%3A173&sort_by=-priority%2Cposition&checksum=

shows two alerts:

 Inconsistent 1
This string has more than one translation in this project or is untranslated in some components.

and

 Reused translation 2
Other source string: β€œWrap up”

which is also weird.

@webknjaz
Copy link
Member

Oh wait.. It says that the read-only flag is inherited for English. Adding the flag explicitly made it read-only across all languages.

@rffontenelle
Copy link
Contributor

rffontenelle commented Apr 24, 2024

Maybe these metadata fields can be written as ``literal text`` to avoid matching with normal text?

The languages were showing up twice because Summary was propagated between two components. These languages probably translated in only one (e.g. pt_BR did not have Summary translated in warehouse) so the inconsistency check is for that language in both components.

@webknjaz
Copy link
Member

Maybe these metadata fields can be written as literal text to avoid matching with normal text?

Yeah, that's what I've been considering but wanted to hear more opinions..

The languages were showing up twice because Summary was propagated between two components. These languages probably translated in only one (e.g. pt_BR did not have Summary translated in warehouse) so the inconsistency check is for that language in both components.

When you talk about components, do you mean PyPUG and Warehouse?

@rffontenelle
Copy link
Contributor

rffontenelle commented Apr 25, 2024

When you talk about components, do you mean PyPUG and Warehouse?

Yes. In the context of Weblate, "pypa" is a project that contains two components "warehouse" and "packaging.python.org". (Sorry if I wasn't crystal clear before)

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

Successfully merging a pull request may close this issue.

11 participants