Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add reportActiveConfigurationProfile command #9325

Merged
merged 4 commits into from Apr 14, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
20 changes: 20 additions & 0 deletions source/globalCommands.py
Expand Up @@ -1843,6 +1843,26 @@ def script_activateInputGesturesDialog(self, gesture):
script_activateInputGesturesDialog.__doc__ = _("Shows the NVDA input gestures dialog")
script_activateInputGesturesDialog.category=SCRCAT_CONFIG

@script(
# Translators: Input help mode message for the report current configuration profile command.
description=_("Reports the name of the current NVDA configuration profile"),
category=SCRCAT_CONFIG,
)
def script_reportActiveConfigurationProfile(self, gesture):
activeProfileName = config.conf.profiles[-1].name

if not activeProfileName:
# Translators: Message announced when the command to report the current configuration profile and
# the default configuration profile is active.
activeProfileMessage = _("normal configuration profile active")
else:
# Translators: Message announced when the command to report the current configuration profile
# is active. The placeholder '{profilename}' is replaced with the name of the current active profile.
activeProfileMessage = _("{profileName} configuration profile active").format(
profileName=activeProfileName
)
ui.message(activeProfileMessage)

def script_saveConfiguration(self,gesture):
wx.CallAfter(gui.mainFrame.onSaveConfigurationCommand, None)
# Translators: Input help mode message for save current configuration command.
Expand Down