Skip to content

Commit

Permalink
Fix beta build by better clearly distinguishing between the main nvda…
Browse files Browse the repository at this point in the history
… launcher and the l10nutil exe files (#17249)

See failed beta build: https://ci.appveyor.com/project/NVAccess/nvda/builds/50731013

Summary of the issue:
NVDA's appVeyor diploy code finds the main NVDA launcher by simply matching on output*.exe. This is expected to match on a single file.
However, with the introduction of the nvdaL10nUtil.exe to the output directory, the pattern also matched on this file, causing the deploy to fail.

Description of user facing changes
None

Description of development approach
* renamed nvdaL10nUtil.exe to l10nUtil.exe
* Changed the pattern that locates the nvda launcher to output\nvda_*.exe.

Testing strategy:
This can only be tested via a successful beta build.

Known issues with pull request:
* It would be good if we could better calculate the main NVDA launcher name based on version type etc, but this would require a bit of careful refactoring.
* had to rename nvdal10nUtil.exe to the more generic l10nUtil.exe. Documentation currently states nvdaL10nUtil.exe. Though once this is successfully building for beta, the plan is to place this util somewhere public for translators to download, and at that point we can rename that copy to nvdaL10nUtil.exe and provide clearer documentation on where to get it.
  • Loading branch information
michaelDCurran authored Oct 6, 2024
1 parent 281e646 commit 8994445
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion appveyor/scripts/deployScript.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ if (!$env:APPVEYOR_PULL_REQUEST_NUMBER -and $env:versionType) {
}
# Notify the NV Access server if this is an NV Access build.
if ($env:APPVEYOR_REPO_NAME.StartsWith("nvaccess/")) {
$exe = Get-ChildItem -Name output\*.exe
$exe = Get-ChildItem -Name output\nvda_*.exe
$hash = (Get-FileHash "output\$exe" -Algorithm SHA1).Hash.ToLower()
$apiVersion = (py -c "import sys; sys.path.append('source'); from addonAPIVersion import CURRENT; print('{}.{}.{}'.format(*CURRENT))")
echo apiversion: $apiVersion
Expand Down
8 changes: 4 additions & 4 deletions projectDocs/translating/crowdin.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,9 +167,9 @@ To translate any of these files:
* Make sure to choose "Download" not "Export xliff".
* Make a copy of this file.
* Open the xliff file in Poedit, translate, and save the file.
* Use the nvdaL10nUtil program to strip the xliff so that it only contains translations that were added / changed. E.g.
* Use the NVDA l10nUtil program to strip the xliff so that it only contains translations that were added / changed. E.g.
```
nvdaL10nUtil stripXliff -o <old xliff file> <translated xliff file> <output stripped xliff file>
l10nUtil.exe stripXliff -o <old xliff file> <translated xliff file> <output stripped xliff file>
```
* Upload the xliff file back to Crowdin. If it is a stripped xliff file, it is safe to check the `allow target to match source` checkbox.

Expand All @@ -194,7 +194,7 @@ All strings for translation contain translator notes which include:

### Verifying your translation

When ever you have saved the xliff file with Poedit, you can use the nvdaL10nUtil program to generate the html version of the documentation file. E.g.
When ever you have saved the xliff file with Poedit, you can use the NVDA l10nUtil program to generate the html version of the documentation file. E.g.
```
nvdaL10nUtil xliff2html -t [userGuide|changes|keyCommands] <xliff file> <output html file>
l10nUtil.exe xliff2html -t [userGuide|changes|keyCommands] <xliff file> <output html file>
```
6 changes: 3 additions & 3 deletions sconstruct
Original file line number Diff line number Diff line change
Expand Up @@ -733,9 +733,9 @@ target = env.File(os.path.join(outputDir.abspath, "library_modules.txt"))
env.Alias("moduleList", env.GenerateModuleList(target, source))

nvdaL10nUtil = env.Command(
target=outputDir.File("nvdaL10nUtil.exe"),
source="user_docs/nvdaL10nUtil.py",
target=outputDir.File("l10nUtil.exe"),
source="user_docs/l10nUtil.py",
ENV=os.environ,
action=f"nuitka --assume-yes-for-downloads --remove-output --standalone --onefile --output-dir={outputDir.abspath} --include-module=mdx_truly_sane_lists --include-module=markdown_link_attr_modifier --include-module=mdx_gh_links user_docs/nvdaL10nUtil.py",
action=f"nuitka --assume-yes-for-downloads --remove-output --standalone --onefile --output-dir={outputDir.abspath} --include-module=mdx_truly_sane_lists --include-module=markdown_link_attr_modifier --include-module=mdx_gh_links user_docs/l10nUtil.py",
)
env.Alias("nvdaL10nUtil", nvdaL10nUtil)
File renamed without changes.

0 comments on commit 8994445

Please sign in to comment.