You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> It'd be a good idea to have automation that would do this on its own. A-la pre-commit.ci. Would you be open to exploring this? I'm pretty confident I know how to implement it.
This is an interesting idea, and I'd very much be open to learning more about this! One of the challenges is how to manage merge conflicts on this kind of thing, so I'm curious how you might approach that as well. #6631 has some background on translation workflow ideas
@miketheman yeah, I was around back then but forgot about that thread :)
FWIW, my current idea was to do the same as the status quo but automatically. It doesn't handle merge conflicts. When a PR has conflicts, the CI doesn't run and usually no integrations run either.
Though it's worth noting that I've since implemented a somewhat different workflow over @ PyPUG — we have no POT file, nor do we have POs/MOs in the default branch. But there's a separate branch translation/source which does. Whenever a PR is merged into the main branch, the CI merges main into translation/source. And this is how the POT file remains up-to-date. Weblate is configured to work with translation/source too — it sources POT from it and sends PR with translated files against this branch as well.
So both POT and POs end up in translation/source. The process is unidirectional and there are no flows that would attempt updating the same files. translation/source is also never merged back into main.
So main only holds the original English version. It's the source of truth.
And RTD is set up to build from translation/source and not main too.
graph LR
subgraph "🌵 'pypa/packaging.python.org'"
branch:translations["🌿 'translation/source'"]
branch:main["🌿 'main'"]
persona:writer("🧔 Writer (produces English text)")
end
subgraph "🗂️ Weblate"
persona:translator("🧔 Translator (produces non-English text)")
strings:src["📝 Source strings (English)"]
strings:translated["📝 Translated strings (non-English)"]
end
subgraph "📝 ReadTheDocs"
rtd:br-pt["🇧🇷 Brazillian Portuguese docs"]
rtd:en["🏴 English docs"]
rtd:uk["🇺🇦 Ukrainian docs"]
end
%% Contribution directions:
persona:writer --1--> branch:main
branch:main --2: POT file is generated--> branch:translations
branch:translations --3--> strings:src
strings:src --4--> persona:translator
persona:translator --5--> strings:translated
strings:translated --6: Weblate sends a PR with PO file updates--> branch:translations
branch:translations --7--> rtd:br-pt
branch:translations --7--> rtd:en
branch:translations --7--> rtd:uk
Loading
The text was updated successfully, but these errors were encountered:
This is an interesting idea, and I'd very much be open to learning more about this! One of the challenges is how to manage merge conflicts on this kind of thing, so I'm curious how you might approach that as well. #6631 has some background on translation workflow ideas
Originally posted by @miketheman in #17602 (comment)
@miketheman yeah, I was around back then but forgot about that thread :)
FWIW, my current idea was to do the same as the status quo but automatically. It doesn't handle merge conflicts. When a PR has conflicts, the CI doesn't run and usually no integrations run either.
Though it's worth noting that I've since implemented a somewhat different workflow over @ PyPUG — we have no POT file, nor do we have POs/MOs in the default branch. But there's a separate branch
translation/source
which does. Whenever a PR is merged into themain
branch, the CI mergesmain
intotranslation/source
. And this is how the POT file remains up-to-date. Weblate is configured to work withtranslation/source
too — it sources POT from it and sends PR with translated files against this branch as well.So both POT and POs end up in
translation/source
. The process is unidirectional and there are no flows that would attempt updating the same files.translation/source
is also never merged back intomain
.So
main
only holds the original English version. It's the source of truth.And RTD is set up to build from
translation/source
and notmain
too.The text was updated successfully, but these errors were encountered: