Grammalecte  Diff

Differences From Artifact [d81c939773]:

To Artifact [f61d089690]:


414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
    let iParagraph = 0; // index of paragraphs, used for identification
    let nParagraph = 0; // non empty paragraphs
    let sRes = "";
    try {
        sText = sText.normalize("NFC"); // remove combining diacritics
        for (let sParagraph of text.getParagraph(sText)) {
            if (sParagraph.trim() !== "") {
                sRes = await xGCEWorker.post('parseAndGenerateParagraph', [sParagraph, iParagraph, "FR", false])
                xGCPanel.port.emit("addElem", sRes);
                nParagraph += 1;
            }
            iParagraph += 1;
        }
        xGCPanel.port.emit("addElem", '<p class="message">' + _("numberOfParagraphs") + " " + nParagraph + '</p>');
    }
    catch (e) {
        xGCPanel.port.emit("addElem", '<p class="bug">' + e.message + '</p>');
    }
    xGCPanel.port.emit("end");
}


/*
    Text Formatter







|
|




|


|







414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
    let iParagraph = 0; // index of paragraphs, used for identification
    let nParagraph = 0; // non empty paragraphs
    let sRes = "";
    try {
        sText = sText.normalize("NFC"); // remove combining diacritics
        for (let sParagraph of text.getParagraph(sText)) {
            if (sParagraph.trim() !== "") {
                sRes = await xGCEWorker.post('parseAndSpellcheck', [sParagraph, "FR", false, false]);
                xGCPanel.port.emit("addParagraph", sParagraph, iParagraph, sRes);
                nParagraph += 1;
            }
            iParagraph += 1;
        }
        xGCPanel.port.emit("addMessage", 'message', _("numberOfParagraphs") + " " + nParagraph);
    }
    catch (e) {
        xGCPanel.port.emit("addMessage", 'bug', e.message);
    }
    xGCPanel.port.emit("end");
}


/*
    Text Formatter
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
    xLxgPanel.port.emit("addSeparator", _("separator"));
    loadGrammarChecker();
    let nParagraph = 0; // non empty paragraphs
    let sRes = "";
    try {
        for (let sParagraph of text.getParagraph(sText)) {
            if (sParagraph.trim() !== "") {
                sRes = await xGCEWorker.post('analyzeWords', [sParagraph])
                xLxgPanel.port.emit("addElem", sRes);
                nParagraph += 1;
            }
        }
        xLxgPanel.port.emit("addElem", '<p class="message">' + _("numberOfParagraphs") + " " + nParagraph + '</p>');
    }
    catch (e) {
        xLxgPanel.port.emit("addElem", '<p class="bug">'+e.message+"</p>");
    }
    xLxgPanel.port.emit("stopWaitIcon");
}


/*
    Conjugueur







|
|



|


|







567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
    xLxgPanel.port.emit("addSeparator", _("separator"));
    loadGrammarChecker();
    let nParagraph = 0; // non empty paragraphs
    let sRes = "";
    try {
        for (let sParagraph of text.getParagraph(sText)) {
            if (sParagraph.trim() !== "") {
                sRes = await xGCEWorker.post('getListOfElements', [sParagraph]);
                xLxgPanel.port.emit("addParagraphElems", sRes);
                nParagraph += 1;
            }
        }
        xLxgPanel.port.emit("addMessage", 'message', _("numberOfParagraphs") + " " + nParagraph);
    }
    catch (e) {
        xLxgPanel.port.emit("addMessage", 'bug', e.message);
    }
    xLxgPanel.port.emit("stopWaitIcon");
}


/*
    Conjugueur