-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Revamp translations process #1514
Revamp translations process #1514
Conversation
✅ Deploy Preview for expressjscom-preview ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
If I understand correctly, once this lands, any PR that updates the en docs will automatically get tagged with labels like I'm just trying to understand how this is going to work in practice. |
Let's use #1515 as an example. This GitHub Action will run on this PR and add tags like Once the PR is merged, the idea is that the community can use these tags to filter, such as Search for pending Spanish translations, and start working on PRs that can port the changes from the original #1515 or others. Once the PR related to the translation is merged, we can remove the |
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.
Thanks for clarifying... LGTM!
I will merge it and see if works 👍 |
It worked as expected! I made a manual run against #1515 (actions details) and the labels were added 🥳 Note: for new PRs this step is automated, but manually we can check already opened PRs. |
Main Changes
New workflow (79e274a and 4f2d3ef)
This PR introduces a new GitHub Actions workflow, "Check Translation", which automates the process of checking and managing translations in pull requests. The workflow is triggered on pull requests to the
gh-pages
branch that modify files in any of the language directories (e.g., 'en/', 'es/', 'fr/', etc.).The workflow has two jobs:
Checkout code: This job checks out the code of the pull request using the
actions/checkout@v4
action.Check modified files and add labels: This job uses the
actions/github-script@v5
action to run a script that checks the modified files in the pull request. The script identifies the languages that have been modified by examining the first part of the filename (before the first '/'). It then adds a label for each language that has not been modified, in the formatrequires-translation-<language>
.The workflow also supports manual triggering via the
workflow_dispatch
event. In this case, the PR number to check must be provided as an input.This workflow will help us better track and manage translation tasks, ensuring that all languages are kept up-to-date.
New translation process documented (14d2266 and cfd449d)
Updated the
CONTRIBUTING.md
file to reflect the new process for translations. We now highly encourage community translations and we use the tags generated in the new workflow to coordinate the work.Context
Notes
I was not able to test this locally, so I assume that we will test it once it is merged