Skip to content

Commit b455bd0

Browse files
authored
Merge d6a20ff into f90caa9
2 parents f90caa9 + d6a20ff commit b455bd0

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

source/globalCommands.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -898,6 +898,29 @@ def script_toggleReportClickable(self,gesture):
898898
config.conf["documentFormatting"]["reportClickable"]=True
899899
ui.message(state)
900900

901+
@script(
902+
# Translators: Input help mode message for cycle through automatic language switching mode command.
903+
description=_("Cycles through speech automatic language switching modes off, language only and language and dialect."),
904+
category=SCRCAT_SPEECH,
905+
)
906+
def script_cycleSpeechAutomaticLanguageSwitching(self,gesture):
907+
if config.conf["speech"]["autoLanguageSwitching"]:
908+
if config.conf["speech"]["autoDialectSwitching"]:
909+
# Translators: A message reported when executing the cycle automatic language switching mode command.
910+
state = _("Automatic language switching off")
911+
config.conf["speech"]["autoLanguageSwitching"]=False
912+
config.conf["speech"]["autoDialectSwitching"] = False
913+
else:
914+
# Translators: A message reported when executing the cycle automatic language switching mode command.
915+
state = _("Automatic language and dialect switching on")
916+
config.conf["speech"]["autoDialectSwitching"] = True
917+
else:
918+
# Translators: A message reported when executing the cycle automatic language switching mode command.
919+
state = _("Automatic language switching on")
920+
config.conf["speech"]["autoLanguageSwitching"]=True
921+
config.conf["speech"]["autoDialectSwitching"] = False
922+
ui.message(state)
923+
901924
@script(
902925
# Translators: Input help mode message for cycle speech symbol level command.
903926
description=_("Cycles through speech symbol levels which determine what symbols are spoken"),

0 commit comments

Comments
 (0)