Overview
Comment: | [fx] grammar checking options |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | fx | webext2 |
Files: | files | file ages | folders |
SHA3-256: |
8c4e3dec4c44a022655f32bdaf13106f |
User & Date: | olr on 2017-08-28 14:45:33 |
Other Links: | branch diff | manifest | tags |
Context
2017-08-28
| ||
15:35 | [fx] wrapper CSS update check-in: 4414e3913f user: olr tags: fx, webext2 | |
14:45 | [fx] grammar checking options check-in: 8c4e3dec4c user: olr tags: fx, webext2 | |
2017-08-27
| ||
09:19 | [fx] main panel ui adjustment check-in: 8c33d83d25 user: olr tags: fx, webext2 | |
Changes
Modified gc_lang/fr/build.py from [3334f6b510] to [677a5b04fd].
︙ | |||
29 30 31 32 33 34 35 | 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | - + | def _createOptionsForWebExtension (dVars): sHTML = "" sLang = dVars['sDefaultUILang'] for sSection, lOpt in dVars['lStructOpt']: sHTML += f'\n<div id="subsection_{sSection}" class="opt_subsection">\n <h2 data-l10n-id="option_{sSection}">{dVars["dOptLabel"][sLang][sSection][0]}</h2>\n' for lLineOpt in lOpt: for sOpt in lLineOpt: |
︙ |
Modified gc_lang/fr/webext/background.js from [c04d704430] to [32e8b61dc7].
︙ | |||
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | 13 14 15 16 17 18 19 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 | + + - - - - + + + - + + + + + + + + + + + + + + + + - + + + + + + + + | xGCEWorker.onmessage = function (e) { // https://developer.mozilla.org/en-US/docs/Web/API/MessageEvent try { let {sActionDone, result, dInfo} = e.data; switch (sActionDone) { case "init": browser.storage.local.set({"gc_options": result}); break; case "parse": case "parseAndSpellcheck": case "parseAndSpellcheck1": case "getListOfTokens": // send result to content script if (typeof(dInfo.iReturnPort) === "number") { let xPort = dConnx.get(dInfo.iReturnPort); xPort.postMessage(e.data); } else { console.log("[background] don’t know where to send results"); console.log(e.data); } break; case "textToTest": |
︙ |
Modified gc_lang/fr/webext/gce_worker.js from [1a2b4f786b] to [615fe67e99].
︙ | |||
143 144 145 146 147 148 149 | 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 | - + - - + + - + | This worker don’t work as a PromiseWorker (which returns a promise), so when we send request to this worker, we can’t wait the return of the answer just after the request made. The answer is received by the background in another function (onmessage). That’s why the full text to analyze is send in one block, but analyse is returned paragraph by paragraph. */ |
︙ | |||
200 201 202 203 204 205 206 | 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 | - + - + - - - + + + + - + - + | function parseAndSpellcheck1 (sParagraph, sCountry, bDebug, bContext, dInfo={}) { let aGrammErr = gc_engine.parse(sParagraph, sCountry, bDebug, bContext); let aSpellErr = oTokenizer.getSpellingErrors(sParagraph, oDict); postMessage(createResponse("parseAndSpellcheck1", {sParagraph: sParagraph, aGrammErr: aGrammErr, aSpellErr: aSpellErr}, dInfo, true)); } function getOptions (dInfo={}) { |
︙ |
Modified gc_lang/fr/webext/panel/main.js from [40cb36fd8a] to [bc8475212d].
1 2 3 4 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 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 | - + - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + - - - - - + + + + + + + + + + + + + + + + + | // Main panel "use strict"; |
︙ | |||
79 80 81 82 83 84 85 | 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 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 129 130 131 132 133 134 135 136 | + - - - + + + + - - + + + + - + + + - - + + + + + + - - - - - + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + | } /* Messages received */ function handleMessage (oMessage, xSender, sendResponse) { let {sActionDone, result, dInfo, bEnd, bError} = oMessage; |