Skip to content

Commit

Permalink
[FR] Handle 'fr-verbe-flexion' template better (closes #203)
Browse files Browse the repository at this point in the history
  • Loading branch information
lasconic authored Nov 8, 2020
1 parent a23ac95 commit 72e99ae
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/lang/fr/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,7 @@
# {{forme pronominale|mutiner}}
"forme pronominale": 'f"{capitalize(tpl)} de {parts[1]}"',
# {fr-verbe-flexion|colliger|ind.i.3s=oui}}
"fr-verbe-flexion": "parts[1] if '=' not in parts[1] else parts[2]",
"fr-verbe-flexion": "[p for p in parts[1:] if '=' not in p][0]",
# {{îles|fr}}
# {{îles|fr|des Antilles}}
"îles": "term('Géographie')",
Expand Down
1 change: 1 addition & 0 deletions tests/test_fr.py
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,7 @@ def test_parse_word(word, pronunciation, genre, etymology, definitions, variant,
("{{fr-verbe-flexion|colliger|ind.i.3s=oui}}", "colliger"),
("{{fr-verbe-flexion|grp=3|couvrir|ind.i.3s=oui}}", "couvrir"),
("{{fr-verbe-flexion|impers=oui|revenir|ind.i.3s=oui}}", "revenir"),
("{{fr-verbe-flexion|grp=3|'=oui|ind.i.1s=oui|ind.i.2s=oui|avoir}}", "avoir"),
("{{lang|en|other rank}}", "other rank"),
("{{lexique|philosophie|fr}}", "<i>(Philosophie)</i>"),
("{{lexique|philosophie|sport|fr}}", "<i>(Philosophie, Sport)</i>"),
Expand Down

0 comments on commit 72e99ae

Please sign in to comment.