Skip to content

Commit 15e9f02

Browse files
Update buildVars (#35)
* Update * Format * Pre-commit auto-fix * Update version --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent b8a80f7 commit 15e9f02

2 files changed

Lines changed: 66 additions & 61 deletions

File tree

addon/doc/ne/readme.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

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

1212
## Version 2.5
1313

@@ -21,9 +21,9 @@
2121

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

2929
## Version 1.0

buildVars.py

Lines changed: 63 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -1,100 +1,105 @@
1-
# -*- coding: UTF-8 -*-
2-
31
# Build customizations
42
# Change this file instead of sconstruct or manifest files, whenever possible.
53

6-
# Use AddonInfo TypedDict for add-on information, as in the template
7-
from typing import TypedDict
8-
try:
9-
from site_scons.site_tools.NVDATool.typings import AddonInfo
10-
except ImportError:
11-
class AddonInfo(TypedDict):
12-
addon_name: str
13-
addon_summary: str
14-
addon_description: str
15-
addon_version: str
16-
addon_changelog: str
17-
addon_author: str
18-
addon_url: str | None
19-
addon_sourceURL: str | None
20-
addon_docFileName: str
21-
addon_minimumNVDAVersion: str | None
22-
addon_lastTestedNVDAVersion: str | None
23-
addon_updateChannel: str | None
24-
addon_license: str | None
25-
addon_licenseURL: str | None
4+
from site_scons.site_tools.NVDATool.typings import AddonInfo, BrailleTables, SymbolDictionaries
5+
6+
# Since some strings in `addon_info` are translatable,
7+
# we need to include them in the .po files.
8+
# Gettext recognizes only strings given as parameters to the `_` function.
9+
# To avoid initializing translations in this module we simply import a "fake" `_` function
10+
# which returns whatever is given to it as an argument.
11+
from site_scons.site_tools.NVDATool.utils import _
2612

27-
def _(arg):
28-
return arg
2913

30-
addon_info: AddonInfo = {
14+
# Add-on information variables
15+
addon_info = AddonInfo(
3116
# add-on Name/identifier, internal for NVDA
32-
"addon_name": "controlUsageAssistant",
17+
addon_name="controlUsageAssistant",
3318
# Add-on summary/title, usually the user visible name of the add-on
3419
# Translators: Summary/title for this add-on
3520
# to be shown on installation and add-on information found in add-on store
36-
"addon_summary": _("Control Usage Assistant"),
21+
addon_summary=_("Control Usage Assistant"),
3722
# Add-on description
3823
# Translators: Long description to be shown for this add-on on add-on information from add-on store
39-
"addon_description": _("""Allows you to find out how to interact with the focused control, useful for new computer users new to Windows and to NVDA."""),
40-
# Each key is the name of the dictionary,
24+
addon_description=_("""Allows you to find out how to interact with the focused control, useful for new computer users new to Windows and to NVDA."""),
4125
# version
42-
"addon_version": "20250809.1.0",
26+
addon_version="20250809.1.0",
4327
# Brief changelog for this version
44-
"addon_changelog": _(
45-
# Translators: what's new content for the add-on version to be shown in the add-on store
46-
"""* Requires NVDA 2026.1 or later.
47-
* Added help message for toggle buttons.""",
48-
),
49-
# with keys inside recording the following attributes:
50-
# displayName (name of the speech dictionary shown to users and translatable),
28+
# Translators: what's new content for the add-on version to be shown in the add-on store
29+
addon_changelog=_("""* Fixed changelog format.
30+
* Restored translations for add-on description."""),
5131
# Author(s)
52-
"addon_author": "Joseph Lee <joseph.lee22590@gmail.com>, Noelia Ruiz Martínez <nrm1977@gmail.com>",
32+
addon_author="Joseph Lee <joseph.lee22590@gmail.com>, Noelia Ruiz Martínez <nrm1977@gmail.com>",
5333
# URL for the add-on documentation support
54-
"addon_url": "https://github.com/nvdaes/controlUsageAssistant",
34+
addon_url="https://github.com/nvdaes/controlUsageAssistant",
5535
# URL for the add-on repository where the source code can be found
56-
"addon_sourceURL": None,
36+
addon_sourceURL="https://github.com/nvdaes/controlUsageAssistant",
5737
# Documentation file name
58-
"addon_docFileName": "readme.html",
38+
addon_docFileName="readme.html",
5939
# Minimum NVDA version supported (e.g. "2019.3.0", minor version is optional)
60-
"addon_minimumNVDAVersion": "2026.1",
40+
addon_minimumNVDAVersion="2026.1",
6141
# Last NVDA version supported/tested (e.g. "2024.4.0", ideally more recent than minimum version)
62-
"addon_lastTestedNVDAVersion": "2026.1",
42+
addon_lastTestedNVDAVersion="2026.1",
6343
# Add-on update channel (default is None, denoting stable releases,
6444
# and for development releases, use "dev".)
6545
# Do not change unless you know what you are doing!
66-
"addon_updateChannel": None,
46+
addon_updateChannel=None,
6747
# Add-on license such as GPL 2
68-
"addon_license": None,
69-
# URL for the license document the add-on is licensed under
70-
"addon_licenseURL": None,
71-
}
72-
# mandatory (True when always enabled, False when not.
73-
symbolDictionaries = {}
48+
addon_license="GPL v2",
49+
# URL for the license document the ad-on is licensed under
50+
addon_licenseURL="https://www.gnu.org/licenses/gpl-2.0.html",
51+
)
7452

7553
# Define the python files that are the sources of your add-on.
76-
# You can either list every file (using "/") as a path separator,
54+
# You can either list every file (using ""/") as a path separator,
7755
# or use glob expressions.
7856
# For example to include all files with a ".py" extension from the "globalPlugins" dir of your add-on
7957
# the list can be written as follows:
8058
# pythonSources = ["addon/globalPlugins/*.py"]
8159
# For more information on SCons Glob expressions please take a look at:
8260
# https://scons.org/doc/production/HTML/scons-user/apd.html
83-
pythonSources = ["addon/globalPlugins/controlUsageAssistant/*.py"]
61+
pythonSources: list[str] = [
62+
"addon/*.py",
63+
"addon/globalPlugins/controlUsageAssistant/*.py",
64+
]
8465

8566
# Files that contain strings for translation. Usually your python sources
86-
i18nSources = pythonSources + ["buildVars.py"]
67+
i18nSources: list[str] = pythonSources + ["buildVars.py"]
8768

8869
# Files that will be ignored when building the nvda-addon file
8970
# Paths are relative to the addon directory, not to the root directory of your addon sources.
90-
excludedFiles = []
71+
# You can either list every file (using ""/") as a path separator,
72+
# or use glob expressions.
73+
excludedFiles: list[str] = []
9174

9275
# Base language for the NVDA add-on
9376
# If your add-on is written in a language other than english, modify this variable.
9477
# For example, set baseLanguage to "es" if your add-on is primarily written in spanish.
95-
baseLanguage = "en"
78+
# You must also edit .gitignore file to specify base language files to be ignored.
79+
baseLanguage: str = "en"
80+
81+
# Markdown extensions for add-on documentation
82+
# Most add-ons do not require additional Markdown extensions.
83+
# If you need to add support for markup such as tables, fill out the below list.
84+
# Extensions string must be of the form "markdown.extensions.extensionName"
85+
# e.g. "markdown.extensions.tables" to add tables.
86+
markdownExtensions: list[str] = []
9687

97-
markdownExtensions = []
88+
# Custom braille translation tables
89+
# If your add-on includes custom braille tables (most will not), fill out this dictionary.
90+
# Each key is a dictionary named according to braille table file name,
91+
# with keys inside recording the following attributes:
92+
# displayName (name of the table shown to users and translatable),
93+
# contracted (contracted (True) or uncontracted (False) braille code),
94+
# output (shown in output table list),
95+
# input (shown in input table list).
96+
brailleTables: BrailleTables = {}
9897

99-
# List of braille tables used by the add-on (required by SConstruct)
100-
brailleTables = []
98+
# Custom speech symbol dictionaries
99+
# Symbol dictionary files reside in the locale folder, e.g. `locale\en`, and are named `symbols-<name>.dic`.
100+
# If your add-on includes custom speech symbol dictionaries (most will not), fill out this dictionary.
101+
# Each key is the name of the dictionary,
102+
# with keys inside recording the following attributes:
103+
# displayName (name of the speech dictionary shown to users and translatable),
104+
# mandatory (True when always enabled, False when not.
105+
symbolDictionaries: SymbolDictionaries = {}

0 commit comments

Comments
 (0)