Skip to content

Conversation

@nvdaes
Copy link

@nvdaes nvdaes commented Nov 24, 2025

Blocked by #7

strictSetInference = true

# Compliant rules
reportAbstractUsage = true
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's probably better to keep these rules than dropping to NVDA's standard

@nvdaes
Copy link
Author

nvdaes commented Nov 28, 2025

Purpose

Add-on authors may wish to help translators use Crowdin, the same framework where they translate NVDA. to translate messages and documentation for maintained add-ons:

Other details

  • Pot file are created/updated, and uploaded to a Crowdin project.
  • The readme.md file is converted to xliff and uploaded to a Crowdin project.
  • Po and xfiles are translated.
  • Translated files are downloaded and processed to be copied to locale/langCode/LC_MESSAGES/nvda.po, and doc/langCode/readme.md, in the addon folder.
    Authors need to store a Crowdin token with permissions to upload files to the Crowdin project as a repository secret.

Development approach

Use the Crowdin registration repo to add scripts usable by individual add-ons in personal repos.

@nvdaes
Copy link
Author

nvdaes commented Nov 28, 2025

I've tested that all check pass using this pyproject.toml file on this PR:

nvdaes/translateNvdaAddonsWithCrowdin#11

I use precommit, CodeQL and a workflow to check that all translatable messages have comments for translators.

I'll try to use the cache action to cache some add-on metadata like its id, and also hashfiles from l10nSources (taking the value of buildVars.py), and the hasf¡hfile of the readme.md, to determine if pot and xliff files should be updated.

@nvdaes
Copy link
Author

nvdaes commented Nov 30, 2025

Export translations to Crowdin running the workflow with update=False works properly:

https://github.com/nvdaes/translateNvdaAddonsWithCrowdin/actions/runs/19802210157

@nvdaes
Copy link
Author

nvdaes commented Nov 30, 2025

This time, updatexLiff is failing. Seems that adding blank lines to readme may cause problems:

https://github.com/nvdaes/translateNvdaAddonsWithCrowdin/actions/runs/19802391926/job/56731562709

@nvdaes
Copy link
Author

nvdaes commented Nov 30, 2025

If someone can help with this issue when update xliff, I'll be grateful.
I think that this is one of the bugest problems with xliff files. Sometimes sel lines are None and they don't have a strip method. I don't know if this should be also improved in NVDA
cc: @seanbudd

@seanbudd
Copy link
Member

seanbudd commented Dec 1, 2025

It might be easier to avoid xliff and just translate the markdown files directly. This won't support diffs very well but worth experimenting with

@nvdaes
Copy link
Author

nvdaes commented Dec 1, 2025

@seanbudd wrote:

It might be easier to avoid xliff and just translate the markdown files directly. This won't support diffs very well but worth experimenting with

OK.

@nvdaes
Copy link
Author

nvdaes commented Dec 3, 2025

@CyrilleB79, you were interested in this framework. If you want, feel free to see how the translateNvdaAddonsWithCrowdin.md can be translated in the project. Using xliff files is causing problems, as mentioned, and we are experimenting uploading md files instead.

@nvdaes
Copy link
Author

nvdaes commented Dec 21, 2025

Seems that we cannot run pre-commit inside GitHub Actions, and that that steps should be removed.
Looks like an extra secret is required so that pre-commit has appropriate credentials. Otherwise, testing with an add-on, thw workflow seems to be run properly:
https://github.com/nvdaes/translateNvdaAddonsWithCrowdin/actions/runs/20409142470/job/58643266187

In this case nothing is updated since the readme and i18nsources hashes are the same.

@nvdaes
Copy link
Author

nvdaes commented Dec 28, 2025

I'm testing this locally with act and docker, with help of GitHub Copilot agent mode in VS Code. Maybe others want to test locally too, so Copilot has suggested a configuration for Docker to install gettext, and the configuration file is added to .gitignore by Copilot, reviewed by me. Changes in the workflow have been suggested by Copilot to install gettext, and I've asked it to add a dry-run to avoid upload and download from Crowsin, and also to avoid git push, not supported by act. I've also found out that 3.13 version is not recognized when testing locally, so we're using 3.13.11 for ubuntu.

@seanbudd
Copy link
Member

Is it okay if we leave this as draft until #7 is resolved?

@nvdaes
Copy link
Author

nvdaes commented Dec 30, 2025

Sean wrote:

Is it okay if we leave this as draft until #7 is resolved?

Yes.

@nvdaes nvdaes marked this pull request as draft December 30, 2025 04:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants