Skip to content

Commit

Permalink
Use 'always' instead of 'everywhere, update translator comments'
Browse files Browse the repository at this point in the history
  • Loading branch information
cary-rowen committed Jan 8, 2025
1 parent 6cd87a4 commit 6349361
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions source/config/configFlags.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class TypingEcho(DisplayStringIntEnum):
"""

OFF = 0
EVERYWHERE = 1
ALWAYS = 1
EDIT_CONTROLS = 2

@property
Expand All @@ -63,7 +63,7 @@ def _displayStringLabels(self):
# Translators: One of the choices for typing echo in keyboard settings
TypingEcho.OFF: _("Off"),
# Translators: One of the choices for typing echo in keyboard settings
TypingEcho.EVERYWHERE: _("Everywhere"),
TypingEcho.ALWAYS: _("Always"),
# Translators: One of the choices for typing echo in keyboard settings
TypingEcho.EDIT_CONTROLS: _("Only in edit controls"),
}
Expand Down
4 changes: 2 additions & 2 deletions source/config/configSpec.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,9 +178,9 @@
# Default = 6: NumpadInsert + ExtendedInsert
NVDAModifierKeys = integer(1, 7, default=6)
keyboardLayout = string(default="desktop")
# 0: Off, 1: Everywhere, 2: Only in edit controls
# 0: Off, 1: Always, 2: Only in edit controls
speakTypedCharacters = integer(default=2,min=0,max=2)
# 0: Off, 1: Everywhere, 2: Only in edit controls
# 0: Off, 1: Always, 2: Only in edit controls
speakTypedWords = integer(default=2,min=0,max=2)
beepForLowercaseWithCapslock = boolean(default=true)
speakCommandKeys = boolean(default=false)
Expand Down
6 changes: 3 additions & 3 deletions source/globalCommands.py
Original file line number Diff line number Diff line change
Expand Up @@ -537,8 +537,8 @@ def script_previousSynthSetting(self, gesture):
ui.message("%s %s" % (previousSettingName, previousSettingValue))

@script(
# Translators: Input help mode message for toggle speaked typed characters command.
description=_("Cycle the reporting of typed characters: Off, Everywhere, and Only in edit controls."),
# Translators: Input help mode message for cycling the reporting of typed words.
description=_("Cycle the reporting of typed characters: Off, Always, and Only in edit controls."),
category=SCRCAT_SPEECH,
gesture="kb:NVDA+2",
)
Expand All @@ -552,7 +552,7 @@ def script_toggleSpeakTypedCharacters(self, gesture):

@script(
# Translators: Input help mode message for toggle speak typed words command.
description=_("Cycle the reporting of typed words: Off, Everywhere, and Only in edit controls."),
description=_("Cycle the reporting of typed words: Off, Always, and Only in edit controls."),
category=SCRCAT_SPEECH,
gesture="kb:NVDA+3",
)
Expand Down
4 changes: 2 additions & 2 deletions source/speech/speech.py
Original file line number Diff line number Diff line change
Expand Up @@ -1389,7 +1389,7 @@ def speakTypedCharacters(ch: str):
log.io("typed word: %s" % typedWord)
typingEchoMode = config.conf["keyboard"]["speakTypedWords"]
if typingEchoMode != TypingEcho.OFF.value and not typingIsProtected:
if typingEchoMode == TypingEcho.EVERYWHERE.value or (
if typingEchoMode == TypingEcho.ALWAYS.value or (
typingEchoMode == TypingEcho.EDIT_CONTROLS.value and isFocusEditable()
):
speakText(typedWord)
Expand All @@ -1407,7 +1407,7 @@ def speakTypedCharacters(ch: str):

typingEchoMode = config.conf["keyboard"]["speakTypedCharacters"]
if not suppress and typingEchoMode != TypingEcho.OFF.value and ch >= FIRST_NONCONTROL_CHAR:
if typingEchoMode == TypingEcho.EVERYWHERE.value or (
if typingEchoMode == TypingEcho.ALWAYS.value or (
typingEchoMode == TypingEcho.EDIT_CONTROLS.value and isFocusEditable()
):
speakSpelling(realChar)
Expand Down
4 changes: 2 additions & 2 deletions user_docs/en/changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ To use this feature, "allow NVDA to control the volume of other applications" mu
* Updated CLDR to version 46.0. (#17484, @OzancanKaratas)
* Short versions of the most commonly used command line options have been added: `-d` for `--disable-addons` and `-n` for `--lang`.
Prefix matching on command line flags, e.g. using `--di` for `--disable-addons` is no longer supported. (#11644, @CyrilleB79)
* The keyboard settings for "Speak typed characters" and "Speak typed words" now have three options: Off, Everywhere, and Only in edit controls. (#17505, @Cary-rowen)
* The keyboard settings for "Speak typed characters" and "Speak typed words" now have three options: Off, Always, and Only in edit controls. (#17505, @Cary-rowen)

### Bug Fixes

Expand Down Expand Up @@ -163,7 +163,7 @@ As the NVDA update check URL is now configurable directly within NVDA, no replac
* The following symbols have been removed with no replacement: `languageHandler.getLanguageCliArgs`, `__main__.quitGroup` and `__main__.installGroup` . (#17486, @CyrilleB79)
* Prefix matching on command line flags, e.g. using `--di` for `--disable-addons` is no longer supported. (#11644, @CyrilleB79)
* Changed keyboard typing echo configuration from boolean to integer values:
* `config.conf["keyboard"]["speakTypedCharacters"]` and `config.conf["keyboard"]["speakTypedWords"]` now use integer values (0=Off, 1=Everywhere, 2=Only in edit controls).
* `config.conf["keyboard"]["speakTypedCharacters"]` and `config.conf["keyboard"]["speakTypedWords"]` now use integer values (0=Off, 1=Always, 2=Only in edit controls).
* Added `TypingEcho` enum in `config.configFlags` to represent these modes.
* The `useAsFallBack` keyword argument of `bdDetect.DriverRegistrar` has been renamed to `useAsFallback`. (#17521, @LeonarddeR)

Expand Down
4 changes: 2 additions & 2 deletions user_docs/en/userGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -2594,7 +2594,7 @@ This option controls when NVDA announces characters you type on the keyboard.
The available options are:

* Off: NVDA will not announce typed characters.
* Everywhere: NVDA will announce all typed characters.
* Always: NVDA will announce all typed characters.
* Only in edit controls: NVDA will only announce characters typed in edit controls and other areas where text can be typed.

<!-- KC:setting -->
Expand All @@ -2607,7 +2607,7 @@ This option controls when NVDA announces words you type on the keyboard.
The available options are:

* Off: NVDA will not announce typed words.
* Everywhere: NVDA will announce all typed words.
* Always: NVDA will announce all typed words.
* Only in edit controls: NVDA will only announce words typed in edit controls and other areas where text can be typed.

##### Speech interrupt for typed characters {#KeyboardSettingsSpeechInteruptForCharacters}
Expand Down

0 comments on commit 6349361

Please sign in to comment.