Overview
Comment: | [tb] load personal dictionary at startup |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | tb | multid |
Files: | files | file ages | folders |
SHA3-256: |
0ab0682f550100e8bb4adb9106ededcc |
User & Date: | olr on 2018-03-20 11:13:07 |
Other Links: | branch diff | manifest | tags |
Context
2018-03-20
| ||
12:04 | [tb] comment: spelling mistake check-in: 0726b05211 user: olr tags: tb, multid | |
11:13 | [tb] load personal dictionary at startup check-in: 0ab0682f55 user: olr tags: tb, multid | |
09:21 | [tb] timeout: progress bar to 0 after 2 s check-in: 5eb79332a3 user: olr tags: tb, multid | |
Changes
Added gc_lang/fr/tb/content/file_handler.js version [39a972038f].
|
Modified gc_lang/fr/tb/content/lex_editor.js from [7abca98323] to [e1b304940a].
1 2 3 4 5 6 7 8 9 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | - - | // JavaScript "use strict"; const Cc = Components.classes; const Ci = Components.interfaces; const Cu = Components.utils; const prefs = Cc["@mozilla.org/preferences-service;1"].getService(Ci.nsIPrefService).getBranch("extensions.grammarchecker."); |
︙ | |||
472 473 474 475 476 477 478 479 | 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | export: function () { let sJSON = JSON.stringify(this.oIBDAWG.getJSON()); oFileHandler.saveAs(sJSON); } } |
Modified gc_lang/fr/tb/content/lex_editor.xul from [509f3f99a7] to [d3f3183550].
︙ | |||
215 216 217 218 219 220 221 222 223 224 | 215 216 217 218 219 220 221 222 223 224 225 | + | <script type="application/x-javascript" src="resource://grammalecte/graphspell/helpers.js" /> <script type="application/x-javascript" src="resource://grammalecte/graphspell/str_transform.js" /> <script type="application/x-javascript" src="resource://grammalecte/graphspell/dawg.js" /> <script type="application/x-javascript" src="resource://grammalecte/graphspell/ibdawg.js" /> <script type="application/x-javascript" src="resource://grammalecte/fr/conj.js" /> <script type="application/x-javascript" src="resource://grammalecte/fr/conj_generator.js" /> <script type="application/x-javascript" src="file_handler.js" /> <script type="application/x-javascript" src="lex_editor.js" /> </dialog> |
Modified gc_lang/fr/tb/content/overlay.js from [94ffc58fa0] to [a85c2d244d].
︙ | |||
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 | 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 | + + + + + + + + | xGCEWorker: null, bDictActive: null, loadGC: function () { if (this.xGCEWorker === null) { // Grammar checker echo('Loading Grammalecte'); this.xGCEWorker = new BasePromiseWorker('chrome://promiseworker/content/gce_worker.js'); let that = this; let xPromise = this.xGCEWorker.post('loadGrammarChecker', [prefs.getCharPref("sGCOptions"), "Thunderbird"]); xPromise.then( function (aVal) { echo(aVal); prefs.setCharPref("sGCOptions", aVal); if (prefs.getBoolPref("bPersonalDictionary")) { let sDicJSON = oFileHandler.loadFile("fr.personal.json"); if (sDicJSON) { that.xGCEWorker.post('setDictionary', ["personal", sDicJSON]); } } }, function (aReason) { echo('Promise rejected - ', aReason); } ).catch( function (aCaught) { echo('Promise Error - ', aCaught); } ); } }, fullTests: function () { echo('Performing tests... Wait...'); let xPromise = this.xGCEWorker.post('fullTests', ['{"nbsp":true, "esp":true, "unit":true, "num":true}']); xPromise.then( function (aVal) { |
︙ |
Modified gc_lang/fr/tb/content/overlay.xul from [991053c2ea] to [74df4d6d6c].
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | + | <?xml version="1.0" encoding="UTF-8"?> <?xml-stylesheet href="chrome://grammarchecker/content/overlay.css" type="text/css"?> <!DOCTYPE overlay SYSTEM "chrome://grammarchecker/locale/overlay.dtd"> <overlay id="grammarchecker-overlay" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <script type="application/x-javascript" src="chrome://global/content/globalOverlay.js"/> <script type="application/x-javascript" src="overlay.js"/> <script type="application/x-javascript" src="file_handler.js"/> <script type="application/x-javascript" src="spellchecker.js"/> <script type="application/x-javascript" src="editor.js"/> <stringbundleset id="stringbundleset"> <stringbundle id="grammarchecker-strings" src="chrome://grammarchecker/locale/grammarchecker.properties"/> </stringbundleset> |
︙ |
Modified gc_lang/fr/tb/defaults/preferences/grammarchecker.js from [768dd584ea] to [1b1284d83a].
1 2 3 4 5 6 7 | 1 2 3 4 5 6 7 8 9 10 | - - - + + + | pref("extensions.grammarchecker.sGCOptions", ""); pref("extensions.grammarchecker.sTFOptions", ""); pref("extensions.grammarchecker.bDictModern", false); pref("extensions.grammarchecker.bDictClassic", true); pref("extensions.grammarchecker.bDictReform", false); pref("extensions.grammarchecker.bDictClassicReform", false); pref("extensions.grammarchecker.bCheckSignature", true); |
Modified gc_lang/fr/tb/worker/gce_worker.js from [4fc9e7a3c2] to [43b4c7c8b0].
︙ | |||
73 74 75 76 77 78 79 80 81 82 83 84 85 86 | 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 100 101 102 103 104 105 106 107 | + + + + + + + + + + + + + + + + + + + + + | return gce.getOptions().gl_toString(); } catch (e) { console.log("# Error: " + e.fileName + "\n" + e.name + "\nline: " + e.lineNumber + "\n" + e.message); } } } function setDictionary (sTypeDic, sDicJSON) { try { console.log("set dictionary: " + sTypeDic); let oJSON = JSON.parse(sDicJSON); switch (sTypeDic) { case "extended": break; case "community": break; case "personal": oSpellChecker.setPersonalDictionary(oJSON); break; default: console.log("[GCE worker] unknow dictionary type"); } } catch (e) { console.error(e); } } function parse (sText, sCountry, bDebug, bContext) { let aGrammErr = gce.parse(sText, sCountry, bDebug, bContext); return JSON.stringify(aGrammErr); } function parseAndSpellcheck (sText, sCountry, bDebug, bContext) { |
︙ |