Skip to content

Commit 2aeef4c

Browse files
authored
Merge e3cd7f0 into 72ee0b9
2 parents 72ee0b9 + e3cd7f0 commit 2aeef4c

1 file changed

Lines changed: 19 additions & 1 deletion

File tree

source/globalCommands.py

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,25 @@ def script_toggleReportFontAttributes(self,gesture):
360360
script_toggleReportFontAttributes.__doc__=_("Toggles on and off the reporting of font attributes")
361361
script_toggleReportFontAttributes.category=SCRCAT_DOCUMENTFORMATTING
362362

363+
@script(
364+
# Translators: Input help mode message for toggle superscripts and subscripts command.
365+
description=_("Toggles on and off the reporting of superscripts and subscripts"),
366+
category=SCRCAT_DOCUMENTFORMATTING,
367+
)
368+
def script_toggleReportSuperscriptsAndSubscripts(self, gesture):
369+
shouldReport: bool = not config.conf["documentFormatting"]["reportSuperscriptsAndSubscripts"]
370+
config.conf["documentFormatting"]["reportSuperscriptsAndSubscripts"] = shouldReport
371+
if shouldReport:
372+
# Translators: The message announced when toggling the report superscripts and subscripts
373+
# document formatting setting.
374+
state = _("report superscripts and subscripts on")
375+
else:
376+
# Translators: The message announced when toggling the report superscripts and subscripts
377+
# document formatting setting.
378+
state = _("report superscripts and subscripts off")
379+
ui.message(state)
380+
381+
363382
def script_toggleReportRevisions(self,gesture):
364383
if config.conf["documentFormatting"]["reportRevisions"]:
365384
# Translators: The message announced when toggling the report revisions document formatting setting.
@@ -2875,4 +2894,3 @@ def updateScriptForRenamedProfile(cls, oldName, newName):
28752894
#: The single instance for the configuration profile activation commands.
28762895
#: @type: L{ConfigProfileActivationCommands}
28772896
configProfileActivationCommands = ConfigProfileActivationCommands()
2878-

0 commit comments

Comments
 (0)