Grammalecte  Check-in [5603c72dbb]

Overview
Comment:[fx][bug] spelling: fix display of suggestions from multiple dictionaries
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk | fx
Files: files | file ages | folders
SHA3-256: 5603c72dbbad4707b8eb34317670f25b4d7ad0c766016f8e372b5a02533fde8a
User & Date: olr on 2018-03-07 09:22:30
Other Links: manifest | tags
Context
2018-03-07
10:06
[fr] contrôle des drapeaux pour les verbes du 1ᵉʳ et du 2ᵉ groupe check-in: 13cbee29cd user: olr tags: fr, trunk
09:22
[fx][bug] spelling: fix display of suggestions from multiple dictionaries check-in: 5603c72dbb user: olr tags: fx, trunk
2018-03-06
11:33
[build][tb] move the Thunberbird debug profile somewhere else check-in: d7e8aec548 user: olr tags: build, tb, trunk
Changes

Modified gc_lang/fr/webext/content_scripts/init.js from [8dd0bc574d] to [86174a3577].

236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
            if (!bEnd) {
                oGrammalecte.oLxgPanel.addListOfTokens(result);
            } else {
                oGrammalecte.oLxgPanel.stopWaitIcon();
            }
            break;
        case "getSpellSuggestions":
            oGrammalecte.oGCPanel.oTooltip.setSpellSuggestionsFor(result.sWord, result.aSugg, dInfo.sErrorId);
            break;
        /*
            Commands received from the context menu
            (Context menu are initialized in background)
        */
        // Grammar checker commands
        case "rightClickGCEditableNode":







|







236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
            if (!bEnd) {
                oGrammalecte.oLxgPanel.addListOfTokens(result);
            } else {
                oGrammalecte.oLxgPanel.stopWaitIcon();
            }
            break;
        case "getSpellSuggestions":
            oGrammalecte.oGCPanel.oTooltip.setSpellSuggestionsFor(result.sWord, result.aSugg, result.iSuggBlock, dInfo.sErrorId);
            break;
        /*
            Commands received from the context menu
            (Context menu are initialized in background)
        */
        // Grammar checker commands
        case "rightClickGCEditableNode":

Modified gc_lang/fr/webext/content_scripts/panel_gc.css from [c9ea205d87] to [60aa48d094].

109
110
111
112
113
114
115

116
117
118

119
120
121
122
123
124
125
...
148
149
150
151
152
153
154











155
156
157
158
159
160
161
    color: hsla(210, 0%, 96%, 1);
    font-family: Tahoma, "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", sans-serif;
    font-size: 11px;
    font-style: normal;
    text-align: center;
}
#grammalecte_tooltip_message {

    font-family: Tahoma, "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", sans-serif;
    font-size: 15px;
    margin: 0 0 5px 0;

}
#grammalecte_tooltip_ignore {
    display: inline-block;
    padding: 1px 5px;
    background-color: hsl(30, 30%, 40%);
    color: hsla(30, 0%, 96%, 1);
    border-radius: 2px;
................................................................................
#grammalecte_tooltip_url:hover {
    background-color: hsl(210, 50%, 60%);
    color: hsla(0, 0%, 100%, 1);
    text-shadow: 0 0 3px hsl(210, 30%, 60%);
}
#grammalecte_tooltip_sugg_title {
    padding: 0 10px;











    background-color: hsl(210, 10%, 90%);
    color: hsl(210, 50%, 30%);
    font-family: Tahoma, "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", sans-serif;
    font-size: 10px;
    font-weight: bold;
}
#grammalecte_tooltip_sugg_block {







>


<
>







 







>
>
>
>
>
>
>
>
>
>
>







109
110
111
112
113
114
115
116
117
118

119
120
121
122
123
124
125
126
...
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
    color: hsla(210, 0%, 96%, 1);
    font-family: Tahoma, "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", sans-serif;
    font-size: 11px;
    font-style: normal;
    text-align: center;
}
#grammalecte_tooltip_message {
    margin: 0 0 5px 0;
    font-family: Tahoma, "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", sans-serif;
    font-size: 15px;

    color: hsl(210, 50%, 96%);
}
#grammalecte_tooltip_ignore {
    display: inline-block;
    padding: 1px 5px;
    background-color: hsl(30, 30%, 40%);
    color: hsla(30, 0%, 96%, 1);
    border-radius: 2px;
................................................................................
#grammalecte_tooltip_url:hover {
    background-color: hsl(210, 50%, 60%);
    color: hsla(0, 0%, 100%, 1);
    text-shadow: 0 0 3px hsl(210, 30%, 60%);
}
#grammalecte_tooltip_sugg_title {
    padding: 0 10px;
    background-color: hsl(210, 10%, 90%);
    color: hsl(210, 50%, 30%);
    font-family: Tahoma, "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", sans-serif;
    font-size: 10px;
    font-weight: bold;
}
.grammalecte_tooltip_other_sugg_title {
    margin: 5px 0;
    padding: 0px 10px;
    line-height: normal;
    border-radius: 2px;
    background-color: hsl(210, 10%, 90%);
    color: hsl(210, 50%, 30%);
    font-family: Tahoma, "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", sans-serif;
    font-size: 10px;
    font-weight: bold;
}
#grammalecte_tooltip_sugg_block {

