|
1 | | -# -*- coding: UTF-8 -*- |
2 | | - |
3 | 1 | # Build customizations |
4 | 2 | # Change this file instead of sconstruct or manifest files, whenever possible. |
5 | 3 |
|
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 _ |
26 | 12 |
|
27 | | -def _(arg): |
28 | | - return arg |
29 | 13 |
|
30 | | -addon_info: AddonInfo = { |
| 14 | +# Add-on information variables |
| 15 | +addon_info = AddonInfo( |
31 | 16 | # add-on Name/identifier, internal for NVDA |
32 | | - "addon_name": "controlUsageAssistant", |
| 17 | + addon_name="controlUsageAssistant", |
33 | 18 | # Add-on summary/title, usually the user visible name of the add-on |
34 | 19 | # Translators: Summary/title for this add-on |
35 | 20 | # 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"), |
37 | 22 | # Add-on description |
38 | 23 | # 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."""), |
41 | 25 | # version |
42 | | - "addon_version": "20250809.1.0", |
| 26 | + addon_version="20250809.1.0", |
43 | 27 | # 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."""), |
51 | 31 | # 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>", |
53 | 33 | # URL for the add-on documentation support |
54 | | - "addon_url": "https://github.com/nvdaes/controlUsageAssistant", |
| 34 | + addon_url="https://github.com/nvdaes/controlUsageAssistant", |
55 | 35 | # 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", |
57 | 37 | # Documentation file name |
58 | | - "addon_docFileName": "readme.html", |
| 38 | + addon_docFileName="readme.html", |
59 | 39 | # Minimum NVDA version supported (e.g. "2019.3.0", minor version is optional) |
60 | | - "addon_minimumNVDAVersion": "2026.1", |
| 40 | + addon_minimumNVDAVersion="2026.1", |
61 | 41 | # 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", |
63 | 43 | # Add-on update channel (default is None, denoting stable releases, |
64 | 44 | # and for development releases, use "dev".) |
65 | 45 | # Do not change unless you know what you are doing! |
66 | | - "addon_updateChannel": None, |
| 46 | + addon_updateChannel=None, |
67 | 47 | # 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 | +) |
74 | 52 |
|
75 | 53 | # 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, |
77 | 55 | # or use glob expressions. |
78 | 56 | # For example to include all files with a ".py" extension from the "globalPlugins" dir of your add-on |
79 | 57 | # the list can be written as follows: |
80 | 58 | # pythonSources = ["addon/globalPlugins/*.py"] |
81 | 59 | # For more information on SCons Glob expressions please take a look at: |
82 | 60 | # 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 | +] |
84 | 65 |
|
85 | 66 | # Files that contain strings for translation. Usually your python sources |
86 | | -i18nSources = pythonSources + ["buildVars.py"] |
| 67 | +i18nSources: list[str] = pythonSources + ["buildVars.py"] |
87 | 68 |
|
88 | 69 | # Files that will be ignored when building the nvda-addon file |
89 | 70 | # 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] = [] |
91 | 74 |
|
92 | 75 | # Base language for the NVDA add-on |
93 | 76 | # If your add-on is written in a language other than english, modify this variable. |
94 | 77 | # 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] = [] |
96 | 87 |
|
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 = {} |
98 | 97 |
|
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