Skip to content
Merged
Show file tree
Hide file tree
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
84 changes: 3 additions & 81 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,86 +1,8 @@
# Set default behaviour, in case users don't have core.autocrlf set.
* text=auto

# Try to ensure that po files in the repo does not include
# source code line numbers.
# Every person expected to commit po files should change their personal config file as described here:
# https://mail.gnome.org/archives/kupfer-list/2010-June/msg00002.html
*.po filter=cleanpo

eol=lf
* text=auto

# Files which should not be renormalized
*.dic -text
*.po -text

# Git files
.gitignore text
.gitattributes text
CODEOWNERS text

# Documentation files
*.md text
*.txt text

# Scripts
*.ps1 text
*.bat text
*.nsi text

# Config files
*.ini text
*.yml text
*.robot text
*.subst text
Doxyfile text
Makefile text

# Other files
*.def text
*.css text
*.svg text

# Source files
# ============
# Python Sources
*.py text diff=python
*.pyw text diff=python
*_sconscript text diff=python
sconscript text diff=python
sconstruct text diff=python
# C++ Sources
*.c text diff=c
*.cpp text diff=cpp
*.h text diff=c
*.idl text diff=c
*.acf text diff=c

# Binary files
# ============
# Python binary files
# *.db binary
# *.p binary
# *.pkl binary
# *.pickle binary
# *.pyc binary
# *.pyd binary
# *.pyo binary
# # Compiled C++ Object files
# *.slo binary
# *.lo binary
# *.o binary
# *.obj binary
# # Precompiled C++ Headers
# *.gch binary
# *.pch binary
# # Compiled C++ Dynamic libraries
# *.so binary
# *.dylib binary
# *.dll binary
# # Compiled C++ Static libraries
# *.lai binary
# *.la binary
# *.a binary
# *.lib binary
# # C++ Executables
# *.exe binary
# *.out binary
# *.app binary
4 changes: 2 additions & 2 deletions .github/workflows/checkTranslatorsComments.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ jobs:
- name: Checkout code
uses: actions/checkout@v5

- name: Set up Python 3.8
- name: Set up Python 3.13
uses: actions/setup-python@v6
with:
python-version: 3.8
python-version: 3.13

