Overview
Comment: | [fx][graphspell][js] spelling selector |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk | fx | graphspell |
Files: | files | file ages | folders |
SHA3-256: |
395558764c271e723c458a99de2cd4c4 |
User & Date: | olr on 2019-10-09 16:58:07 |
Other Links: | manifest | tags |
Context
2019-10-10
| ||
11:21 | [fr] ajustements et faux positif check-in: e1d086f4bb user: olr tags: trunk, fr | |
2019-10-09
| ||
16:58 | [fx][graphspell][js] spelling selector check-in: 395558764c user: olr tags: trunk, fx, graphspell | |
11:35 | [fr] ajustements check-in: 97aba9fb36 user: olr tags: trunk, fr | |
Changes
Modified gc_lang/fr/webext/background.js from [80c174197e] to [abadc3982d].
︙ | |||
129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 | 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 | + + | browser.storage.local.get("ui_options").then(this._initUIOptions, showError); browser.storage.local.get("autorefresh_option").then(this._initUIOptions, showError); }, initGrammarChecker: function () { if (bChrome) { browser.storage.local.get("gc_options", this._initGrammarChecker); browser.storage.local.get("main_dic_name", this._setSpellingDictionaries); browser.storage.local.get("personal_dictionary", this._setSpellingDictionaries); browser.storage.local.get("community_dictionary", this._setSpellingDictionaries); browser.storage.local.get("oPersonalDictionary", this._setSpellingDictionaries); // deprecated browser.storage.local.get("sc_options", this._initSCOptions); return; } browser.storage.local.get("gc_options").then(this._initGrammarChecker, showError); browser.storage.local.get("main_dic_name", this._setSpellingDictionaries); browser.storage.local.get("personal_dictionary").then(this._setSpellingDictionaries, showError); browser.storage.local.get("community_dictionary").then(this._setSpellingDictionaries, showError); browser.storage.local.get("oPersonalDictionary").then(this._setSpellingDictionaries, showError); // deprecated browser.storage.local.get("sc_options").then(this._initSCOptions, showError); }, _initUIOptions: function (oSavedOptions) { |
︙ | |||
181 182 183 184 185 186 187 188 189 190 191 192 193 194 | 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 | + + + | if (oData.hasOwnProperty("oPersonalDictionary")) { // deprecated (to be removed in 2020) console.log("personal dictionary migration"); browser.storage.local.set({ "personal_dictionary": oData["oPersonalDictionary"] }); oWorkerHandler.xGCEWorker.postMessage({ sCommand: "setDictionary", dParam: { sDictionary: "personal", oDict: oData["oPersonalDictionary"] }, dInfo: {} }); browser.storage.local.remove("oPersonalDictionary"); } if (oData.hasOwnProperty("main_dic_name")) { oWorkerHandler.xGCEWorker.postMessage({ sCommand: "setDictionary", dParam: { sDictionary: "main", oDict: oData["main_dic_name"] }, dInfo: {sExtPath: browser.extension.getURL("")} }); } if (oData.hasOwnProperty("community_dictionary")) { oWorkerHandler.xGCEWorker.postMessage({ sCommand: "setDictionary", dParam: { sDictionary: "community", oDict: oData["community_dictionary"] }, dInfo: {} }); } if (oData.hasOwnProperty("personal_dictionary")) { oWorkerHandler.xGCEWorker.postMessage({ sCommand: "setDictionary", dParam: { sDictionary: "personal", oDict: oData["personal_dictionary"] }, dInfo: {} }); } }, |
︙ |
Modified gc_lang/fr/webext/gce_worker.js from [e0e4941142] to [1361b7ed42].
︙ | |||
351 352 353 354 355 356 357 | 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 | - + | if (!oSpellChecker) { postMessage(createResponse("setDictionary", "# Error. SpellChecker not loaded.", dInfo, true)); return; } //console.log("setDictionary", sDictionary); switch (sDictionary) { case "main": |
︙ |
Modified gc_lang/fr/webext/panel/main.css from [1b8ebe2e86] to [d8736acc3d].
︙ | |||
243 244 245 246 247 248 249 | 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 | - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | padding: 5px 10px; border-radius: 3px; font-size: 16px; text-align: center; cursor: pointer; } |
︙ |
Modified gc_lang/fr/webext/panel/main.html from [3ab24a6a79] to [f2ef069bc3].
︙ | |||
108 109 110 111 112 113 114 115 116 117 118 119 120 121 | 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 | + + + + + + + + | <section id="sc_options_page" class="page"> <h1>OPTIONS ORTHOGRAPHIQUES</h1> <div id="hunspell_options"> <h2>DICTIONNAIRES DE GRAMMALECTE</h2> <div class="option_section" id="main_dic_box"> <p><input type="checkbox" id="main_dic" data-dictionary="main" checked disabled="disabled" /> <label for="main_dic">Dictionnaire principal</label></p> <p class="option_description">Environ 83 000 entrées, 500 000 flexions.<br/>Ni éditable, ni désactivable.<br/>Ce dictionnaire est créé à partir du dictionnaire orthographique pour Firefox et LibreOffice, conçu sur le <a id="link_grammalecte" class="link" data-url="http://grammalecte.net/home.php?prj=fr">site de Grammalecte</a>.</p> <div id="spelling_section"> <p class="subheader">Orthographe</p> <p> <div class="radiolike" id="spelling_classic" data-dicname="fr-classic.json" />Classique</div> <div class="radiolike" id="spelling_reform" data-dicname="fr-reform.json" />Réforme 1990</div> <div class="radiolike selected" id="spelling_allvars" data-dicname="fr-allvars.json" />Toutes variantes</div> </p> </div> </div> <div class="option_section" id="community_dic_box"> <p><input type="checkbox" id="community_dic" data-dictionary="community" disabled/> <label for="community_dic" style="color: hsl(0, 0%, 70%);">Dictionnaire communautaire</label></p> <p class="option_description" style="color: hsl(0, 0%, 70%);">Ce dictionnaire est composé à partir de dictionnaires communautaires disponibles en ligne aux membres.</p> <p class="option_description">Non disponible. Fonctionnalité à venir.</p> <div class="button_row"> <!--<div class="dic_button" id="dic_community_button">Éditer</div> |
︙ |
Modified gc_lang/fr/webext/panel/main.js from [3c0ad50206] to [56de373e52].
︙ | |||
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 | 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 | + + + + + + + + + + + + + + + + + + + + + + | Events */ window.addEventListener( "click", function (xEvent) { let xElem = xEvent.target; if (xElem.id) { // tests if (xElem.id === "text_to_test_button") { browser.runtime.sendMessage({ sCommand: "textToTest", dParam: {sText: document.getElementById("text_to_test").value, sCountry: "FR", bDebug: true, bContext: false}, dInfo: {} }); } else if (xElem.id === "fulltests_button") { document.getElementById("tests_result").textContent = "Veuillez patienter…"; browser.runtime.sendMessage({ sCommand: "fullTests", dParam: {}, dInfo: {} }); } else if (xElem.id == "restart_worker") { browser.runtime.sendMessage({ sCommand: "restartWorker", dParam: { "nDelayLimit": 3 }, dInfo: {} }); } // grammar options else if (xElem.id === "default_options_button") { browser.runtime.sendMessage({ sCommand: "resetOptions", dParam: {}, dInfo: {} }); } else if (xElem.id.startsWith("option_")) { if (xElem.dataset.option) { browser.runtime.sendMessage({ sCommand: "setOption", dParam: {sOptName: xElem.dataset.option, bValue: xElem.checked}, dInfo: {} }); } } // dictionaries options else if (xElem.id.endsWith("_dic")) { if (xElem.dataset.dictionary) { storeSCOptions(); browser.runtime.sendMessage({ sCommand: "setDictionaryOnOff", dParam: {sDictionary: xElem.dataset.dictionary, bActivate: xElem.checked}, dInfo: {} }); } } else if (xElem.id.startsWith("spelling_")) { updateSpellingChoiceUI(xElem.id); let sMainDicName = document.getElementById(xElem.id).dataset.dicname; browser.storage.local.set({"main_dic_name": sMainDicName}); browser.runtime.sendMessage({ sCommand: "setDictionary", dParam: { sDictionary: "main", oDict: sMainDicName }, dInfo: { sExtPath: browser.extension.getURL("") } }); } // UI options else if (xElem.id.startsWith("ui_option_")) { storeUIOptions(); } // else if (xElem.id.startsWith("link_")) { browser.tabs.create({url: xElem.dataset.url}); } else if (xElem.id == "conj_button") { browser.runtime.sendMessage({ sCommand: "openConjugueurTab", dParam: {}, |
︙ | |||
95 96 97 98 99 100 101 | 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 | - - + - - - - - | else if (xElem.id == "dic_personal_button") { browser.runtime.sendMessage({ sCommand: "openLexiconEditor", dParam: { "dictionary": "__personal__"}, dInfo: {} }); } |
︙ | |||
226 227 228 229 230 231 232 233 234 | 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 | + - - + + - + - - - - - - - + + + + + + + + + + + + + + + + + + | /* SC Options */ function displaySCOptionsLoadedFromStorage () { if (bChrome) { browser.storage.local.get("sc_options", displaySCOptions); browser.storage.local.get("main_dic_name", displaySCOptions); return; } |
︙ |
Modified graphspell-js/ibdawg.js from [e63a96e0c5] to [e7f965d16f].
︙ | |||
94 95 96 97 98 99 100 | 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 | - - + + - + - - + + - + - + - + | } } class IBDAWG { // INDEXABLE BINARY DIRECT ACYCLIC WORD GRAPH |
︙ |
Modified graphspell-js/spellchecker.js from [f126930ef3] to [88587ea88f].
︙ | |||
52 53 54 55 56 57 58 | 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 | - + - + - + | // storage this.bStorage = false; this._dMorphologies = new Map(); // key: flexion, value: list of morphologies this._dLemmas = new Map(); // key: flexion, value: list of lemmas } _loadDictionary (dictionary, sPath="", bNecessary=false) { |
︙ |