Rejected.
As of OEP-58, the Transifex GitHub App is used to sync translations
between Transifex projects and the openedx-translations repository.
Within Transifex, translations are subjected to automated validation,
incorporating checks from both the platform itself and the LexiQA add-on,
in addition to being reviewed by human translators. During the synchronization
process, the Transifex GitHub App creates pull requests to the openedx-translations
repository. The pull requests trigger a CI workflow that runs msgfmt
to
validate the translations.
There are times when the translations being synchronized fail msgfmt
validation. This prevents the pull requests from being automatically merged.
By default a failing pull request will be kept open. Once translators fix the invalid entries the Transifex GitHub App will update the pull request and merge it automatically.
Translators do not monitor pull requests to the openedx-translations repo, and have requested to be notified of invalid entries via slack. This will start as a manual process. Work to automate this in the future will be tracked in Notify translators about invalid entries.
A GitHub Actions workflow will be implemented to mark invalid entries in
synchronized .po
files as fuzzy
. This will update pull requests
created by the Transifex GitHub App.
To ensure a safe and reliable workflow, the following workflows will be combined into one single workflow with multiple jobs:
- Run
python-tests.yml
to validate the python code - Then, run
validate-translation-files.yml
which performs the following:- Validate the po-files using
msgfmt
- Notify the translators about the invalid entries via the preferred communication channel (Slack, Transifex, GitHub)
- Edit the po files to mark invalid entries as
fuzzy
, so it's excluded from.mo
files - Revalidate the files
- Validate the po-files using
- Commit the updated entries and push to the PR branch
- Automatically merge the PR
- The workflow script edits the translations and effectively hide the errors, which can be confusing for the translators.
- Writing to the pull request will not trigger the GitHub Actions workflow, therefore the pull request cannot be merged unless the commit status is overridden manually via GitHub "create a commit status" API.
- The solution is
.po
file specific. And there's no similar solution for.json
,.yaml
, iOS, Android or other translations files.
Please refer to the original pull request which contains the rejected implementation: mark invalid entries as fuzzy | FC-0012.
Pros
- New valid strings would make it into the
.mo
files - There's no need for manual intervention, therefore it's fast and won't create a backlog of pull requests.
- Rejected strings are easily identifiable by looking in the code, so it's easy to fix them.
- Translators can be notified about invalid translations via Slack, Transifex, GitHub depending on the community's preference.
Cons
- The workflow script runs and edits the pull request, which can be confusing for the reviewers.
- Previously valid entries are going to be overwritten with new
fuzzy
strings which will make those entries to be shown in source language (English).