Skip to content

Commit d3ed160

Browse files
authored
Merge pull request #53 from zh-yx/fixed_string_translation
Fixed the string translation
2 parents 16d960a + 4865d54 commit d3ed160

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

addon/globalPlugins/MathCAT/MathCATPreferences.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,12 @@ def OnPauseFactorChanged( self, event ):
472472
rate = self.m_sliderRelativeSpeed.GetValue()
473473
pf_slider = self.m_sliderPauseFactor.GetValue()
474474
pause_factor = 0 if pf_slider==0 else round(PAUSE_FACTOR_SCALE *math.pow(PAUSE_FACTOR_LOG_BASE, pf_slider))
475-
text = _(f"<prosody rate='{rate}%'>the fraction with numerator <break time='{300*pause_factor//100}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='{128*pause_factor//100}ms'/> <mark name='M63i335o-6'/> plus <mark name='M63i335o-7'/> 1 <break time='{300*pause_factor//100}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='{128*pause_factor//100}ms'/> <mark name='M63i335o-12'/> minus <mark name='M63i335o-13'/> 1 <break time='{600*pause_factor//100}ms'/>end fraction <break time='{150*pause_factor//100}ms'/>")
475+
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(
476+
rate=rate,
477+
pause_factor_128=128*pause_factor//100,
478+
pause_factor_150=150*pause_factor//100,
479+
pause_factor_300=300*pause_factor//100,
480+
pause_factor_600=600*pause_factor//100)
476481
speak( ConvertSSMLTextForNVDA(text) )
477482

478483
def OnClickOK(self,event):

0 commit comments

Comments
 (0)