-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Add a job to automatically update translations #1769
base: master
Are you sure you want to change the base?
Conversation
6938471
to
dcacf56
Compare
I changed my mind. Let's start with explicitly manual first and then move to cron. |
- name: Open a PR | ||
uses: peter-evans/create-pull-request@v3 | ||
with: | ||
commit-message: "Update ${{ matrix.language }} translations from Crowdin" | ||
branch: "update_translations/${{ matrix.language }}" | ||
title: "Update ${{ matrix.language }} translations from Crowdin" | ||
body: '' | ||
delete-branch: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that this removes any commits in update_translations
and rebases it back to master. So this isn't good if you want to work on the branch.
For automatically scheduled PR, I think we'd want to only consider languages for which the translation of Crowdin is complete (=has 100% "translated" coverage). For languages not marked "(beta)" in our language overview, we might even want 100% proofread on Crowdin. |
I think we can use an input to select beta or non-beta. However, I have found that the codes we use do not map straight to the codes on Crowdin. For example, where we use |
ecd3cec
to
2dfedfb
Compare
@das-g I'm leaning to maintaining a |
Are you sure? Line 15 in 50d6da3
seems to indicate our pt corresponds to pt-BR . IIRC, the efforts to translate the tutorial to pt-PT , too, are more recent and the result hasn't been released, yet.
As soon as we have two variants of the same language, we should probably switch to the language variant abbreviations (that's what Crowdin seems to use) instead of the language abbreviations for our directory names, anyway. But yes, it makes sense not to have to parse |
I found that https://crowdin.com/backend/download/project/django-girls-tutorial/pt.zip is a 404. See https://github.com/ekohl/tutorial/runs/8251377015?check_suite_focus=true (ignore |
Hey, I recently came across Crowdin and added some translations. I see from Crowdin contribution page that people frequently make some translations here and there. |
AFAIK right now people submit PRs manually. AFAIK CrowdIn has some GitHub integration, but we don't have that enabled. The intent behind this PR was to start submitting PRs automatically so maintainers only need to press the merge button. |
@ekohl Can this PR be closed? |
This job runs weekly (or explicitly manual). It lists the languages in a way that GitHub Actions can reuse it in a matrix. Then for every language it updates the translations and creates a PR in a branch for every language.
I believe it doesn't create a PR if it's up to date, but I'm not certain.
Example outputs (disregard the unrelated commits):