Index: gc_lang/fr/webext/gce_worker.js ================================================================== --- gc_lang/fr/webext/gce_worker.js +++ gc_lang/fr/webext/gce_worker.js @@ -318,10 +318,14 @@ break; case "extended": oSpellChecker.setExtendedDictionary(oDict); postMessage(createResponse("setDictionary", true, dInfo, true)); break; + case "community": + oSpellChecker.setCommunityDictionary(oDict); + postMessage(createResponse("setDictionary", true, dInfo, true)); + break; case "personal": oSpellChecker.setPersonalDictionary(oDict); postMessage(createResponse("setDictionary", true, dInfo, true)); break; default: 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 @@ -499,14 +499,18 @@ if (lEntry.length > 0) { 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); + this.setDictData(this.oIBDAWG.nEntry, this.oIBDAWG.sDate); browser.runtime.sendMessage({ sCommand: "setDictionary", dParam: {sType: "personal", oDict: oJSON}, dInfo: {} }); + showElement("export_button"); + } else { + this.setDictData(0, "[néant]"); + browser.storage.local.set({ "oPersonalDictionary": "" }); + browser.runtime.sendMessage({ sCommand: "setDictionary", dParam: {sType: "personal", oDict: null}, dInfo: {} }); } - showElement("export_button"); }, import: function () { console.log("import"); },