Index: gc_lang/fr/webext/content_scripts/panel_gc.js ================================================================== --- gc_lang/fr/webext/content_scripts/panel_gc.js +++ gc_lang/fr/webext/content_scripts/panel_gc.js @@ -14,11 +14,11 @@ if (xElem.id.startsWith("grammalecte_sugg")) { oGrammalecte.oGCPanel.applySuggestion(xElem.id); } else if (xElem.id === "grammalecte_tooltip_ignore") { oGrammalecte.oGCPanel.ignoreError(xElem.id); } else if (xElem.id.startsWith("grammalecte_analysis")) { - oGrammalecte.oGCPanel.sendParagraphToGrammaticalAnalysis(parseInt(xElem.dataset.para_num, 10)); + oGrammalecte.oGCPanel.sendParagraphToLexicographer(parseInt(xElem.dataset.para_num, 10)); } else if (xElem.id.startsWith("grammalecte_check")) { oGrammalecte.oGCPanel.recheckParagraph(parseInt(xElem.dataset.para_num, 10)); } else if (xElem.id.startsWith("grammalecte_hide")) { xElem.parentNode.parentNode.style.display = "none"; } else if (xElem.id.startsWith("grammalecte_err") @@ -546,14 +546,20 @@ this.nLxgCount = 0; while (this.xLxgResultZone.firstChild) { this.xLxgResultZone.removeChild(this.xLxgResultZone.firstChild); } } + + addMessageToLexicographer (sMessage) { + let xNode = oGrammalecte.createNode("div", {className: "grammalecte_panel_flow_message", textContent: sMessage}); + this.xLxgResultZone.appendChild(xNode); + } + // Grammatical analysis - sendParagraphToGrammaticalAnalysis (iParaNum) { + sendParagraphToLexicographer (iParaNum) { let xParagraph = this.xParent.getElementById("grammalecte_paragraph" + iParaNum); this.xLxgInput.textContent = xParagraph.textContent; this.grammaticalAnalysis(); this.showLexicographer(); } @@ -563,11 +569,12 @@ return; } this.startWaitIcon(); this.clearLexicographer(); let sText = this.xLxgInput.innerText.replace(/\n/g, " "); - console.log(sText); + //console.log(sText); + this.addMessageToLexicographer("Analyse grammaticale : les mots sont analysés autant que possible en fonction du contexte (cette fonctionnalité est expérimentale)."); oGrammalecteBackgroundPort.parseFull(sText, "__GrammalectePanel__"); } showParagraphAnalysis (oResult) { if (!this.bOpened || oResult === null) { @@ -608,11 +615,12 @@ return; } this.startWaitIcon(); this.clearLexicographer(); let sText = this.xLxgInput.innerText; // to get carriage return (\n) - console.log(sText); + //console.log(sText); + this.addMessageToLexicographer("Analyse lexicale : chaque mot est analysé indépendamment du contexte."); oGrammalecteBackgroundPort.getListOfTokens(sText, "__GrammalectePanel__"); } addListOfTokens (oResult) { try {