Conversation
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
b6b9911 to
b07c59d
Compare
|
Most of the steps of add-new-language.yml are exactly the same as fetch-crowdin-translations.yml, would it be better to separate it into a composite action? Reduces duplication and facilitates maintenance. |
I think the workflows are sufficiently different, particularly different message strings, that it makes this not worth it. |
|
Please note: After #18270 merge, an error occurs when uploading nvda.po using l10nUtil included in the launcher:
|
Co-authored-by: Noelia Ruiz Martínez <nrm1977@gmail.com>
There was a problem hiding this comment.
Pull Request Overview
This PR introduces automation for fetching and adding translations from Crowdin by extending l10nUtil.py and adding two GitHub workflows.
- Adds an
exportTranslationsfunction and CLI command to bundle, download, and extract translations. - Integrates the new command into the main l10n utility.
- Adds workflows to regularly update tracked languages and to add new languages on demand.
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| source/l10nUtil.py | Added exportTranslations function and CLI parser integration. |
| .github/workflows/fetch-crowdin-translations.yml | Workflow to auto-fetch and commit tracked translations weekly. |
| .github/workflows/add-new-language.yml | Workflow to manually add and track new languages from Crowdin. |
Comments suppressed due to low confidence (1)
source/l10nUtil.py:289
- Add unit tests for
exportTranslationsto cover build initiation, polling logic, download, and extraction of the translation archive, ensuring errors are handled as expected.
def exportTranslations(outputDir: str, language: str | None = None):
Link to issue number:
Part of #17878
Follow up to #18270
Summary of the issue:
Currently, fetching the latest translations from Crowdin is a manual process.
Description of developer facing changes:
Description of development approach:
Testing strategy:
Known issues with pull request:
None
Code Review Checklist:
@coderabbitai summary