Skip to content

Commit f5a9099

Browse files
authored
Merge 7a41ae6 into 021c13d
2 parents 021c13d + 7a41ae6 commit f5a9099

6 files changed

Lines changed: 37 additions & 7 deletions

File tree

source/NVDAObjects/window/excel.py

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
Dict,
1313
Optional,
1414
)
15+
from unicodedata import category
1516

1617
from comtypes import COMError, BSTR
1718
import comtypes.automation
@@ -53,6 +54,8 @@
5354
from utils.displayString import DisplayStringIntEnum
5455
import NVDAState
5556

57+
SCRCAT_EXCEL = _("Excel")
58+
5659
excel2010VersionMajor=14
5760

5861
xlNone=-4142
@@ -1438,7 +1441,8 @@ def _get_rowHeaderText(self):
14381441
@script(
14391442
# Translators: the description for a script for Excel
14401443
description=_("opens a dropdown item at the current cell"),
1441-
gesture="kb:alt+downArrow")
1444+
gesture="kb:alt+downArrow",
1445+
category=SCRCAT_EXCEL)
14421446
def script_openDropdown(self,gesture):
14431447
gesture.send()
14441448
d=None
@@ -1464,7 +1468,8 @@ def script_openDropdown(self,gesture):
14641468
@script(
14651469
# Translators: the description for a script for Excel
14661470
description=_("Sets the current cell as start of column header"),
1467-
gesture="kb:NVDA+shift+c")
1471+
gesture="kb:NVDA+shift+c",
1472+
category=SCRCAT_EXCEL)
14681473
def script_setColumnHeader(self,gesture):
14691474
scriptCount=scriptHandler.getLastScriptRepeatCount()
14701475
if scriptCount==0:
@@ -1486,7 +1491,8 @@ def script_setColumnHeader(self,gesture):
14861491
@script(
14871492
# Translators: the description for a script for Excel
14881493
description=_("sets the current cell as start of row header"),
1489-
gesture="kb:NVDA+shift+r")
1494+
gesture="kb:NVDA+shift+r",
1495+
category=SCRCAT_EXCEL)
14901496
def script_setRowHeader(self,gesture):
14911497
scriptCount=scriptHandler.getLastScriptRepeatCount()
14921498
if scriptCount==0:
@@ -1672,6 +1678,7 @@ def _get_positionInfo(self):
16721678
# Translators: the description for a script for Excel
16731679
description=_("Reports the note on the current cell"),
16741680
gesture="kb:NVDA+alt+c",
1681+
category=SCRCAT_EXCEL,
16751682
speakOnDemand=True,
16761683
)
16771684
def script_reportComment(self,gesture):
@@ -1686,7 +1693,8 @@ def script_reportComment(self,gesture):
16861693
@script(
16871694
# Translators: the description for a script for Excel
16881695
description=_("Opens the note editing dialog"),
1689-
gesture="kb:shift+f2")
1696+
gesture="kb:shift+f2",
1697+
category=SCRCAT_EXCEL)
16901698
def script_editComment(self,gesture):
16911699
commentObj=self.excelCellObject.comment
16921700
d = EditCommentDialog(

source/appModules/eclipse.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515
import keyboardHandler
1616
from scriptHandler import script
1717

18+
# Translators: The name of a category of NVDA commands.
19+
SCRCAT_ECLIPSE = _("Eclipse")
20+
1821
class EclipseTextArea(EditableTextWithSuggestions, IAccessible):
1922

2023
def event_suggestionsClosed(self):
@@ -51,8 +54,9 @@ def script_closeAutocompleter(self, gesture):
5154

5255
@script(
5356
# Translators: Input help mode message for the 'read documentation script
54-
description = _("Tries to read documentation for the selected autocompletion item."),
55-
gesture = "kb:nvda+d"
57+
description=_("Tries to read documentation for the selected autocompletion item."),
58+
gesture="kb:nvda+d",
59+
category=SCRCAT_ECLIPSE
5660
)
5761
def script_readDocumentation(self, gesture):
5862
rootDocumentationWindow = None

source/appModules/miranda32.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@
2222
from keyboardHandler import KeyboardInputGesture
2323
import watchdog
2424

25+
# Translators: The name of a category of NVDA commands.
26+
SCRCAT_MIRANDA = _("Miranda")
27+
2528
#contact list window messages
2629
CLM_FIRST=0x1000 #this is the same as LVM_FIRST
2730
CLM_LAST=0x1100
@@ -113,6 +116,7 @@ def event_NVDAObject_init(self,obj):
113116
# Translators: The description of an NVDA command to view one of the recent messages.
114117
description=_("Displays one of the recent messages"),
115118
gestures=[f"kb:NVDA+control+{n}" for n in range(1, MessageHistoryLength + 1)],
119+
category=SCRCAT_MIRANDA,
116120
speakOnDemand=True,
117121
)
118122
def script_readMessage(self,gesture):

