commit/Emoticons: 4 new changesets

  • From: commits-noreply@xxxxxxxxxxxxx
  • To: nvda-addons-commits@xxxxxxxxxxxxx
  • Date: Wed, 28 Nov 2018 19:33:23 +0000 (UTC)

4 new commits in Emoticons:

https://bitbucket.org/nvdaaddonteam/emoticons/commits/0e93de2f6621/
Changeset:   0e93de2f6621
Branch:      None
User:        norrumar
Date:        2018-11-28 19:24:56+00:00
Summary:     Fix bug in dictionary names containing certain characters, thanks 
to Paul

Affected #:  2 files

diff --git a/addon/globalPlugins/emoticons/__init__.py 
b/addon/globalPlugins/emoticons/__init__.py
index 247bf7d..6adb98b 100644
--- a/addon/globalPlugins/emoticons/__init__.py
+++ b/addon/globalPlugins/emoticons/__init__.py
@@ -50,7 +50,7 @@ def loadDic():
        if profileName is None:
                dicFile = ADDON_DIC_DEFAULT_FILE
        else:
-               dicFile = os.path.join(ADDON_DICTS_PATH, "profiles", "%s.dic" % 
profileName)
+               dicFile = os.path.join(ADDON_DICTS_PATH, "profiles", "%s.dic" % 
profileName.encode("mbcs"))
        sD.load(dicFile)
        if not os.path.isfile(dicFile):
                if config.conf["emoticons"]["speakAddonEmojis"]:

diff --git a/readme.md b/readme.md
index f8b4085..e7f8a88 100644
--- a/readme.md
+++ b/readme.md
@@ -62,6 +62,9 @@ These are the key commands available by default, you can edit 
those or add new k
 ## Changes for 9.0 ##
 
 * Added the possibility of choosing if add-on emojis should be spoken.
+* Used appropiate encoding for dictionary names, fixing errors when they 
contain certain characters.
+* The translated summary of the add-on is properly used for the title 
presented in add-on help, accessible from the add-on manager.
+* Added a note mentioning the emoji panel available on Windows 10.
 
 ## Changes for 8.0 ##
 


https://bitbucket.org/nvdaaddonteam/emoticons/commits/ad47fced3a12/
Changeset:   ad47fced3a12
Branch:      None
User:        norrumar
Date:        2018-11-28 19:27:47+00:00
Summary:     Fixed inconsistency between add-on help title and summary, thanks 
to Abdel

Affected #:  1 file

diff --git a/sconstruct b/sconstruct
index c28510b..1ddaf68 100644
--- a/sconstruct
+++ b/sconstruct
@@ -15,7 +15,12 @@ import buildVars
 def md2html(source, dest):
        import markdown
        lang = os.path.basename(os.path.dirname(source)).replace('_', '-')