- name: Install dependencies
run: |
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ addon/doc/*.css
addon/doc/en/
*_docHandler.py
*.html
*.ini
manifest.ini
*.mo
*.pot
*.py[co]
*.nvda-addon
.sconsign.dblite
/[0-9]*.[0-9]*.[0-9]*.json
45 changes: 18 additions & 27 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@

# Copied from https://github.com/nvaccess/nvda
# https://pre-commit.ci/
# Configuration for Continuous Integration service
ci:
skip: [pyrightLocal]
# Pyright does not seem to work in pre-commit CI
# skip: [pyright]
autoupdate_schedule: monthly
autoupdate_commit_msg: "Pre-commit auto-update"
autofix_commit_msg: "Pre-commit auto-fix"
submodules: true

default_language_version:
python: python3.11
python: python3.13

repos:
- repo: https://github.com/pre-commit-ci/pre-commit-ci-config
Expand All @@ -28,8 +29,8 @@ repos:
rev: v5.0.0
hooks:
# Prevents commits to certain branches
# - id: no-commit-to-branch
# args: ["--branch", "main"]
- id: no-commit-to-branch
args: ["--branch", "main", "--branch", "master", ]
# Checks that large files have not been added. Default cut-off for "large" files is 500kb.
- id: check-added-large-files
# Checks python syntax
Expand All @@ -42,26 +43,24 @@ repos:
- id: debug-statements
# Removes trailing whitespace.
- id: trailing-whitespace
types_or: [python, markdown, toml, yaml]
types_or: [python, c, c++, batch, markdown, toml, yaml, powershell]
# Ensures all files end in 1 (and only 1) newline.
- id: end-of-file-fixer
types_or: [python, markdown, toml, yaml]
types_or: [python, c, c++, batch, markdown, toml, yaml, powershell]
# Removes the UTF-8 BOM from files that have it.
# See https://github.com/nvaccess/nvda/blob/master/projectDocs/dev/codingStandards.md#encoding
- id: fix-byte-order-marker
types_or: [python, markdown, toml, yaml]
types_or: [python, c, c++, batch, markdown, toml, yaml, powershell]
# Validates TOML files.
- id: check-toml
# Validates YAML files.
- id: check-yaml
# Validates XML files.
# Ensures that links to lines in files under version control point to a particular commit.
- id: check-vcs-permalinks
# Avoids using reserved Windows filenames.
- id: check-illegal-windows-names

- repo: https://github.com/asottile/add-trailing-comma
rev: v3.1.0
rev: v3.2.0
hooks:
# Ruff preserves indent/new-line formatting of function arguments, list items, and similar iterables,
# if a trailing comma is added.
Expand All @@ -70,27 +69,19 @@ repos:

- repo: https://github.com/astral-sh/ruff-pre-commit
# Matches Ruff version in pyproject.
rev: v0.8.1
rev: v0.12.7
hooks:
- id: ruff
name: lint with ruff
args: [ --fix ]
- id: ruff-format
name: format with ruff

- repo: https://github.com/RobertCraigie/pyright-python
rev: v1.1.394
hooks:
- id: pyright
alias: pyrightLocal
name: Check types with pyright
#- repo: local
# hooks:

- repo: https://github.com/RobertCraigie/pyright-python
rev: v1.1.396
hooks:
- id: pyright
alias: pyrightCI
name: Check types with pyright
# use nodejs version of pyright and install pyproject.toml for CI
additional_dependencies: [".", "pyright[nodejs]"]
stages: [manual] # Only run from CI manually
# - id: pyright
# name: type check with pyright
# entry: uv run pyright
# language: system
# types: [python]
6 changes: 3 additions & 3 deletions addon/doc/ne/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

केन्द्रीत् नियन्त्रक फेला पार्न यो उपकर्मी चयन गर्नु होस् । चेक बाकस,
सम्पादन भूमी जस्ता केन्द्रीत् नियन्त्रक सम्बन्धी सन्देस जान्न नेत्रवाणी +H
कुञ्जी दबाउनु होस् ।
कुञ्जी दबाउनु होस् ।

## Version 2.5

Expand All @@ -21,9 +21,9 @@

* बिसौनी सञ्झ्याल सहित अतिरिक्त नियन्त्रकका लागी सहयोग सन्देस थप गरियो ।
* माइक्रोसफ्ट एक्सेल, प्रस्तुती-पत्र र सञ्झ्याल ८ सुरुवात् पर्दा जस्ता
अनुप्रयोगहरुका सहयोग सन्देस थप गरियो ।
अनुप्रयोगहरुका सहयोग सन्देस थप गरियो ।
* उघार्ने र केन्द्रीत् मुद्रा दुबै खाले अवास्तविक कागजातहरू (जस्तै अन्तर
सञ्झ्याल, एडोबी पाठक, मोजिला फायरफक्स ईत्यादी) मा सहयोग सन्देस थप गरियो ।
सञ्झ्याल, एडोबी पाठक, मोजिला फायरफक्स ईत्यादी) मा सहयोग सन्देस थप गरियो ।
* नया भाषा: डेनिस

## Version 1.0
Expand Down
18 changes: 5 additions & 13 deletions addon/globalPlugins/controlUsageAssistant/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# -*- coding: UTF-8 -*-

# Control Usage Assistant
# A global plugin for NVDA
# Copyright 2013-2025 Joseph Lee, Noelia Ruiz Martínez
Expand All @@ -18,8 +16,6 @@
# If the control is used differently in apps, then lookup the app entry and give the customized message.
# Extension plan: ability to get context-sensitive help on NVDA options.

from collections.abc import Callable

import globalPluginHandler
import controlTypes
import api
Expand All @@ -38,11 +34,11 @@

addonHandler.initTranslation()

_: Callable[[str], str]

# How many method resolution order (MRO) level help messages to consider
# before resorting to role-based messages.
CUAMROLevel = 0
# Translators: Message presented when there is no help for this control.
NO_HELP_MESSAGE = _("No help for this control")


class EnhancedSuggestion(NVDAObjects.behaviors.InputFieldWithSuggestions):
Expand Down Expand Up @@ -123,8 +119,7 @@ def getHelpMessage(self, curObj):
# Last resort: If we fail to obtain any default or app-specific message
# (because there is no entry for the role in the help messages), give the below message.
else:
# Translators: Message presented when there is no help message for the focused control.
helpMessages.append(_("No help for this control"))
helpMessages.append(NO_HELP_MESSAGE)
# Translators: message presented at the end of help messages.
helpMessages.append(_("Press escape to close this help screen."))
return "\n".join(helpMessages)
Expand Down Expand Up @@ -199,11 +194,8 @@ def reportMessage(self, message):
def reportAutomaticHelpMessage(self, obj):
if not self.shouldGetHelpAutomaticMessage():
return
try:
message = self.getAutomaticHelpMessage(obj)
except KeyError:
return
if message == self.automaticHelpMessage:
message = self.getAutomaticHelpMessage(obj)
if message == self.automaticHelpMessage or message is None:
return
self.reportMessage(message)
self.automaticHelpMessage = message
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
controlTypes.Role.EDITABLETEXT: _("Type text here."),
# Translators: Help message for a button.
controlTypes.Role.BUTTON: _("Press SPACE or ENTER to activate this button."),
# Translators: Help message for a toggle button.
controlTypes.Role.TOGGLEBUTTON: _("Press SPACE or ENTER to toggle this button."),
# Translators: Help message for menu items.
controlTypes.Role.MENUITEM: _("Use the arrow keys to move between the menu items."),
# Translators: Help message for pop-up menu (so-called context menu, activated by presing Applications key).
Expand Down
2 changes: 1 addition & 1 deletion addon/globalPlugins/controlUsageAssistant/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

confspec: dict[str, str] = {
"focusMessages": "boolean(default=True)",
"clickableObjectMessage": "string(default=" ")",
"clickableObjectMessage": "string(default=)",
"speech": "boolean(default=False)",
"braille": "boolean(default=False)",
"pitch": "integer(default=0)",
Expand Down
Loading