Modified gc_lang/fr/webext/content_scripts/panel_gc.js from [830eee61d0] to [8bd37de1f6].

390
391
392
393
394
395
396
397
398
399
400
401

402

403

404

405



406
407
408
409
410
411
412
413
414
415

416
417
418
419
420
421
422
        xNodeSugg.id = "grammalecte_sugg" + sErrorId + "--" + iSugg.toString();
        xNodeSugg.className = "grammalecte_tooltip_sugg";
        xNodeSugg.dataset.error_id = sErrorId;
        xNodeSugg.textContent = sSugg;
        return xNodeSugg;
    }

    setSpellSuggestionsFor (sWord, aSugg, sErrorId) {
        // spell checking suggestions
        try {
            if (sErrorId === this.sErrorId) {
                let xSuggBlock = document.getElementById("grammalecte_tooltip_sugg_block");

                xSuggBlock.textContent = "";

                if (!aSugg || aSugg.length == 0) {

                    xSuggBlock.appendChild(document.createTextNode("Aucune."));

                } else {



                    let iSugg = 0;
                    for (let sSugg of aSugg) {
                        xSuggBlock.appendChild(this._createSuggestion(sErrorId, iSugg, sSugg));
                        xSuggBlock.appendChild(document.createTextNode(" "));
                        iSugg += 1;
                    }
                }
            }
        }
        catch (e) {

            xSuggBlock.appendChild(document.createTextNode("# Oups. Le mécanisme de suggestion orthographique a rencontré un bug… (Ce module est encore en phase β.)"));
            showError(e);
        }
    }
}









|




>
|
>

>
|
>

>
>
>










>







390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
        xNodeSugg.id = "grammalecte_sugg" + sErrorId + "--" + iSugg.toString();
        xNodeSugg.className = "grammalecte_tooltip_sugg";
        xNodeSugg.dataset.error_id = sErrorId;
        xNodeSugg.textContent = sSugg;
        return xNodeSugg;
    }

    setSpellSuggestionsFor (sWord, aSugg, iSuggBlock, sErrorId) {
        // spell checking suggestions
        try {
            if (sErrorId === this.sErrorId) {
                let xSuggBlock = document.getElementById("grammalecte_tooltip_sugg_block");
                if (iSuggBlock == 0) {
                    xSuggBlock.textContent = "";
                }
                if (!aSugg || aSugg.length == 0) {
                    if (iSuggBlock == 0) {
                        xSuggBlock.appendChild(document.createTextNode("Aucune."));
                    }
                } else {
                    if (iSuggBlock > 0) {
                        xSuggBlock.appendChild(oGrammalecte.createNode("div", {className: "grammalecte_tooltip_other_sugg_title", textContent: "AUTRES SUGGESTIONS :"}));
                    }
                    let iSugg = 0;
                    for (let sSugg of aSugg) {
                        xSuggBlock.appendChild(this._createSuggestion(sErrorId, iSugg, sSugg));
                        xSuggBlock.appendChild(document.createTextNode(" "));
                        iSugg += 1;
                    }
                }
            }
        }
        catch (e) {
            let xSuggBlock = document.getElementById("grammalecte_tooltip_sugg_block");
            xSuggBlock.appendChild(document.createTextNode("# Oups. Le mécanisme de suggestion orthographique a rencontré un bug… (Ce module est encore en phase β.)"));
            showError(e);
        }
    }
}


Modified gc_lang/fr/webext/gce_worker.js from [9f37b00cd8] to [0e6bb7b841].

321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
}

function getSpellSuggestions (sWord, dInfo) {
    if (!oSpellChecker) {
        postMessage(createResponse("getSpellSuggestions", "# Error. SpellChecker not loaded.", dInfo, true));
        return;
    }
    let i = 1;
    for (let aSugg of oSpellChecker.suggest(sWord)) {
        postMessage(createResponse("getSpellSuggestions", {sWord: sWord, aSugg: aSugg, iSugg: i}, dInfo, true));
        i += 1;
    }
}


// Lexicographer








|

|







321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
}

function getSpellSuggestions (sWord, dInfo) {
    if (!oSpellChecker) {
        postMessage(createResponse("getSpellSuggestions", "# Error. SpellChecker not loaded.", dInfo, true));
        return;
    }
    let i = 0;
    for (let aSugg of oSpellChecker.suggest(sWord)) {
        postMessage(createResponse("getSpellSuggestions", {sWord: sWord, aSugg: aSugg, iSuggBlock: i}, dInfo, true));
        i += 1;
    }
}


// Lexicographer