This repository is intended to support translations for NVDA and add-ons using the add-on template.
The following projects can be selected:
- NVDA: https://crowdin.com/project/nvda
- NVDA add-ons (not maintained by NV Access): https://crowdin.com/project/nvdaaddons
If you want to use a different Crowdin project, store the project and file IDs in a config file with the writeConfig command mentioned below.
-
checkPo- Check one or more PO files for errors.- Required:
poFilePaths— one or more paths to the PO files to check.
- Required:
-
xliff2md- Convert an XLIFF file to a Markdown file.- Required:
xliffPath— path to the source XLIFF file;mdPath— path for the resulting Markdown file. - Optional:
-u/--untranslated— produce the untranslated version of the Markdown file.
- Required:
-
md2html- Convert a Markdown file to HTML.- Required:
mdPath— path to the Markdown file;htmlPath— path for the resulting HTML file. - Optional:
-l/--lang— language code (default:en);-t/--docType— document type, one ofuserGuide,developerGuide,changes,keyCommands.
- Required:
-
xliff2html- Convert an XLIFF file directly to HTML (combinesxliff2mdandmd2html).- Required:
xliffPath— path to the source XLIFF file;htmlPath— path for the resulting HTML file. - Optional:
-l/--lang— language code (auto-detected from the XLIFF file if not provided);-t/--docType— document type, one ofuserGuide,developerGuide,changes,keyCommands;-u/--untranslated— produce the untranslated version.
- Required:
-
downloadTranslationFile- Download a translation file from Crowdin.- Required:
language— language code to download;crowdinFilePath— path of the file in Crowdin. - Optional:
localFilePath— local path to save the file (defaults tocrowdinFilePath);-c/--config— path to the configuration file (options:nvda,addon,defaultfor l10nConfig.yaml, or a custom path; defaults tonvda).
- Required:
-
uploadTranslationFile- Upload a translation file to Crowdin.- Required:
language— language code to upload;crowdinFilePath— path of the file in Crowdin. - Optional:
localFilePath— path to the local file to upload (defaults tocrowdinFilePath);-o/--old— path to the old unchanged XLIFF file to upload only new or changed translations;-c/--config— path to the configuration file (options:nvda,addon,defaultfor l10nConfig.yaml, or a custom path; defaults tonvda).
- Required:
-
uploadSourceFile- Upload a source file to Crowdin.- Required:
localFilePath— local path to the file to upload. - Optional:
-c/--config— path to the configuration file (options:nvda,addon,defaultfor l10nConfig.yaml, or a custom path; defaults tonvda).
- Required:
-
exportTranslations- Export translation files from Crowdin as a bundle.- Required:
-o/--output— directory to save the exported translation files. - Optional:
-l/--language— language code to export (exports all languages if not specified);-c/--config— path to the configuration file (options:nvda,addon,defaultfor l10nConfig.yaml, or a custom path; defaults tonvda).
- Required:
-
writeConfig- Write the current Crowdin configuration (project ID and file list) to a YAML file.- Optional:
-c/--configFile— path for the YAML configuration file to write (defaults tol10nConfig.yaml);-i/--id— Crowdin project ID.
- Optional:
To install all dependencies (including PyInstaller) and build a standalone executable using uv:
-
Install all dependencies:
uv sync
-
Build the executable:
uv run pyinstaller l10nUtil.spec
The resulting executable will be located in the dist directory.