Index: gc_lang/fr/webext/gce_worker.js ================================================================== --- gc_lang/fr/webext/gce_worker.js +++ gc_lang/fr/webext/gce_worker.js @@ -312,10 +312,11 @@ function setDictionary (sDictionary, oDict, dInfo) { if (!oSpellChecker) { postMessage(createResponse("setDictionary", "# Error. SpellChecker not loaded.", dInfo, true)); return; } + console.log("setDictionary", sDictionary); switch (sDictionary) { case "main": oSpellChecker.setMainDictionary(oDict); break; case "extended": @@ -326,21 +327,21 @@ break; case "personal": oSpellChecker.setPersonalDictionary(oDict); break; default: - console.log("[worker] setDictionary: Unknown dictionary"); + console.log("[worker] setDictionary: Unknown dictionary <"+sDictionary+">"); } postMessage(createResponse("setDictionary", true, dInfo, true)); } function setDictionaryOnOff (sDictionary, bActivate, dInfo) { if (!oSpellChecker) { postMessage(createResponse("setDictionary", "# Error. SpellChecker not loaded.", dInfo, true)); return; } - console.log(sDictionary, bActivate); + console.log("setDictionaryOnOff", sDictionary, bActivate); switch (sDictionary) { case "extended": if (bActivate) { oSpellChecker.activateExtendedDictionary(); } else { @@ -360,11 +361,11 @@ } else { oSpellChecker.deactivatePersonalDictionary(); } break; default: - console.log("[worker] setDictionaryOnOff: Unknown dictionary"); + console.log("[worker] setDictionaryOnOff: Unknown dictionary <"+sDictionary+">"); } postMessage(createResponse("setDictionary", true, dInfo, true)); } function getSpellSuggestions (sWord, dInfo) { Index: gc_lang/fr/webext/panel/lex_editor.js ================================================================== --- gc_lang/fr/webext/panel/lex_editor.js +++ gc_lang/fr/webext/panel/lex_editor.js @@ -579,15 +579,15 @@ let oDAWG = new DAWG(lEntry, "S", "fr", "Français", "Dictionnaire personnel", xProgressNode); let oJSON = oDAWG.createBinaryJSON(1); browser.storage.local.set({ "oPersonalDictionary": oJSON }); this.oIBDAWG = new IBDAWG(oJSON); this.setDictData(this.oIBDAWG.nEntry, this.oIBDAWG.sDate); - browser.runtime.sendMessage({ sCommand: "setDictionary", dParam: {sType: "personal", oDict: oJSON}, dInfo: {} }); + browser.runtime.sendMessage({ sCommand: "setDictionary", dParam: {sDictionary: "personal", oDict: oJSON}, dInfo: {} }); } else { this.setDictData(0, "[néant]"); browser.storage.local.set({ "oPersonalDictionary": "" }); - browser.runtime.sendMessage({ sCommand: "setDictionary", dParam: {sType: "personal", oDict: null}, dInfo: {} }); + browser.runtime.sendMessage({ sCommand: "setDictionary", dParam: {sDictionary: "personal", oDict: null}, dInfo: {} }); } }, export: function () { let xBlob = new Blob([ JSON.stringify(this.oIBDAWG.getJSON()) ], {type: 'application/json'});