2424
2525# initialize the user preferences tuples
2626user_preferences : Dict [str , Dict [str , Union [int , str , bool ]]] = {}
27- #Speech_Language is derived from the folder structure
27+ #Speech_Language is derived from the folder structures
2828Speech_Impairment = ("LearningDisability" , "Blindness" , "LowVision" )
2929#Speech_SpeechStyle is derived from the yaml files under the selected language
3030Speech_Verbosity = ("Terse" , "Medium" , "Verbose" )
@@ -254,7 +254,9 @@ def GetLanguages(self):
254254 languages_dict = UserInterface .LanguagesDict ()
255255 #clear the language names in the dialog
256256 self .m_choiceLanguage .Clear ()
257- self .m_choiceLanguage .Append (_ ("Use Voice's Language" ) + " (Auto)" )
257+ # Translators: menu item -- use the language of the voice chosen in the NVDA speech settings dialog
258+ # "Auto" == "Automatic" -- this is done separately because other items in menu are "English (en)", etc., so this matches that style
259+ self .m_choiceLanguage .Append (_ ("Use Voice's Language" ) + _ (" (Auto)" ))
258260 #populate the available language names in the dialog
259261 #the implemented languages are in folders named using the relevant ISO 639-1 code https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes
260262 for language in os .listdir (UserInterface .path_to_languages_folder ()):
@@ -496,6 +498,7 @@ def OnRelativeSpeedChanged( self, event ):
496498 from .MathCAT import ConvertSSMLTextForNVDA
497499 from speech import speak
498500 rate = self .m_sliderRelativeSpeed .GetValue ()
501+ # Translators: this is a test string that is spoken. Only translate "the square root of x squared plus y squared"
499502 text = _ ("<prosody rate='XXX%'>the square root of x squared plus y squared</prosody>" ).replace ("XXX" , str (rate ), 1 )
500503 speak ( ConvertSSMLTextForNVDA (text ) )
501504
@@ -505,6 +508,7 @@ def OnPauseFactorChanged( self, event ):
505508 rate = self .m_sliderRelativeSpeed .GetValue ()
506509 pf_slider = self .m_sliderPauseFactor .GetValue ()
507510 pause_factor = 0 if pf_slider == 0 else round (PAUSE_FACTOR_SCALE * math .pow (PAUSE_FACTOR_LOG_BASE , pf_slider ))
511+ # Translators: this is a test string that is spoken. Only translate "the fraction with numerator" and other parts NOT inside '<.../>',
508512 text = _ ("<prosody rate='{rate}%'>the fraction with numerator <break time='{pause_factor_300}ms'/> <mark name='M63i335o-4'/> <say-as interpret-as='characters'>x</say-as> to the <mark name='M63i335o-5'/> <say-as interpret-as='characters'>n</say-as> <phoneme alphabet='ipa' ph='θ'>-th</phoneme> power <break time='{pause_factor_128}ms'/> <mark name='M63i335o-6'/> plus <mark name='M63i335o-7'/> 1 <break time='{pause_factor_300}ms'/> and denominator <mark name='M63i335o-10'/> <say-as interpret-as='characters'>x</say-as> to the <mark name='M63i335o-11'/> <say-as interpret-as='characters'>n</say-as> <phoneme alphabet='ipa' ph='θ'>-th</phoneme> power <break time='{pause_factor_128}ms'/> <mark name='M63i335o-12'/> minus <mark name='M63i335o-13'/> 1 <break time='{pause_factor_600}ms'/>end fraction <break time='{pause_factor_150}ms'/>" ).format (
509513 rate = rate ,
510514 pause_factor_128 = 128 * pause_factor // 100 ,
0 commit comments