Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix beta build by better clearly distinguishing between the main nvda launcher and the l10nutil exe files #17249

Merged
merged 4 commits into from
Oct 6, 2024

Conversation

michaelDCurran
Copy link
Member

@michaelDCurran michaelDCurran commented Oct 4, 2024

Link to issue number:

None.
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.

Code Review Checklist:

  • Documentation:
    • Change log entry
    • User Documentation
    • Developer / Technical Documentation
    • Context sensitive help for GUI changes
  • Testing:
    • Unit tests
    • System (end to end) tests
    • Manual testing
  • UX of all users considered:
    • Speech
    • Braille
    • Low Vision
    • Different web browsers
    • Localization in other languages / culture than English
  • API is compatible with existing add-ons.
  • Security precautions taken.

Summary by CodeRabbit

  • New Features

    • Updated deployment script to specifically target NV Access executables, enhancing deployment accuracy.
    • Improved instructions for using the NVDA l10nUtil program in translation documentation.
  • Bug Fixes

    • Corrected grammatical errors in the translation documentation for better clarity.
  • Documentation

    • Enhanced clarity and consistency in translation instructions, including updated program names and usage examples.

…code to look for the main nvda launcher as nvda_*.exe.
@michaelDCurran michaelDCurran requested a review from a team as a code owner October 4, 2024 08:46
Copy link
Contributor

coderabbitai bot commented Oct 4, 2024

Walkthrough

The changes in this pull request involve modifications to several scripts and documentation related to the NV Access project. The deployScript.ps1 script now specifically retrieves executable files matching the pattern nva_*.exe. The crowdin.md document has been updated for clarity, particularly in the use of the l10nUtil.exe program. Additionally, the sconstruct file has been adjusted to reflect the new source file for generating the l10nUtil.exe executable. Overall, the changes enhance specificity and clarity without altering the fundamental structure of the existing scripts and documentation.

Changes

File Change Summary
appveyor/scripts/deployScript.ps1 Refined logic to retrieve executable files to match nva_*.exe pattern.
projectDocs/translating/crowdin.md Updated instructions for using l10nUtil.exe, corrected grammatical errors, and improved clarity.
sconstruct Changed source file for nvdaL10nUtil.exe from user_docs/nvdaL10nUtil.py to user_docs/l10nUtil.py.

Possibly related PRs

Suggested labels

conceptApproved

Suggested reviewers

  • seanbudd

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Outside diff range and nitpick comments (2)
appveyor/scripts/deployScript.ps1 (1)

11-11: Approve the change with a minor suggestion for clarity

The modification to select only nvda_*.exe files effectively addresses the issue mentioned in the PR objectives. This change ensures that only the main NVDA launcher is processed during deployment, preventing conflicts with other executables like the localization utility.

To further improve clarity and maintainability, consider using a more descriptive variable name.

		$mainNvdaExe = Get-ChildItem -Name output\nvda_*.exe

This change makes the purpose of the variable more explicit throughout the rest of the script.

projectDocs/translating/crowdin.md (1)

197-197: LGTM: Grammatical correction applied.

The change from "When ever" to "Whenever" is grammatically correct and improves the readability of the document.

For even better clarity, consider rephrasing the sentence to:

After saving the xliff file with Poedit, you can use the NVDA l10nUtil program to generate the html version of the documentation file. For example:

This phrasing makes the sequence of actions clearer and avoids the potential ambiguity of "Whenever".

📜 Review details

Configuration used: .coderabbit.yml
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 281e646 and 8ca273a.

📒 Files selected for processing (3)
  • appveyor/scripts/deployScript.ps1 (1 hunks)
  • projectDocs/translating/crowdin.md (2 hunks)
  • sconstruct (1 hunks)
🧰 Additional context used
📓 Path-based instructions (3)
appveyor/scripts/deployScript.ps1 (1)

Pattern **/*: Focus on code smells, logic errors, edge cases, missing test cases, security flaws and serious issues. Avoid commenting on minor issues such as linting, formatting and style issues. This project uses tabs instead of spaces, do not suggest usage of spaces over tabs. Are there any 'red flags' in this code that might warrant closer investigation from a security standpoint? Explain what makes them suspicious. When providing code suggestions, particularly when requested, ensure GitHub's suggestion format is used, i.e.: suggestion <code changes>

projectDocs/translating/crowdin.md (2)

Pattern **/*: Focus on code smells, logic errors, edge cases, missing test cases, security flaws and serious issues. Avoid commenting on minor issues such as linting, formatting and style issues. This project uses tabs instead of spaces, do not suggest usage of spaces over tabs. Are there any 'red flags' in this code that might warrant closer investigation from a security standpoint? Explain what makes them suspicious. When providing code suggestions, particularly when requested, ensure GitHub's suggestion format is used, i.e.: suggestion <code changes>