source/appModules/poedit.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323
LEFT_TO_RIGHT_EMBEDDING = "\u202a"
2424
"""Character often found in translator comments."""
2525

26+
# Translators: The name of a category of NVDA commands.
27+
SCRCAT_POEDIT = _("Poedit")
2628

2729
class _WindowControlIdOffset(IntEnum):
2830
"""Window control ID's are not static, however, the order of ids stays the same.
@@ -146,6 +148,7 @@ def _reportControlScriptHelper(self, obj: Window, description: str):
146148
"Reports any notes for translators. If pressed twice, presents the notes in browse mode",
147149
),
148150
gesture="kb:control+shift+a",
151+
category=SCRCAT_POEDIT,
149152
speakOnDemand=True,
150153
)
151154
def script_reportAutoCommentsWindow(self, gesture):
@@ -172,6 +175,7 @@ def _get__commentObj(self) -> Window | None:
172175
"If pressed twice, presents the comment in browse mode",
173176
),
174177
gesture="kb:control+shift+c",
178+
category=SCRCAT_POEDIT,
175179
speakOnDemand=True,
176180
)
177181
def script_reportCommentsWindow(self, gesture):
@@ -197,6 +201,7 @@ def _get__oldSourceTextObj(self) -> Window | None:
197201
"Reports the old source text, if any. If pressed twice, presents the text in browse mode",
198202
),
199203
gesture="kb:control+shift+o",
204+
category=SCRCAT_POEDIT,
200205
speakOnDemand=True,
201206
)
202207
def script_reportOldSourceText(self, gesture):
@@ -220,6 +225,7 @@ def _get__translationWarningObj(self) -> Window | None:
220225
"Reports a translation warning, if any. If pressed twice, presents the warning in browse mode",
221226
),
222227
gesture="kb:control+shift+w",
228+
category=SCRCAT_POEDIT,
223229
speakOnDemand=True,
224230
)
225231
def script_reportTranslationWarning(self, gesture):

source/appModules/powerpnt.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@
4141
from locationHelper import RectLTRB
4242
from NVDAObjects.window._msOfficeChart import OfficeChart
4343

44+
# Translators: The name of a category of NVDA commands.
45+
SCRCAT_POWERPOINT = _("PowerPoint")
46+
4447
# Window classes where PowerPoint's object model should be used
4548
# These also all request to have their (incomplete) UI Automation implementations disabled. [MS Office 2013]
4649
objectModelWindowClasses=set(["paneClassDC","mdiClass","screenClass"])
@@ -1242,7 +1245,8 @@ def handleSlideChange(self):
12421245
self.treeInterceptor.reportNewSlide()
12431246

12441247
class AppModule(appModuleHandler.AppModule):
1245-
1248+
scriptCategory = SCRCAT_POWERPOINT
1249+
12461250
hasTriedPpAppSwitch=False
12471251
_ppApplicationWindow=None
12481252
_ppApplication=None

source/appModules/vipmud.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414
This module makes NVDA read incoming text, as well as allowing the user to review the last nine messages with control 1 through 9.
1515
"""
1616

17+
# Translators: The name of a category of NVDA commands.
18+
SCRCAT_VIPMUD = _("VipMud")
19+
1720
class AppModule(appModuleHandler.AppModule):
1821
lastLength=0
1922
msgs =[]
@@ -26,6 +29,7 @@ def chooseNVDAObjectOverlayClasses(self, obj, clsList):
2629
# Translators: The description of an NVDA command to view one of the recent messages.
2730
description=_("Displays one of the recent messages"),
2831
gestures=[f"kb:control+{n}" for n in range(1, historyLength + 1)],
32+
category=SCRCAT_VIPMUD,
2933
speakOnDemand=True,
3034
)
3135
def script_readMessage(self,gesture):

0 commit comments

Comments
 (0)