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}>") DELETED gc_lang/fr/mailext/chrome.manifest Index: gc_lang/fr/mailext/chrome.manifest ================================================================== --- gc_lang/fr/mailext/chrome.manifest +++ gc_lang/fr/mailext/chrome.manifest @@ -1,9 +0,0 @@ -# https://developer.mozilla.org/en-US/docs/Chrome_Registration -content grammarchecker content/ -content promiseworker ./worker/ -resource grammalecte ./grammalecte/ -locale grammarchecker fr locale/fr/ -locale grammarchecker en locale/en/ -skin grammarchecker classic/1.0 skin/ -overlay chrome://messenger/content/messengercompose/messengercompose.xul chrome://grammarchecker/content/overlay.xul -style chrome://messenger/content/customizeToolbar.xul chrome://grammarchecker/content/overlay.css DELETED gc_lang/fr/mailext/content/about.css Index: gc_lang/fr/mailext/content/about.css ================================================================== --- gc_lang/fr/mailext/content/about.css +++ gc_lang/fr/mailext/content/about.css @@ -1,46 +0,0 @@ -/* CSS */ - -.descr { - font-size: 18px; - font-weight: bold; - text-align: center; -} - -.stdlabel { - font-size: 16px; - text-align: center; -} - -#website { - font-size: 16px; - font-weight: bold; - color: hsl(210, 50%, 50%); - text-align: center; - cursor: pointer; -} - -#contrib { - font-size: 16px; - text-align: center; - color: hsl(210, 50%, 50%); - cursor: pointer; -} - - -/* - TB Next: fix dialogheaders -*/ -dialogheader { - -moz-binding: url("chrome://messenger/content/generalBindings.xml#dialogheader"); - margin: 0 5px 5px; - border: 1px solid ThreeDDarkShadow; - padding: 5px 8px; - background-color: Highlight; - color: HighlightText; -} - -.dialogheader-title { - margin: 0 !important; - font-size: larger; - font-weight: bold; -} DELETED gc_lang/fr/mailext/content/about.js Index: gc_lang/fr/mailext/content/about.js ================================================================== --- gc_lang/fr/mailext/content/about.js +++ gc_lang/fr/mailext/content/about.js @@ -1,35 +0,0 @@ -// JavaScript - -const Cc = Components.classes; -const Ci = Components.interfaces; -//const Cu = Components.utils; - - -function openInBrowserURL (sURL) { - // method found in S3.Google.Translator - try { - openURL(sURL); - // Works in overlay.js, but not here… Seems there is no documentation available about this feature on Mozilla.org - } - catch (e) { - console.error(e); - //Cu.reportError(e); - } -} - -function openInTabURL (sURL) { - // method found in S3.Google.Translator - try { - let xWM = Cc["@mozilla.org/appshell/window-mediator;1"].getService(Ci.nsIWindowMediator); - let xWin = xWM.getMostRecentWindow("mail:3pane"); - let xTabmail = xWin.document.getElementById('tabmail'); - xWin.focus(); - if (xTabmail) { - xTabmail.openTab('contentTab', { contentPage: sURL }); - } - } - catch (e) { - console.error(e); - //Cu.reportError(e); - } -} DELETED gc_lang/fr/mailext/content/about.xul Index: gc_lang/fr/mailext/content/about.xul ================================================================== --- gc_lang/fr/mailext/content/about.xul +++ gc_lang/fr/mailext/content/about.xul @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - -