File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
addon/globalPlugins/MathCAT Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -426,6 +426,13 @@ def __init__(self):
426426 def getSpeechForMathMl (self , mathml : str ):
427427 try :
428428 self ._language = getLanguageToUse (mathml )
429+ # MathCAT should probably be extended to accept "extlang" tagging, but it uses lang-region tagging at the moment
430+ if self ._language == "cmn" :
431+ self ._language = "zh-cmn"
432+ elif self ._language == "yue" :
433+ self ._language = "zh-yue"
434+ # needs to be set before the MathML for DecimalSeparator canonicalization
435+ libmathcat .SetPreference ("Language" , self ._language )
429436 libmathcat .SetMathML (mathml )
430437 except Exception as e :
431438 log .error (e )
@@ -446,7 +453,7 @@ def getSpeechForMathMl(self, mathml: str):
446453 "CapitalLetters_UseWord" ,
447454 "true" if synthConfig ["sayCapForCapitals" ] else "false" ,
448455 )
449- # log.info(f"Speech text: {libmathcat.GetSpokenText()}")
456+ # log.info(f"Speech text ({self._language}) : {libmathcat.GetSpokenText()}")
450457 if PitchCommand in supported_commands :
451458 libmathcat .SetPreference ("CapitalLetters_Pitch" , str (synthConfig ["capPitchChange" ]))
452459 if self ._add_sounds ():
You can’t perform that action at this time.
0 commit comments