From e90511c17940b4c512a5c8c0a2c51099b8867e8c Mon Sep 17 00:00:00 2001 From: Nicolas Froment Date: Sun, 22 Nov 2020 02:00:57 +1300 Subject: [PATCH] =?UTF-8?q?[FR]=20Handle=20the=20'd=C3=A9verbal=20sans=20s?= =?UTF-8?q?uffixe'=20template=20(closes=20#241)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/lang/fr/__init__.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/lang/fr/__init__.py b/scripts/lang/fr/__init__.py index 2ecb25417..e2651feaa 100644 --- a/scripts/lang/fr/__init__.py +++ b/scripts/lang/fr/__init__.py @@ -596,6 +596,8 @@ def last_template_handler(template: Tuple[str, ...], locale: str) -> str: 'déverbal de peko' >>> last_template_handler(["déverbal", "de=accueillir", "lang=fr", "m=1"], "fr") 'Déverbal de accueillir' + >>> last_template_handler(["déverbal sans suffixe", "de=réserver", "lang=fr", "m=1"], "fr") + 'Déverbal sans suffixe de réserver' >>> last_template_handler(["recons", "maruos"], "fr") '*maruos' @@ -740,11 +742,11 @@ def last_template_handler(template: Tuple[str, ...], locale: str) -> str: return term(capitalize(date)) # Handle {{déverbal}} and {{dénominal}} template - if tpl in ("dénominal", "déverbal"): + if tpl in ("dénominal", "déverbal", "déverbal sans suffixe"): data = extract_keywords_from(parts) phrase = tpl if data["m"] == "1": - phrase = phrase.capitalize() + phrase = capitalize(phrase) if data["de"]: if data["nolien"] != "1":