improve behaviour and docs for mathcat speech style (#19740)
Closes #19689
Summary of the issue:
MathCAT speech styles depend on the language, however current documentation and handling is incorrect.
We try to store the active speech style in the NVDA config directly, but that value becomes unavailable when switching languages, and so settings dialogs won't be populated.
For example: ClearSpeak, the default, isn't available for all languages such as French.
Instead, we need to store speech styles based on the language, and create smart fallback handling for defaults.
Description of user facing changes:
MathCAT speech styles should now be saved and set correctly when switching languages.
The automatic language should be listed in the math language settings.
Description of developer facing changes:
Removed many parts of the unreleased mathcat API
Description of development approach:
Configuration and Data Model Changes:
Speech style configuration is now stored per language under math["speech"][<language>]["speechStyle"], rather than as a global setting. The config spec and related logic have been updated to reflect this. [1] [2] [3]
Improve math language handling
Settings Dialog Updates:
The Math settings dialog now displays and saves speech style options based on the selected math language. The UI uses localization.getSpeechStyles() directly to populate available speech styles, and saves the selected style under the current language. [1] [2] [3]
Code Simplification and Cleanup:
Removed logic for translating and mapping speech style display strings, including the SpeechStyleOption enum and helper functions for display/config value conversion. Type hints and imports have been modernized and cleaned up. [1] [2] [3] [4] [5] [6] [7] [8]
Documentation Updates:
The user guide now clarifies that speech style options are language-dependent, and describes the default and available styles for English and other languages.