-       title="{addonSummary} 
{addonVersion}".format(addonSummary=buildVars.addon_info["addon_summary"], 
addonVersion=buildVars.addon_info["addon_version"])
+       localeLang = os.path.basename(os.path.dirname(source))
+       try:
+               _ = gettext.translation("nvda", localedir=os.path.join("addon", 
"locale"), languages=[localeLang]).ugettext
+               title=u"{0}".format(_(buildVars.addon_info["addon_summary"]))
+       except:
+               title="{0}".format(buildVars.addon_info["addon_summary"]) 
        headerDic = {
                "[[!meta title=\"": "# ",
                "\"]]": " #",
@@ -39,20 +44,12 @@ def md2html(source, dest):
                f.write(htmlText)
                f.write("\n</body>\n</html>")
 
-def mdTool(env):
-       mdAction=env.Action(
-               lambda target,source,env: md2html(source[0].path, 
target[0].path),
-               lambda target,source,env: 'Generating %s'%target[0],
-       )
-       mdBuilder=env.Builder(
-               action=mdAction,
-               suffix='.html',
-               src_suffix='.md',
-       )
-       env['BUILDERS']['markdown']=mdBuilder
-
+def generateHelpFiles (source, target, env, for_signature):
+       action = env.Action(lambda target, source, env : 
md2html(source[0].abspath, target[0].abspath) and None,
+       lambda target, source, env : "Generating %s" % target[0])
+       return action
 
-env = Environment(ENV=os.environ, tools=['gettexttool', mdTool])
+env = Environment(ENV=os.environ, tools=['gettexttool'])
 env.Append(**buildVars.addon_info)
 
 addonFile = env.File("${addon_name}-${addon_version}.nvda-addon")
@@ -76,6 +73,9 @@ def translatedManifestGenerator(target, source, env, 
for_signature):
        return action
 
 env['BUILDERS']['NVDAAddon'] = Builder(generator=addonGenerator)
+env['BUILDERS']['markdown']=Builder(generator = generateHelpFiles,
+       suffix='.html',
+       src_suffix='.md')
 env['BUILDERS']['NVDAManifest'] = Builder(generator=manifestGenerator)
 env['BUILDERS']['NVDATranslatedManifest'] = 
Builder(generator=translatedManifestGenerator)
 
@@ -128,28 +128,10 @@ def expandGlobs(files):
 
 addon = env.NVDAAddon(addonFile, env.Dir('addon'))
 
-langDirs = [f for f in env.Glob(os.path.join("addon", "locale", "*"))]
-
-#Allow all NVDA's gettext po files to be compiled in source/locale, and 
manifest files to be generated
-for dir in langDirs:
-       poFile = dir.File(os.path.join("LC_MESSAGES", "nvda.po"))
-       moFile=env.gettextMoFile(poFile)
-       env.Depends(moFile, poFile)
-       translatedManifest = 
env.NVDATranslatedManifest(dir.File("manifest.ini"), [moFile, 
os.path.join("manifest-translated.ini.tpl")])
-       env.Depends(translatedManifest, ["buildVars.py"])
-       env.Depends(addon, [translatedManifest, moFile])
-
 pythonFiles = expandGlobs(buildVars.pythonSources)
 for file in pythonFiles:
        env.Depends(addon, file)
 
-#Convert markdown files to html
-createAddonHelp("addon") # We need at least doc in English and should enable 
the Help button for the add-on in Add-ons Manager
-for mdFile in env.Glob(os.path.join('addon', 'doc', '*', '*.md')):
-       htmlFile = env.markdown(mdFile)
-       env.Depends(htmlFile, mdFile)
-       env.Depends(addon, htmlFile)
-
 # Pot target
 i18nFiles = expandGlobs(buildVars.i18nSources)
 gettextvars={
@@ -171,4 +153,20 @@ manifest = env.NVDAManifest(os.path.join("addon", 
"manifest.ini"), os.path.join(
 env.Depends(manifest, "buildVars.py")
 
 env.Depends(addon, manifest)
+createAddonHelp("addon") # We need at least doc in English and should enable 
the Help button for the add-on in Add-ons Manager
+langDirs = [f for f in env.Glob(os.path.join("addon", "locale", "*"))]
+
+#Allow all NVDA's gettext po files to be compiled in source/locale, and 
manifest files to be generated
+for dir in langDirs:
+       poFile = dir.File(os.path.join("LC_MESSAGES", "nvda.po"))
+       moFile=env.gettextMoFile(poFile)
+       env.Depends(moFile, poFile)
+       translatedManifest = 
env.NVDATranslatedManifest(dir.File("manifest.ini"), [moFile, 
os.path.join("manifest-translated.ini.tpl")])
+       env.Depends(translatedManifest, ["buildVars.py"])
+       env.Depends(addon, [translatedManifest, moFile])
+       #Convert markdown files to html
+       for mdFile in env.Glob(os.path.join('addon', 'doc', '*', '*.md')):
+               htmlFile = env.markdown(mdFile)
+               env.Depends(htmlFile, [mdFile, moFile])
+               env.Depends(addon, htmlFile)
 env.Default(addon)


https://bitbucket.org/nvdaaddonteam/emoticons/commits/f6928d6b9a2e/
Changeset:   f6928d6b9a2e
Branch:      None
User:        norrumar
Date:        2018-11-28 19:31:19+00:00
Summary:     Mention the emoji panel available on Windows 10, thanks to Carlos 
Esteban

Affected #:  1 file

diff --git a/readme.md b/readme.md
index e7f8a88..7e404d6 100644
--- a/readme.md
+++ b/readme.md
@@ -59,6 +59,8 @@ These are the key commands available by default, you can edit 
those or add new k
 * NVDA+E: speaking emoticons on/off, toggles between speaking text as it is 
written, or with the emoticons replaced by the human description.
 * NVDA+I: show a dialog to select an emoticon you want to copy.
 
+Note: On Windows 10, it's also possible to use the built-in emoji panel. Focus 
any edit control, press Windows. period and use arrow and tab keys to type the 
desired emoji.
+
 ## Changes for 9.0 ##
 
 * Added the possibility of choosing if add-on emojis should be spoken.


https://bitbucket.org/nvdaaddonteam/emoticons/commits/4ed17e080e2d/
Changeset:   4ed17e080e2d
Branch:      excludeEmoji
User:        norrumar
Date:        2018-11-28 19:32:47+00:00
Summary:     Bump version: 9.1-dev

Affected #:  1 file

diff --git a/buildVars.py b/buildVars.py
index a6a60ee..f5fbf22 100644
--- a/buildVars.py
+++ b/buildVars.py
@@ -19,7 +19,7 @@ addon_info = {
        # Translators: Long description to be shown for this add-on on add-on 
information from add-ons manager
        "addon_description" : _("Enables the announcement of emoticon names 
instead of the character Representation."),
        # version
-       "addon_version" : "9.0-dev",
+       "addon_version" : "9.1-dev",
        # Author(s)
        "addon_author" : u"Chris Leo <llajta2012@xxxxxxxxx>, Noelia Ruiz 
Martínez <nrm1977@xxxxxxxxx>, Mesar Hameed <mhameed@xxxxxxxxxxxxx>, Francisco 
Javier Estrada Martínez <Fjestrad@xxxxxxxxxxx>",
        # URL for the add-on documentation support

Repository URL: https://bitbucket.org/nvdaaddonteam/emoticons/

--

This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.

Other related posts: