Index: gc_lang/fr/webext/panel/lex_editor.css ================================================================== --- gc_lang/fr/webext/panel/lex_editor.css +++ gc_lang/fr/webext/panel/lex_editor.css @@ -114,10 +114,15 @@ } .container { display: flex; } +.dic_container { + display: flex; + align-items: center; + justify-content: space-between; +} .block { flex-grow: 1; margin: 5px; padding: 10px 15px 15px 15px; @@ -240,11 +245,10 @@ } table { border: 1px solid hsl(210, 10%, 50%); width: 100%; - min-height: 200px; } th { padding: 5px 10px; border-left: 1px solid hsl(210, 10%, 90%); text-align: left; Index: gc_lang/fr/webext/panel/lex_editor.html ================================================================== --- gc_lang/fr/webext/panel/lex_editor.html +++ gc_lang/fr/webext/panel/lex_editor.html @@ -16,21 +16,17 @@
Lexique
Ajout
-

Dictionnaire

-
- Exporter -
-
- Importer -
-

- Dictionnaire personnel : 0 entrées.
- Date d’enregistrement : néant. -

+
+

Dictionnaire personnel.

+
Enregistré le : néant.
+
0 entrées.
+
Exporter
+
Importer
+
Index: gc_lang/fr/webext/panel/lex_editor.js ================================================================== --- gc_lang/fr/webext/panel/lex_editor.js +++ gc_lang/fr/webext/panel/lex_editor.js @@ -180,10 +180,12 @@ } } const oGenerator = { + + sLemma: "", cMainTag: "", lFlexion: [], @@ -296,29 +298,29 @@ update: function () { try { this.lFlexion = []; let sGenderTag = ""; - let sLemma = document.getElementById("lemma").value.trim(); - if (sLemma.length > 0) { + this.sLemma = document.getElementById("lemma").value.trim(); + if (this.sLemma.length > 0) { switch (this.cMainTag) { case "N": if (!this.getRadioValue("POS") || !this.getRadioValue("genre")) { break; } let sTag = this.getRadioValue("POS") + this.getRadioValue("genre"); switch (this.getRadioValue("pluriel")) { case "s": - this.lFlexion.push([sLemma, sTag+":s/*"]); - this.lFlexion.push([sLemma+"s", sTag+":p/*"]); + this.lFlexion.push([this.sLemma, sTag+":s/*"]); + this.lFlexion.push([this.sLemma+"s", sTag+":p/*"]); break; case "x": - this.lFlexion.push([sLemma, sTag+":s/*"]); - this.lFlexion.push([sLemma+"x", sTag+":p/*"]); + this.lFlexion.push([this.sLemma, sTag+":s/*"]); + this.lFlexion.push([this.sLemma+"x", sTag+":p/*"]); break; case "i": - this.lFlexion.push([sLemma, sTag+":i/*"]); + this.lFlexion.push([this.sLemma, sTag+":i/*"]); break; } let sLemma2 = document.getElementById("lemma2").value.trim(); if (sLemma2.length > 0 && this.getRadioValue("POS2") && this.getRadioValue("genre2")) { let sTag2 = this.getRadioValue("POS2") + this.getRadioValue("genre2"); @@ -336,14 +338,14 @@ break; } } break; case "V": { - if (!sLemma.endsWith("er") && !sLemma.endsWith("ir") && !sLemma.endsWith("re")) { + if (!this.sLemma.endsWith("er") && !this.sLemma.endsWith("ir") && !this.sLemma.endsWith("re")) { break; } - sLemma = sLemma.toLowerCase(); + this.sLemma = this.sLemma.toLowerCase(); let cGroup = ""; let c_i = (document.getElementById("up_v_i").checked) ? "i" : "_"; let c_t = (document.getElementById("up_v_t").checked) ? "t" : "_"; let c_n = (document.getElementById("up_v_n").checked) ? "n" : "_"; let c_p = (document.getElementById("up_v_p").checked) ? "p" : "_"; @@ -354,17 +356,17 @@ if (!sVerbTag.endsWith("__") && !sVerbTag.startsWith("____")) { let sVerbPattern = document.getElementById("verb_pattern").value.trim(); if (sVerbPattern.length == 0) { // utilisation du générateur de conjugaison let bVarPpas = document.getElementById("up_partpas").checked; - for (let [sFlexion, sFlexTags] of conj_generator.conjugate(sLemma, sVerbTag, bVarPpas)) { + for (let [sFlexion, sFlexTags] of conj_generator.conjugate(this.sLemma, sVerbTag, bVarPpas)) { this.lFlexion.push([sFlexion, sFlexTags]); } } else { // copie du motif d’un autre verbe : utilisation du conjugueur if (conj.isVerb(sVerbPattern)) { - let oVerb = new Verb(sLemma, sVerbPattern); + let oVerb = new Verb(this.sLemma, sVerbPattern); for (let [sTag1, dFlex] of oVerb.dConj.entries()) { if (sTag1 !== ":Q") { for (let [sTag2, sConj] of dFlex.entries()) { if (sTag2.startsWith(":") && sConj !== "") { this.lFlexion.push([sConj, ":V" + oVerb.cGroup + "_" + sVerbTag + sTag1 + sTag2]); @@ -390,31 +392,31 @@ } } break; } case "W": - sLemma = sLemma.toLowerCase(); - this.lFlexion.push([sLemma, ":W/*"]); + this.sLemma = this.sLemma.toLowerCase(); + this.lFlexion.push([this.sLemma, ":W/*"]); break; case "M1": - sLemma = sLemma.slice(0,1).toUpperCase() + sLemma.slice(1); + this.sLemma = this.sLemma.slice(0,1).toUpperCase() + this.sLemma.slice(1); sGenderTag = this.getRadioValue("genre_m1"); if (sGenderTag) { - this.lFlexion.push([sLemma, ":M1"+sGenderTag+":i/*"]); + this.lFlexion.push([this.sLemma, ":M1"+sGenderTag+":i/*"]); } break; case "M2": - sLemma = sLemma.slice(0,1).toUpperCase() + sLemma.slice(1); + this.sLemma = this.sLemma.slice(0,1).toUpperCase() + this.sLemma.slice(1); sGenderTag = this.getRadioValue("genre_m2"); if (sGenderTag) { - this.lFlexion.push([sLemma, ":M2"+sGenderTag+":i/*"]); + this.lFlexion.push([this.sLemma, ":M2"+sGenderTag+":i/*"]); } break; case "MP": sGenderTag = this.getRadioValue("genre_mp"); if (sGenderTag) { - this.lFlexion.push([sLemma, ":MP"+sGenderTag+":i/*"]); + this.lFlexion.push([this.sLemma, ":MP"+sGenderTag+":i/*"]); } break; case "X": let sFlexion = document.getElementById("flexion").value.trim(); let sTags = document.getElementById("tags").value.trim(); @@ -437,14 +439,13 @@ } return null; }, createFlexLemmaTagArray: function () { - let sLemma = document.getElementById("lemma").value.trim(); let lEntry = []; for (let [sFlex, sTags] of oGenWordsTable.getEntries()) { - lEntry.push([sFlex, sLemma, sTags]); + lEntry.push([sFlex, this.sLemma, sTags]); } return lEntry; }, addToLexicon: function () {