Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
l10nUtil: add downloadTranslationFile and uploadTranslationFile comma…
…nds to allow downloading and uploading from Crowdin. (#17708) Currently, a translator must manually download and upload files from Crowdin. This can take time and is easy to use the wrong settings when importing and exporting. Description of user facing changes A translator can now download a file using the NVDA l10nUtil: l10nUtil downloadTranslationFile <language> <crowdinFilePath> [<localFilePath>] E.g. l10nUtil downloadTranslationFile fr userguide.xliff This will download the file, and preprocess it, avoiding bugs in the Crowdin exporter, including filtering of corrupt target strings. The translator can then translate the file with Poedit as normal. The translator can now upload the file back to Crowdin using the NVDA l10nUtil: l10nUtil uploadTranslationFile <language> <crowdinFilePath> [<localFilePath>] [--old <oldLocalFilePath>] E.g. l10nUtil uploadTranslationFile fr userguide.xliff --old userguide_old.xliff The --old argument allows you to provide the original downloaded file before it was last translated with Poedit, so that only added / changed translations are uploaded to Crowdin, decreasing the possibility of overriding someone elses work on this language. Note that the download and upload commands of l10nUtil require a Crowdin auth token. The first time, the token will be asked for. You will need to create a personal access token in your Crowdin settings, ensuring it has the Translations scope at a minimum. Paste this token into the user prompt. l10nUtil will save this in `/.nvda_crowdin for future use. Description of development approach l10nutil.py has new commands that use the Crowdin API.
- Loading branch information