Skip to content

Commit 6348dfd

Browse files
committed
add a few more translator messages for further testing -- hopefully only one file left
1 parent c761660 commit 6348dfd

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

addon/globalPlugins/MathCAT/MathCATPreferences.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
# initialize the user preferences tuples
2626
user_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
2828
Speech_Impairment = ("LearningDisability", "Blindness", "LowVision")
2929
#Speech_SpeechStyle is derived from the yaml files under the selected language
3030
Speech_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,

addon/globalPlugins/MathCAT/MathCATgui.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
class MathCATPreferencesDialog ( wx.Dialog ):
2424

2525
def __init__( self, parent ):
26+
# Translators: title for MathCAT preferences dialog
2627
wx.Dialog.__init__ ( self, parent, id = wx.ID_ANY, title = _("MathCAT Preferences"), pos = wx.DefaultPosition, size = wx.Size( -1,-1 ), style = wx.DEFAULT_DIALOG_STYLE )
2728

2829
self.SetSizeHints( wx.DefaultSize, wx.DefaultSize )
@@ -39,6 +40,7 @@ def __init__( self, parent ):
3940

4041
bSizerCategories.Add( self.m_staticTextCategories, 0, wx.ALL, 5 )
4142

43+
# Translators: these are tab headings for the MathCAT preferences dialog
4244
m_listBoxPreferencesTopicChoices = [ _("Speech"), _("Navigation"), _("Braille") ]
4345
self.m_listBoxPreferencesTopic = wx.ListBox( self.m_panelCategories, wx.ID_ANY, wx.Point( -1,-1 ), wx.Size( -1,-1 ), m_listBoxPreferencesTopicChoices, wx.LB_NO_SB|wx.LB_SINGLE )
4446
bSizerCategories.Add( self.m_listBoxPreferencesTopic, 0, wx.ALL, 5 )
@@ -61,11 +63,13 @@ def __init__( self, parent ):
6163

6264
bSizerImpairment = wx.BoxSizer( wx.HORIZONTAL )
6365

66+
# Translators: this is the text label for whom to target the speech for (options are below)
6467
self.m_staticTextImpairment = wx.StaticText( self.m_panelSpeech, wx.ID_ANY, _("Generate speech for:"), wx.DefaultPosition, wx.DefaultSize, 0 )
6568
self.m_staticTextImpairment.Wrap( -1 )
6669

6770
bSizerImpairment.Add( self.m_staticTextImpairment, 0, wx.ALL, 5 )
6871

72+
# Translators: these are the categories of impairments that MathCAT supports
6973
m_choiceImpairmentChoices = [ _("Learning disabilities"), _("Blindness"), _("Low vision") ]
7074
self.m_choiceImpairment = wx.Choice( self.m_panelSpeech, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, m_choiceImpairmentChoices, 0 )
7175
self.m_choiceImpairment.SetSelection( 1 )

0 commit comments

Comments
 (0)