Skip to content

Commit b36f92f

Browse files
authored
Merge 0598f39 into 5601830
2 parents 5601830 + 0598f39 commit b36f92f

4 files changed

Lines changed: 33 additions & 7 deletions

File tree

source/NVDAObjects/IAccessible/winword.py

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -317,8 +317,11 @@ def script_caret_moveByCell(self, gesture: inputCore.InputGesture) -> None:
317317
braille.handler.handleCaretMove(self)
318318

319319
@script(
320-
# Translators: a description for a script
321-
description=_("Reports the text of the comment where the system caret is located."),
320+
description=_(
321+
# Translators: a description for a script
322+
"Reports the text of the comment where the system caret is located."
323+
" If pressed twice, presents the information in browse mode"
324+
),
322325
gesture="kb:NVDA+alt+c",
323326
category=SCRCAT_SYSTEMCARET,
324327
speakOnDemand=True,
@@ -338,7 +341,14 @@ def script_reportCurrentComment(self,gesture):
338341
except COMError:
339342
break
340343
if text:
341-
ui.message(text)
344+
if repeats == 0:
345+
ui.message(text)
346+
elif repeats == 1:
347+
ui.browseableMessage(
348+
text,
349+
# Translators: title for Word comment dialog.
350+
_("Comment")
351+
)
342352
return
343353
# Translators: a message when there is no comment to report in Microsoft Word
344354
ui.message(_("No comments"))

source/NVDAObjects/UIA/wordDocument.py

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -598,16 +598,27 @@ def _caretMoveBySentenceHelper(self, gesture, direction):
598598

599599
@script(
600600
gesture="kb:NVDA+alt+c",
601-
# Translators: a description for a script that reports the comment at the caret.
602-
description=_("Reports the text of the comment where the system caret is located."),
601+
description=_(
602+
# Translators: a description for a script that reports the comment at the caret.
603+
"Reports the text of the comment where the system caret is located."
604+
" If pressed twice, presents the information in browse mode"
605+
),
603606
category=SCRCAT_SYSTEMCARET,
604607
speakOnDemand=True,
605608
)
606609
def script_reportCurrentComment(self,gesture):
607610
caretInfo=self.makeTextInfo(textInfos.POSITION_CARET)
608611
commentInfo = getCommentInfoFromPosition(caretInfo)
609612
if commentInfo is not None:
610-
ui.message(getPresentableCommentInfoFromPosition(commentInfo))
613+
text = getPresentableCommentInfoFromPosition(commentInfo)
614+
if repeats == 0:
615+
ui.message(text)
616+
elif repeats == 1:
617+
ui.browseableMessage(
618+
text,
619+
# Translators: title for Word comment dialog.
620+
_("Comment")
621+
)
611622
else:
612623
# Translators: a message when there is no comment to report in Microsoft Word
613624
ui.message(_("No comments"))

user_docs/en/changes.t2t

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ What's New in NVDA
1010

1111

1212
== Changes ==
13+
- Microsoft Office:
14+
- When the command to report the text of the Word comment where the System caret is located is pressed twice (``NVDA+alt+c``), the information is presented browse mode.
15+
-
16+
-
1317

1418

1519
== Bug Fixes ==

user_docs/en/userGuide.t2t

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1212,7 +1212,8 @@ The Elements List can list headings, links, annotations (which includes comments
12121212

12131213
+++ Reporting Comments +++[WordReportingComments]
12141214
%kc:beginInclude
1215-
To report any comments at the current caret position, press NVDA+alt+c.
1215+
To report any comments at the current caret position, press ``NVDA+alt+c``.
1216+
Pressing twice shows the information in a window.
12161217
%kc:endInclude
12171218
All comments for the document, along with other tracked changes, can also be listed in the NVDA Elements List when selecting Annotations as the type.
12181219

0 commit comments

Comments
 (0)