Skip to content

Commit

Permalink
[FR] Handle the 'déverbal sans suffixe' template (closes #241)
Browse files Browse the repository at this point in the history
  • Loading branch information
lasconic committed Nov 21, 2020
1 parent e1bc1ce commit e90511c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions scripts/lang/fr/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -596,6 +596,8 @@ def last_template_handler(template: Tuple[str, ...], locale: str) -> str:
'déverbal de <i>peko</i>'
>>> last_template_handler(["déverbal", "de=accueillir", "lang=fr", "m=1"], "fr")
'Déverbal de <i>accueillir</i>'
>>> last_template_handler(["déverbal sans suffixe", "de=réserver", "lang=fr", "m=1"], "fr")
'Déverbal sans suffixe de <i>réserver</i>'
>>> last_template_handler(["recons", "maruos"], "fr")
'*<i>maruos</i>'
Expand Down Expand Up @@ -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":
Expand Down

0 comments on commit e90511c

Please sign in to comment.