Index: gc_lang/fr/build.py ================================================================== --- gc_lang/fr/build.py +++ gc_lang/fr/build.py @@ -11,10 +11,11 @@ import helpers def build (sLang, dVars): "complementary build launched from make.py" + dVars['webextOptionsHTML'] = _createOptionsForWebExtension(dVars) createWebExtension(sLang, dVars) convertWebExtensionForChrome(sLang, dVars) createMailExtension(sLang, dVars) createNodeJSPackage(sLang) @@ -23,11 +24,10 @@ "create Web-extension" print("> Building WebExtension for Firefox") helpers.createCleanFolder("_build/webext/"+sLang) dir_util.copy_tree("gc_lang/"+sLang+"/webext/", "_build/webext/"+sLang) dir_util.copy_tree("grammalecte-js", "_build/webext/"+sLang+"/grammalecte") - dVars['webextOptionsHTML'] = _createOptionsForWebExtension(dVars) helpers.copyAndFileTemplate("_build/webext/"+sLang+"/manifest.json", "_build/webext/"+sLang+"/manifest.json", dVars) helpers.copyAndFileTemplate("_build/webext/"+sLang+"/panel/main.html", "_build/webext/"+sLang+"/panel/main.html", dVars) with helpers.CD("_build/webext/"+sLang): os.system("web-ext build") # Copy Firefox zip extension to _build @@ -72,10 +72,16 @@ _copyGrammalecteJSPackageInZipFile(hZip, sLang) for spf in ["LICENSE.txt", "LICENSE.fr.txt"]: hZip.write(spf) dVars = _createOptionsForThunderbird(dVars) helpers.addFolderToZipAndFileFile(hZip, "gc_lang/"+sLang+"/mailext", "", dVars, True) + helpers.addFolderToZipAndFileFile(hZip, "gc_lang/"+sLang+"/webext/3rd", "3rd", dVars, True) + helpers.addFolderToZipAndFileFile(hZip, "gc_lang/"+sLang+"/webext/_locales", "_locales", dVars, True) + helpers.addFolderToZipAndFileFile(hZip, "gc_lang/"+sLang+"/webext/content_scripts", "content_scripts", dVars, True) + helpers.addFolderToZipAndFileFile(hZip, "gc_lang/"+sLang+"/webext/fonts", "fonts", dVars, True) + helpers.addFolderToZipAndFileFile(hZip, "gc_lang/"+sLang+"/webext/img", "img", dVars, True) + helpers.addFolderToZipAndFileFile(hZip, "gc_lang/"+sLang+"/webext/panel", "panel", dVars, True) hZip.close() #spExtension = dVars['win_tb_debug_extension_path'] if platform.system() == "Windows" else dVars['linux_tb_debug_extension_path'] #if os.path.isdir(spExtension): # file_util.copy_file(spfZip, spExtension + "/" + dVars['tb_identifier']+ ".xpi") # Filename for TB is just # print(f"TB extension copied in <{spExtension}>") Index: gc_lang/fr/mailext/manifest.json ================================================================== --- gc_lang/fr/mailext/manifest.json +++ gc_lang/fr/mailext/manifest.json @@ -1,19 +1,48 @@ { "manifest_version": 2, "applications": { "gecko": { "id": "${tb_identifier}", - "strict_min_version": "68.0a1" + "strict_min_version": "78.0a1" } }, "name": "${tb_name}", + "short_name": "${tb_name}", "description": "${description}", "version": "${version}", "author": "${author}", "homepage_url": "${link}", + "default_locale": "fr", + + "icons": { "16": "img/logo-16.png", + "32": "img/logo-32.png", + "48": "img/logo-48.png", + "64": "img/logo-64.png", + "80": "img/logo-80.png", + "96": "img/logo-96.png" }, + + "browser_action": { + "default_icon": "img/logo-32.png", + "default_popup": "panel/main.html", + "default_title": "Grammalecte [fr]", + "browser_style": false + }, + "compose_action": { + "default_icon": "img/logo-32.png", + "default_area": "maintoolbar", + "default_popup": "panel/main.html", + "default_title": "Analyser", + "browser_style": false + }, + "background": { + "scripts": [ + "grammalecte/graphspell/helpers.js", + "background.js" + ] + } } Index: helpers.py ================================================================== --- helpers.py +++ helpers.py @@ -130,9 +130,9 @@ spfDst = (spDst + "/" + sf).strip("/ ") if os.path.isdir(spfSrc): if bRecursive: addFolderToZipAndFileFile(hZip, spfSrc, spfDst, dVars, bRecursive) else: - if spfSrc.endswith((".py", ".js", ".json", ".css", ".xcu", ".xul", ".rdf", ".dtd", ".properties")): + if spfSrc.endswith((".py", ".js", ".json", ".html", ".htm", ".css", ".xcu", ".xul", ".rdf", ".dtd", ".properties")): hZip.writestr(spfDst, fileFile(spfSrc, dVars)) else: hZip.write(spfSrc, spfDst)