-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Tested in NVDA 2021.1 and VLC 3.0.14 Vetinari
Compatibility OK
- Loading branch information
1 parent
585d4c6
commit 263603b
Showing
4 changed files
with
24 additions
and
222 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
# appModule for VLC Media Player 3X | ||
#This file is covered by the GNU General Public License. | ||
#See the file COPYING.txt for more details. | ||
#Copyright (C) 2015-2018 Javi Dominguez <[email protected]> | ||
#Copyright (C) 2015-2021 Javi Dominguez <[email protected]> | ||
|
||
from .py3compatibility import * | ||
import appModuleHandler | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,7 +19,7 @@ | |
# Translators: Long description to be shown for this add-on on add-on information from add-ons manager | ||
"addon_description" : _("Provides some accessibility features for VLC Media Player, as improve navigation or read status bar"), | ||
# version | ||
"addon_version" : "2.10", | ||
"addon_version" : "2.11", | ||
# Author(s) | ||
"addon_author" : u"Javi Dominguez <[email protected]>", | ||
# URL for the add-on documentation support | ||
|
@@ -29,7 +29,7 @@ | |
# Minimum NVDA version supported (e.g. "2018.3") | ||
"addon_minimumNVDAVersion" : "2018.1.0", | ||
# Last NVDA version supported/tested (e.g. "2018.4", ideally more recent than minimum version) | ||
"addon_lastTestedNVDAVersion" : "2019.3.0", | ||
"addon_lastTestedNVDAVersion" : "2021.1.0", | ||
# Add-on update channel (default is stable or None) | ||
"addon_updateChannel" : None | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,15 @@ | ||
# NVDA add-on template SCONSTRUCT file | ||
#Copyright (C) 2012, 2014 Rui Batista <[email protected]> | ||
#This file is covered by the GNU General Public License. | ||
#See the file COPYING.txt for more details. | ||
# Copyright (C) 2012-2020 Rui Batista, Noelia Martinez, Joseph Lee | ||
# This file is covered by the GNU General Public License. | ||
# See the file COPYING.txt for more details. | ||
|
||
import codecs | ||
import gettext | ||
import os | ||
import os.path | ||
import zipfile | ||
import sys | ||
sys.dont_write_bytecode = True | ||
|
||
import buildVars | ||
|
||
|
@@ -21,17 +23,16 @@ def md2html(source, dest): | |
} | ||
with codecs.open(source, "r", "utf-8") as f: | ||
mdText = f.read() | ||
for k, v in headerDic.iteritems(): | ||
for k, v in headerDic.items(): | ||
mdText = mdText.replace(k, v, 1) | ||
htmlText = markdown.markdown(mdText) | ||
with codecs.open(dest, "w", "utf-8") as f: | ||
f.write("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" + | ||
"<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\"\n" + | ||
" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\n" + | ||
"<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"%s\" lang=\"%s\">\n" % (lang, lang) + | ||
f.write("<!DOCTYPE html>\n" + | ||
"<html lang=\"%s\">\n" % lang + | ||
"<head>\n" + | ||
"<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\"/>\n" + | ||
"<link rel=\"stylesheet\" type=\"text/css\" href=\"../style.css\" media=\"screen\"/>\n" + | ||
"<meta charset=\"UTF-8\">\n" + | ||
"<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n" + | ||
"<link rel=\"stylesheet\" type=\"text/css\" href=\"../style.css\" media=\"screen\">\n" + | ||
"<title>%s</title>\n" % title + | ||
"</head>\n<body>\n" | ||
) | ||
|
@@ -69,6 +70,9 @@ elif env["version"] is not None: | |
if "channel" in env and env["channel"] is not None: | ||
env["addon_updateChannel"] = env["channel"] | ||
|
||
buildVars.addon_info["addon_version"] = env["addon_version"] | ||
buildVars.addon_info["addon_updateChannel"] = env["addon_updateChannel"] | ||
|
||
addonFile = env.File("${addon_name}-${addon_version}.nvda-addon") | ||
|
||
def addonGenerator(target, source, env, for_signature): | ||
|
@@ -118,16 +122,18 @@ def createAddonBundleFromPath(path, dest): | |
|
||
def generateManifest(source, dest): | ||
addon_info = buildVars.addon_info | ||
addon_info["addon_version"] = env["addon_version"] | ||
addon_info["addon_updateChannel"] = env["addon_updateChannel"] | ||
with codecs.open(source, "r", "utf-8") as f: | ||
manifest_template = f.read() | ||
manifest = manifest_template.format(**addon_info) | ||
with codecs.open(dest, "w", "utf-8") as f: | ||
f.write(manifest) | ||
|
||
def generateTranslatedManifest(source, language, out): | ||
_ = gettext.translation("nvda", localedir=os.path.join("addon", "locale"), languages=[language]).ugettext | ||
# No ugettext in Python 3. | ||
if sys.version_info.major == 2: | ||
_ = gettext.translation("nvda", localedir=os.path.join("addon", "locale"), languages=[language]).ugettext | ||
else: | ||
_ = gettext.translation("nvda", localedir=os.path.join("addon", "locale"), languages=[language]).gettext | ||
vars = {} | ||
for var in ("addon_summary", "addon_description"): | ||
vars[var] = _(buildVars.addon_info[var]) | ||
|
@@ -167,7 +173,7 @@ for mdFile in env.Glob(os.path.join('addon', 'doc', '*', '*.md')): | |
# Pot target | ||
i18nFiles = expandGlobs(buildVars.i18nSources) | ||
gettextvars={ | ||
'gettext_package_bugs_address' : 'nvda-translations@freelists.org', | ||
'gettext_package_bugs_address' : 'nvda-translations@groups.io', | ||
'gettext_package_name' : buildVars.addon_info['addon_name'], | ||
'gettext_package_version' : buildVars.addon_info['addon_version'] | ||
} | ||
|
@@ -186,3 +192,4 @@ env.Depends(manifest, "buildVars.py") | |
|
||
env.Depends(addon, manifest) | ||
env.Default(addon) | ||
env.Clean (addon, ['.sconsign.dblite', 'addon/doc/en/']) |