Index: gc_lang/fr/build.py
==================================================================
--- gc_lang/fr/build.py
+++ gc_lang/fr/build.py
@@ -91,10 +91,12 @@
hZip.write(spDict+"/"+sp+"/"+sp+".dic", "content/dictionaries/"+sp+"/"+sp+".dic")
hZip.write(spDict+"/"+sp+"/"+sp+".aff", "content/dictionaries/"+sp+"/"+sp+".aff")
hZip.close()
spfDebugProfile = dVars['win_tb_debug_extension_path'] if platform.system() == "Windows" else dVars['linux_tb_debug_extension_path']
helpers.unzip(spfZip, spfDebugProfile)
+ spfBetaProfile = dVars['win_tb_beta_extension_path'] if platform.system() == "Windows" else dVars['linux_tb_beta_extension_path']
+ helpers.unzip(spfZip, spfBetaProfile)
def _createOptionsForThunderbird (dVars):
dVars['sXULTabs'] = ""
dVars['sXULTabPanels'] = ""
Index: gc_lang/fr/config.ini
==================================================================
--- gc_lang/fr/config.ini
+++ gc_lang/fr/config.ini
@@ -46,12 +46,18 @@
linux_fx_nightly_path = /usr/bin/firefox
# Thunderbird
tb_identifier = French-GC-TB@grammalecte.net
tb_name = Grammalecte [fr]
+win_tb_path = C:\Program Files (x86)\Mozilla Thunderbird\thunderbird.exe
+win_tb_beta_path = C:\Program Files (x86)\Mozilla Thunderbird (Beta)\thunderbird.exe
+linux_tb_path = /usr/bin/thunderbird
+linux_tb_beta_path = /usr/bin/thunderbird
win_tb_debug_extension_path = D:\_temp\tb-debug.profile\extensions\French-GC-TB@grammalecte.net
linux_tb_debug_extension_path = ~/tb-debug.profile/extensions/French-GC-TB@grammalecte.net
+win_tb_beta_extension_path = D:\_temp\tb-beta.profile\extensions\French-GC-TB@grammalecte.net
+linux_tb_beta_extension_path = ~/tb-beta.profile/extensions/French-GC-TB@grammalecte.net
# Set Thunderbird folder in your PATH variable
# Create a local profile:
# thunderbird -CreateProfile "debug _build\tb-debug.profile"
# Or you can use the GUI with:
# thunderbird -P
Index: gc_lang/fr/tb/chrome.manifest
==================================================================
--- gc_lang/fr/tb/chrome.manifest
+++ gc_lang/fr/tb/chrome.manifest
@@ -4,6 +4,6 @@
resource grammalecte ./grammalecte-js/
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://global/content/customizeToolbar.xul chrome://grammarchecker/content/overlay.css
+style chrome://messenger/content/customizeToolbar.xul chrome://grammarchecker/content/overlay.css
Index: gc_lang/fr/tb/content/about.xul
==================================================================
--- gc_lang/fr/tb/content/about.xul
+++ gc_lang/fr/tb/content/about.xul
@@ -32,7 +32,7 @@
-
+
Index: gc_lang/fr/tb/content/conjugueur.xul
==================================================================
--- gc_lang/fr/tb/content/conjugueur.xul
+++ gc_lang/fr/tb/content/conjugueur.xul
@@ -152,7 +152,7 @@
-
+
Index: gc_lang/fr/tb/content/gc_options.xul
==================================================================
--- gc_lang/fr/tb/content/gc_options.xul
+++ gc_lang/fr/tb/content/gc_options.xul
@@ -29,8 +29,8 @@
${sXULTabPanels}
-
+
Index: gc_lang/fr/tb/content/overlay.xul
==================================================================
--- gc_lang/fr/tb/content/overlay.xul
+++ gc_lang/fr/tb/content/overlay.xul
@@ -4,14 +4,14 @@
-
-
-
-
+
+
+
+
Index: gc_lang/fr/tb/content/spell_options.xul
==================================================================
--- gc_lang/fr/tb/content/spell_options.xul
+++ gc_lang/fr/tb/content/spell_options.xul
@@ -32,9 +32,9 @@
&option.reform.descr;
&option.allvar.descr;
-
-
+
+
Index: graphspell-js/helpers.js
==================================================================
--- graphspell-js/helpers.js
+++ graphspell-js/helpers.js
@@ -51,18 +51,11 @@
// load ressources in workers (suggested by Mozilla extensions reviewers)
// for more options have a look here: https://gist.github.com/Noitidart/ec1e6b9a593ec7e3efed
// if not in workers, use sdk/data.load() instead
try {
let xRequest;
- if (typeof XMLHttpRequest !== "undefined") {
- xRequest = new XMLHttpRequest();
- } else {
- // JS sucks again… necessary for Thunderbird
- let { Cc, Ci } = require("chrome");
- xRequest = Cc["@mozilla.org/xmlextras/xmlhttprequest;1"].createInstance();
- xRequest.QueryInterface(Ci.nsIXMLHttpRequest);
- }
+ xRequest = new XMLHttpRequest();
xRequest.open('GET', spf, false); // 3rd arg is false for synchronous, sync is acceptable in workers
xRequest.overrideMimeType('text/json');
xRequest.send();
return xRequest.responseText;
}
Index: make.py
==================================================================
--- make.py
+++ make.py
@@ -363,10 +363,11 @@
xParser.add_argument("-aed", "--add_extended_dictionary", help="add extended dictionary to the build", action="store_true")
xParser.add_argument("-apd", "--add_personal_dictionary", help="add personal dictionary to the build", action="store_true")
xParser.add_argument("-fx", "--firefox", help="Launch Firefox Developper for WebExtension testing", action="store_true")
xParser.add_argument("-we", "--web_ext", help="Launch Firefox Nightly for WebExtension testing", action="store_true")
xParser.add_argument("-tb", "--thunderbird", help="Launch Thunderbird", action="store_true")
+ xParser.add_argument("-tbb", "--thunderbird_beta", help="Launch Thunderbird Beta", action="store_true")
xParser.add_argument("-i", "--install", help="install the extension in Writer (path of unopkg must be set in config.ini)", action="store_true")
xArgs = xParser.parse_args()
if xArgs.build_data:
xArgs.build_data_before = True
@@ -448,15 +449,21 @@
spfFirefox = dVars['win_fx_nightly_path'] if platform.system() == "Windows" else dVars['linux_fx_nightly_path']
os.system(r'web-ext run --firefox="' + spfFirefox + '" --browser-console --firefox-profile=debug')
# Thunderbird
if xArgs.thunderbird:
- os.system("thunderbird -jsconsole -P debug")
+ spfThunderbird = '"'+dVars['win_tb_path']+'"' if platform.system() == "Windows" else dVars['linux_tb_path']
+ print(spfThunderbird)
+ os.system(spfThunderbird + ' -jsconsole -P debug')
+ if xArgs.thunderbird_beta:
+ spfThunderbird = '"'+dVars['win_tb_beta_path']+'"' if platform.system() == "Windows" else dVars['linux_tb_beta_path']
+ print(spfThunderbird)
+ os.system(spfThunderbird + ' -jsconsole -P beta')
else:
print("Folder not found: gc_lang/"+sLang)
oNow = datetime.datetime.now()
print("============== MAKE GRAMMALECTE [finished] at {0.hour:>2} h {0.minute:>2} min {0.second:>2} s ==============".format(oNow))
if __name__ == '__main__':
main()