Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion source/ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,16 @@ def reportTextCopiedToClipboard(text: Optional[str] = None):
# or the clipboard content did not match what was just copied.
message(_("Unable to copy"))
return
# Depending on the speech synthesizer, large amount of spoken text can freeze NVDA (#11843)
if len(text) < 1024:
spokenText = text
else:
# Translators: Spoken instead of a lengthy text when copied to clipboard.
spokenText = _("%d characters") % len(text)
message(
# Translators: Announced when a text has been copied to clipboard.
# {text} is replaced by the copied text.
text=_("Copied to clipboard: {text}").format(text=text),
text=_("Copied to clipboard: {text}").format(text=spokenText),
# Translators: Displayed in braille when a text has been copied to clipboard.
# {text} is replaced by the copied text.
brailleText=_("Copied: {text}").format(text=text)
Expand Down