def script_toggleCommandAnnouncement(self, gesture):
focus = api.getFocusObject()
if focus.windowClassName not in ("TWaveView", "TSoundForm"):
# Translators: Presented when command announcement toggle is unavailable.
ui.message(_("You need to be in sound window to toggle command announcement"))
else:
self.commandAnnouncement = not self.commandAnnouncement
# Handle the announcement of this script separately, since we need to speak even when false.
if self.commandAnnouncement:
# Translators: Presented when command announcement messages are turned on in Goldwave.
ui.message(_("command announcement on"))
else:
# Translators: Presented when command announcement messages are turned off in Goldwave.
ui.message(_("command announcement off"))
# Translators: Input help mode message for command announcement command in Goldwave.
评论列表
文章目录