Index: gc_lang/fr/grammalecte.update.xml ================================================================== --- gc_lang/fr/grammalecte.update.xml +++ gc_lang/fr/grammalecte.update.xml @@ -1,8 +1,8 @@ - + - + Index: gc_lang/fr/modules-js/gce_suggestions.js ================================================================== --- gc_lang/fr/modules-js/gce_suggestions.js +++ gc_lang/fr/modules-js/gce_suggestions.js @@ -267,10 +267,11 @@ mfsp.getMiscPlural(sFlex).forEach(function(x) { aSugg.add(x); }); } if (aSugg.size == 0 && bSelfSugg && (sFlex.endsWith("s") || sFlex.endsWith("x") || sFlex.endsWith("S") || sFlex.endsWith("X"))) { aSugg.add(sFlex); } + aSugg.delete(""); if (aSugg.size > 0) { return Array.from(aSugg).join("|"); } return ""; } @@ -298,10 +299,11 @@ aSugg.add(sFlex.slice(0,-1)); } if (bSelfSugg && aSugg.size == 0) { aSugg.add(sFlex); } + aSugg.delete(""); if (aSugg.size > 0) { return Array.from(aSugg).join("|"); } return ""; } @@ -333,10 +335,11 @@ if (bSuggSimil) { for (let e of phonet.selectSimil(sFlex, ":m:[si]")) { aSugg.add(e); } } + aSugg.delete(""); if (aSugg.size > 0) { return Array.from(aSugg).join("|"); } return ""; } @@ -372,10 +375,11 @@ if (bSuggSimil) { for (let e of phonet.selectSimil(sFlex, ":m:[pi]")) { aSugg.add(e); } } + aSugg.delete(""); if (aSugg.size > 0) { return Array.from(aSugg).join("|"); } return ""; } @@ -406,10 +410,11 @@ if (bSuggSimil) { for (let e of phonet.selectSimil(sFlex, ":f:[si]")) { aSugg.add(e); } } + aSugg.delete(""); if (aSugg.size > 0) { return Array.from(aSugg).join("|"); } return ""; } @@ -439,10 +444,11 @@ if (bSuggSimil) { for (let e of phonet.selectSimil(sFlex, ":f:[pi]")) { aSugg.add(e); } } + aSugg.delete(""); if (aSugg.size > 0) { return Array.from(aSugg).join("|"); } return ""; } Index: gc_lang/fr/modules/gce_suggestions.py ================================================================== --- gc_lang/fr/modules/gce_suggestions.py +++ gc_lang/fr/modules/gce_suggestions.py @@ -200,10 +200,11 @@ aSugg.add(sFlex+"x") if mfsp.hasMiscPlural(sFlex): aSugg.update(mfsp.getMiscPlural(sFlex)) if not aSugg and bSelfSugg and sFlex.endswith(("s", "x", "S", "X")): aSugg.add(sFlex) + aSugg.discard("") if aSugg: return "|".join(aSugg) return "" @@ -222,10 +223,11 @@ aSugg.add(sFlex[:-2]+"IL") if sFlex.endswith(("s", "x", "S", "X")) and _oSpellChecker.isValid(sFlex[:-1]): aSugg.add(sFlex[:-1]) if bSelfSugg and not aSugg: aSugg.add(sFlex) + aSugg.discard("") if aSugg: return "|".join(aSugg) return "" @@ -249,10 +251,11 @@ # If not, we consider it’s better to not suggest the masculine one, as it can be considered invariable. aSugg.add(conj.getConj(sVerb, ":PQ", ":Q1")) if bSuggSimil: for e in phonet.selectSimil(sFlex, ":m:[si]"): aSugg.add(e) + aSugg.discard("") if aSugg: return "|".join(aSugg) return "" @@ -279,10 +282,11 @@ if sSugg.endswith("s"): aSugg.add(sSugg) if bSuggSimil: for e in phonet.selectSimil(sFlex, ":m:[pi]"): aSugg.add(e) + aSugg.discard("") if aSugg: return "|".join(aSugg) return "" @@ -304,10 +308,11 @@ if conj.hasConj(sVerb, ":PQ", ":Q3"): aSugg.add(conj.getConj(sVerb, ":PQ", ":Q3")) if bSuggSimil: for e in phonet.selectSimil(sFlex, ":f:[si]"): aSugg.add(e) + aSugg.discard("") if aSugg: return "|".join(aSugg) return "" @@ -329,10 +334,11 @@ if conj.hasConj(sVerb, ":PQ", ":Q4"): aSugg.add(conj.getConj(sVerb, ":PQ", ":Q4")) if bSuggSimil: for e in phonet.selectSimil(sFlex, ":f:[pi]"): aSugg.add(e) + aSugg.discard("") if aSugg: return "|".join(aSugg) return ""