Skip to content

A command to cycle through available languages for Windows OCR#14805

Merged
seanbudd merged 3 commits into
nvaccess:masterfrom
CyrilleB79:chgOcrLang
Apr 11, 2023
Merged

A command to cycle through available languages for Windows OCR#14805
seanbudd merged 3 commits into
nvaccess:masterfrom
CyrilleB79:chgOcrLang

Conversation

@CyrilleB79

Copy link
Copy Markdown
Contributor

Link to issue number:

Closes #13036

Summary of the issue:

In #13036, the reporter needs an input gesture to quickly change the language of Windows OCR.

More generally, if a user has to modify frequently a setting for their activity, a specific command to modify this setting is more handy than always opening the settings dialog.

Description of user facing changes

A new unbound command has been added to cycle through available languages for Windows OCR. It is in the Misc category, the same as the one of the already existing command to recognize the navigator object with Windows OCR.

Description of development approach

  • Made the script based on what was in the settings OCR panel
  • Made the assumption that at least one language (probably English) is installed on all systems supporting UwpOCR; this assumption is already done if you read the code of the OCR settings panel and we have not had people complaining of issues.
  • While at it, moved 3 isolated class variables related to screen curtain next to the related script.

Testing strategy:

Manual tests:

  • Used the script and checked the result in the Windows OCR settings panel.
  • Modified my config with an unsupported recognition language and checked that calling the command set the new recog language to the first supported (English in my case).

Known issues with pull request:

I have not created a command to cycle backwards through available languages since I imagine than people rarely install a long list of languages, e.g. more than 5. If we have a speicific request for this in the future, it may be easy to add it.

Change log entries:

New features
Introduced a new command to cycle through the available languages for Windows OCR. (#13036)

Code Review Checklist:

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

@CyrilleB79 CyrilleB79 marked this pull request as ready for review April 7, 2023 12:03
@CyrilleB79 CyrilleB79 requested review from a team as code owners April 7, 2023 12:03

@Qchristensen Qchristensen left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Good work.

@seanbudd seanbudd merged commit f925600 into nvaccess:master Apr 11, 2023
@nvaccessAuto nvaccessAuto added this to the 2023.2 milestone Apr 11, 2023
@CyrilleB79 CyrilleB79 deleted the chgOcrLang branch April 18, 2023 07:05
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.

Windows OCR, add an input gesture to quickly switch between OCR languages.

4 participants