Skip to content

Commit

Permalink
[FR] Support the 'SIC' template (closes BoboTiG#367)
Browse files Browse the repository at this point in the history
  • Loading branch information
lasconic committed Nov 25, 2020
1 parent c87fb56 commit 128f999
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions scripts/lang/fr/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -531,6 +531,10 @@
"siècle2": 'f"{parts[1]}ème"',
# {{smcp|Dupont}}
"smcp": "small_caps(parts[1])",
# {{SIC}}
# {{sic !}}
"SIC": "f'<sup>[sic : {parts[1]}]</sup>' if len(parts) > 1 else '<sup>[sic]</sup>'",
"sic !": "f'<sup>[sic : {parts[1]}]</sup>' if len(parts) > 1 else '<sup>[sic]</sup>'",
# {{sport|fr}}
# {{sport|fr|collectifs}}
"sport": "term(capitalize(concat(parts, sep=' ', indexes=[0, 2])))",
Expand Down
2 changes: 2 additions & 0 deletions tests/test_fr.py
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,8 @@ def test_parse_word(
("{{pron-API|/j/}}", "/j/"),
("{{recons|lang-mot-vedette=fr|sporo|lang=frk|sc=Latn}}", "*<i>sporo</i>"),
("{{réf}}", ""),
("{{SIC}}", "<sup>[sic]</sup>"),
("{{sic !|Bevatron}}", "<sup>[sic : Bevatron]</sup>"),
("{{smo}}", "samoan"),
("{{sport}}", "<i>(Sport)</i>"),
("{{sport|fr|collectif}}", "<i>(Sport collectif)</i>"),
Expand Down

0 comments on commit 128f999

Please sign in to comment.