nvda icon indicating copy to clipboard operation
nvda copied to clipboard

Fixup MathCAT settings

Open codeofdusk opened this issue 1 month ago • 10 comments

Link to issue number:

Follow-up of #18323.

Summary of the issue:

Some MathCAT options were unclear and hard to understand.

Description of how this pull request fixes the issue:

Cleanup UI and documentation.

Testing strategy:

Tested that settings changes appear as expected. Alpha testing.

Known issues with pull request:

None known

Code Review Checklist:

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

codeofdusk avatar Nov 17 '25 10:11 codeofdusk

I got the following error when opening the math category in settings:

ERROR - unhandled exception (11:21:34.782) - MainThread (19336):
Traceback (most recent call last):
  File "mathPres\MathCAT\localization.pyc", line 349, in getSpeechStyleFromDirectory
  File "zipfile\__init__.pyc", line 1367, in __init__
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Program Files\\NVDA\\include\\nvda-mathcat\\assets\\Rules\\Languages\\nl\\nl.zip'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "gui\settingsDialogs.pyc", line 6050, in onCategoryChange
  File "gui\settingsDialogs.pyc", line 748, in onCategoryChange
  File "gui\settingsDialogs.pyc", line 730, in _doCategoryChange
  File "gui\settingsDialogs.pyc", line 657, in _getCategoryPanel
  File "gui\settingsDialogs.pyc", line 389, in __init__
  File "gui\settingsDialogs.pyc", line 399, in _buildGui
  File "gui\settingsDialogs.pyc", line 2839, in makeSettings
  File "mathPres\MathCAT\preferences.pyc", line 259, in getSpeechStyleChoicesWithTranslations
  File "mathPres\MathCAT\localization.pyc", line 369, in getSpeechStyles
  File "mathPres\MathCAT\localization.pyc", line 354, in getSpeechStyleFromDirectory
UnboundLocalError: cannot access local variable 'zipFile' where it is not associated with a value

Is this also covered?

LeonarddeR avatar Nov 17 '25 10:11 LeonarddeR

I got the following error when opening the math category in settings

I also run into this when running master builds from source – it's unrelated to this PR. Binary builds work fine.

codeofdusk avatar Nov 17 '25 10:11 codeofdusk

I was running with latest alpha.

LeonarddeR avatar Nov 17 '25 11:11 LeonarddeR

@LeonarddeR As it turns out, that was an unrelated issue, which is also fixed in this PR.

codeofdusk avatar Nov 17 '25 13:11 codeofdusk

CC @RyanMcCleary, @seanbudd.

codeofdusk avatar Nov 17 '25 15:11 codeofdusk

@codeofdusk Thanks, all these fixes look good to me.

RyanMcCleary avatar Nov 17 '25 16:11 RyanMcCleary

Personally I am against extending all phrasing of math to mathematics. It is unnecessarily verbose.

On the opposite I support this. And, no matter the final decision in English, I will push for French translation to avoid using an abbreviation rather than the full term.

Moreover, I'd like to point that NVDA's documentation regularly use developers terms or approximative grammar, more in the change log than in the user guide though. Such wording is more than OK and understandable for unformal discussions between developers (e.g. GitHub) or even users (e.g. mailing lists). But the writing quality should be more careful in documentation.

Turning back to math/mathematic discussion, I do not know though if we are in the case of an too much unformal wording. English is a language which uses more often short words and fast / efficient wording and using math instead of mathematics could fall in this case; as a non-native English speaker, I'll native speaker discuss this point.

Cc @Qchristensen for awareness and opinion this discussion.

CyrilleB79 avatar Nov 18 '25 07:11 CyrilleB79

@Qchristensen @SaschaCowley @michaelDCurran and I discussed this offline, and we have decided we'd prefer to keep math. Math is much more commonly used, even in formal settings. @codeofdusk can you please undo those changes? The other changes in this PR are still quite helpful and welcome.

seanbudd avatar Nov 18 '25 23:11 seanbudd

@codeofdusk do you plan to continue work on this PR?

SaschaCowley avatar Dec 09 '25 01:12 SaschaCowley

@codeofdusk if you continue work on this, please re-target at beta

SaschaCowley avatar Dec 09 '25 05:12 SaschaCowley

@SaschaCowley I've fixed up this PR and rebased on beta; it's ready for review.

codeofdusk avatar Dec 11 '25 14:12 codeofdusk

In future, please avoid force pushes. It means we have to review the entire PR from scratch

seanbudd avatar Dec 15 '25 01:12 seanbudd