Pattern **/*.md: Focus on grammar, spelling, and punctuation. Also consider readability and clarity of contents. Ensure that changes follow the style of one sentence per line, suggest changes if this is not met.

sconstruct (1)

Pattern **/*: Focus on code smells, logic errors, edge cases, missing test cases, security flaws and serious issues. Avoid commenting on minor issues such as linting, formatting and style issues. This project uses tabs instead of spaces, do not suggest usage of spaces over tabs. Are there any 'red flags' in this code that might warrant closer investigation from a security standpoint? Explain what makes them suspicious. When providing code suggestions, particularly when requested, ensure GitHub's suggestion format is used, i.e.: suggestion <code changes>

🔇 Additional comments (5)
appveyor/scripts/deployScript.ps1 (1)

Line range hint 1-52: Overall impact of the change is positive and aligned with PR objectives

The modification to select only nvda_*.exe files effectively addresses the issue mentioned in the PR objectives without introducing any negative side effects to the rest of the script. The change is well-contained and doesn't conflict with other deployment tasks such as Crowdin sync or Mozilla symbol upload.

The script's overall structure and functionality remain intact, with the improvement focused on the NV Access server notification part. This change should resolve the beta build failure mentioned in the PR description.

To further enhance the script:

  1. Consider implementing the suggested error handling for file selection.
  2. You might want to add a comment explaining the reason for the specific file pattern, which could be helpful for future maintenance.

These suggestions are minor improvements to an already effective solution.

projectDocs/translating/crowdin.md (3)

172-172: LGTM: Executable name updated correctly.

The change from nvdaL10nUtil to l10nUtil.exe is consistent with the PR objectives and improves clarity by distinguishing this utility from the main NVDA launcher.


199-199: LGTM: Executable name updated consistently.

The change from nvdaL10nUtil to l10nUtil.exe is consistent with the previous update and maintains consistency throughout the document.


Line range hint 1-199: Summary: Documentation updated successfully.

The changes in this file accurately reflect the renaming of nvdaL10nUtil.exe to l10nUtil.exe as per the PR objectives. This update improves clarity by distinguishing the localization utility from the main NVDA launcher. The grammatical correction from "When ever" to "Whenever" enhances readability.

These changes will help translators use the correct utility name in their workflow and improve their understanding of the translation process. The document maintains its overall structure and clarity while providing up-to-date information.

sconstruct (1)

739-739: Update to nvdaL10nUtil command aligns with PR objectives.

The change from nvdaL10nUtil.py to l10nUtil.py in the Nuitka command aligns with the PR's objective of renaming the localization utility. This modification ensures that the correct file is used when generating the standalone executable.

However, to maintain consistency and clarity:

  1. Consider updating the target file name from nvdaL10nUtil.exe to l10nUtil.exe to match the new source file name.
  2. Update any references to this utility throughout the codebase to reflect the new name.

To ensure all references are updated, run the following script:

This will help identify any places where the old name might still be used, ensuring a complete and consistent renaming process.

✅ Verification successful

Correction Needed in Shell Script File Types

The previous attempt to search for 'nvdaL10nUtil' failed due to an unrecognized file type. Please use the correct file types for Python scripts.


Update Shell Script to Correctly Target NSIS Files

The previous script failed because nsis is not a recognized file type in rg. Please use a glob pattern to target .nsi files.


All references to 'nvdaL10nUtil' have been successfully updated.

No remaining references found in Python and NSIS files.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for any remaining references to 'nvdaL10nUtil'
rg --type python --type nsis 'nvdaL10nUtil'

Length of output: 74


Script:

#!/bin/bash
# Search for any remaining references to 'nvdaL10nUtil'
rg --type py --type nsis 'nvdaL10nUtil'

Length of output: 68


Script:

#!/bin/bash
# Search for any remaining references to 'nvdaL10nUtil' in Python and NSIS files
rg --type py --glob '*.nsi' 'nvdaL10nUtil'

Length of output: 42

appveyor/scripts/deployScript.ps1 Show resolved Hide resolved
@AppVeyorBot
Copy link

See test results for failed build of commit fa2c6a0632

@SaschaCowley SaschaCowley merged commit 8994445 into beta Oct 6, 2024
4 checks passed
@SaschaCowley SaschaCowley deleted the fixBeta branch October 6, 2024 23:34
@github-actions github-actions bot added this to the 2025.1 milestone Oct 6, 2024
@coderabbitai coderabbitai bot mentioned this pull request Oct 8, 2024
seanbudd pushed a commit that referenced this pull request Dec 12, 2024
Probably fix-up of #17214.
Follow-up of #17249.

Summary of the issue:
When an appVeyor test failure message is issued, the build link in this message is on l10nUtil.exe rather than on nvda_snapshot_xxxx.exe.

Description of user facing changes
The NVDA snapshot executable will be again downloadable from appVeyor messages.

Description of development approach
Refine the filtering to find the snapshot executable on "nvda_.exe" rather than on ".exe", as done in the deploy script in #17249 in appVeyor script.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants