nvda
f66bd05f - Update the Fetch Crowdin translations workflow to collect individual po check reports, and email translators if any have errors (#19586)

Commit
42 days ago
Update the Fetch Crowdin translations workflow to collect individual po check reports, and email translators if any have errors (#19586) ### Summary of the issue: When automatically updating translations from Crowdin, a failure in any individual po file causes the entire job to fail. ### Description of user facing changes: Translators will be emailed if there are errors in po files when this job runs. ### Description of developer facing changes: The automatic Crowdin update should succeed even when there are invalid translations in locale(s); the affected files will not be committed. ### Description of development approach: * Don't rely on pre-commit to perform these checks, as it isn't granular enough * Query git for the tracked modified po files. * For each of these, run it through `l10nutil checkPo`. * If this succeeds, stage the file. * If it fails, store the report and locale, and do not stage the file. * If there were any failures, email the l10n list. I've also updated the Python setup step in the `download-from-crowdin` job to use python 3.13.11x64, as the workflow was failing on Python 3.13.12, and our work is almost all done with x64 Python. While `actions/setup-python` does have a `python-version-file` option, it is incompatible with the version format in our `.python-versions` file. ### Testing strategy: Tested running parts that can be run locally on my work machine. Tested in GitHub Actions: * [Manually triggered the workflow from the `fixUpdateTranslations` branch](https://github.com/nvaccess/nvda/actions/runs/21853555367) with one po file containing errors. Received [this email](https://github.com/user-attachments/files/25202390/zh_TW.Errors.in.interface.translations.-.NVDA.localisations.nvda-l10n%40nvaccess.org.-.2026-02-10.1659.eml). * Introduced an error into the Bengali translation, and [triggered the workflow again](https://github.com/nvaccess/nvda/actions/runs/21853909075). Received [this email](https://github.com/user-attachments/files/25202474/bn.zh_TW.Errors.in.interface.translations.-.NVDA.localisations.nvda-l10n%40nvaccess.org.-.2026-02-10.1716.eml). * Removed both erroneous translations, and [triggered the workflow yet a third time](https://github.com/nvaccess/nvda/actions/runs/21854911352/job/63069554549). Checked that the email step wasn't run. Also tested after refactoring: * Accidentally [sent one of the emails to the localization mailing list](https://groups.google.com/a/nvaccess.org/g/nvda-l10n/c/_WTx5ErX2NY). ### Known issues with pull request: The email includes warnings as well as errors. It's currently not possible to get these separately from l10nUtil.
Author
Parents
Loading