Skip to content

Commit

Permalink
fix BoboTiG#1532: [FR] Support 'militant' template and other missing …
Browse files Browse the repository at this point in the history
…templates
  • Loading branch information
lasconic committed Jan 18, 2023
1 parent 6dcea5f commit cd83c7f
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
20 changes: 20 additions & 0 deletions wikidict/lang/fr/__init__.py
Expand Up @@ -205,6 +205,8 @@
templates_italic = {
**domain_templates,
**regions,
"Afghanistan": "Afghanistan",
"Rwanda": "Rwanda",
"absol": "Absolument",
"absolument": "Absolument",
"adj-indéf-avec-de": "Avec de",
Expand Down Expand Up @@ -239,6 +241,8 @@
"bioch": "Biochimie",
"biol": "Biologie",
"b-m-cour": "Beaucoup moins courant",
"beaucoup moins courant": "Beaucoup moins courant",
"beaucoup plus courant": "Beaucoup plus courant",
"botan": "Botanique",
"bot.": "Botanique",
"Bruxelles": "Brusseleer",
Expand All @@ -253,6 +257,7 @@
"compta": "Comptabilité",
"constr": "Construction",
"cour": "Courant",
"courant": "Courant",
"cours d'eau": "Géographie",
"cout": "Couture",
"critiqué": "Usage critiqué",
Expand Down Expand Up @@ -313,13 +318,15 @@
"idiom": "Idiotisme",
"idiomatique": "Sens figuré",
"idiomatisme": "Idiotisme",
"impersonnel": "Impersonnel",
"impr": "Imprimerie",
"improprement": "Usage critiqué",
"indén": "Indénombrable",
"indus": "Industrie",
"info": "Informatique",
"injur": "Injurieux",
"intrans": "Intransitif",
"intransitif": "Intransitif",
"iron": "Ironique",
"ironie": "Ironique",
"jardi": "Jardinage",
Expand All @@ -331,6 +338,7 @@
"litt": "Littéraire",
"locutions latines": "Latinisme",
"logi": "Logique",
"louchébem": "Louchébem",
"légis": "Droit",
"m-cour": "Moins courant",
"moins courant": "Moins courant",
Expand All @@ -348,6 +356,7 @@
"mercatique": "Marketing",
"métrol": "Métrologie",
"mili": "Militaire",
"militant": "Vocabulaire militant",
"minér": "Minéralogie",
"musi": "Musique",
"mythol": "Mythologie",
Expand All @@ -360,6 +369,7 @@
"météorol": "Météorologie",
"méton": "Par métonymie",
"métonymie": "Par métonymie",
"moderne": "Moderne",
"muscle": "Anatomie",
"neurol": "Neurologie",
"noms de domaine": "Informatique",
Expand All @@ -386,6 +396,7 @@
"par litote": "Par litote",
"par métonymie": "Par métonymie",
"par plaisanterie": "Par plaisanterie",
"parler bellifontain": "Parler bellifontain",
"part": "En particulier",
"partic": "En particulier",
"particulier": "En particulier",
Expand All @@ -410,6 +421,7 @@
"prog": "Programmation informatique",
"programmation": "Programmation informatique",
"pronl": "Pronominal",
"pronominal": "Pronominal",
"propre": "Sens propre",
"propriété": "Droit",
"propulsion": "Propulsion spatiale",
Expand All @@ -418,6 +430,7 @@
"psychol": "Psychologie",
"reli": "Religion",
"réciproque2": "Réciproque",
"réfléchi": "Réfléchi",
"réflexif": "Réfléchi",
"réseaux": "Réseaux informatiques",
"sci-fi": "Science-fiction",
Expand All @@ -443,6 +456,7 @@
"tr-fam": "Très familier",
"trans": "Transitif",
"transit": "Transitif",
"transitif": "Transitif",
"transports": "Transport",
"tradit": "orthographe traditionnelle",
"très-rare": "Très rare",
Expand Down Expand Up @@ -655,17 +669,23 @@
"fm?": "<i>féminin ou masculin (l’usage hésite)</i>",
"fm ?": "<i>féminin ou masculin (l’usage hésite)</i>",
"fplur": "<i>féminin pluriel</i>",
"fsing": "<i>féminin singulier</i>",
"génit": "<i>génitif</i>",
"genre": "Genre à préciser",
"genre ?": "Genre à préciser",
"généralement pluriel": "Ce terme est généralement utilisé au pluriel.",
"h": "<sup>(h aspiré)</sup>",
"h aspiré": "<sup>(h aspiré)</sup>",
"h_aspiré": "<sup>(h aspiré)</sup>",
"h muet": "<sup>(h muet)</sup>",
"i": "<i>intransitif</i>",
"impers": "<i>impersonnel</i>",
"indéterminé": "indéterminé",
"invar": "<i>invariable</i>",
"invariable": "<i>invariable</i>",
"invisible": "",
"la-note-ij": "(<b>Note&nbsp;:</b> Le ‹&nbsp;j&nbsp;›, absent du latin classique, traduit le ‹&nbsp;i&nbsp;› devant une voyelle dans la tradition scholastique française. Voyez «&nbsp;j en latin&nbsp;».)", # noqa
"liaison": "‿",
"m": "<i>masculin</i>",
"masculin": "<i>masculin</i>",
"majus": "<i>majuscule</i>",
Expand Down
2 changes: 1 addition & 1 deletion wikidict/utils.py
Expand Up @@ -381,7 +381,7 @@ def clean(text: str, locale: str = "en") -> str:

# Namespaces
# [[File:...|...]] -> ''
pattern = "|".join(iter(namespaces[locale]))
pattern = "|".join(iter(namespaces[locale] + namespaces["en"]))
text = sub(rf"\[\[(?:{pattern}):.+?(?=\]\])\]\]*", "", text)

# Links
Expand Down

0 comments on commit cd83c7f

Please sign in to comment.