Skip to content

Commit

Permalink
partial implementation of #58
Browse files Browse the repository at this point in the history
  • Loading branch information
vpoulailleau committed Feb 2, 2021
1 parent d39bb55 commit cb7dd30
Showing 1 changed file with 42 additions and 14 deletions.
56 changes: 42 additions & 14 deletions padpo/checkers/glossary.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,51 +39,65 @@ def check_item(self, item: PoItem):


# https://github.com/python/python-docs-fr/blob/
# 8a8a9f8dda4d7f40863f8b0d28f547d84f016ad3/CONTRIBUTING.rst
# 662b4ec48b27daa4fbef05cddc43da0d894b29e7/CONTRIBUTING.rst
glossary = {
"-like": ["-compatible"],
"abstract data type": ["type abstrait"],
"abstract data types": ["types abstraits"],
"argument": ["argument"],
"arguments": ["arguments"],
"backport": ["rétroporter"],
"backslash": ["antislash", "*backslash*"],
"backslashes": ["antislashs", "*backslashes*"],
"backtrace": ["trace d'appels", "trace de pile"],
"backtraces": ["traces d'appels", "traces de pile"],
"big-endian": ["gros-boutiste"],
"bound": ["lié"],
"bug": ["bogue", "*bug*"],
"bugs": ["bogues", "*bugs*"],
"built-in": ["native"],
"bug": ["bogue"],
"bugs": ["bogues"],
"built-in": ["native", "natif"],
"built-ins": ["fonctions natives"],
"bytecode": ["code intermédiaire"],
"callback": ["fonction de rappel"],
"callbacks": ["fonctions de rappel"],
"call stack": ["pile d'appels"],
"call stacks": ["piles d'appels"],
"caught": ["interceptée", "interceptées"], # exception
"debugging": ["débogage"],
"deep copy": ["copie récursive", "copie profonde"],
"double quote": ["guillemet"],
"double quotes": ["guillemets"],
"deprecated": ["obsolète"],
"e.g.": ["p. ex.", "par exemple"],
"et al.": ["et autre", "et ailleurs"],
"et al.": ["et autre", "et autres", "et ailleurs"],
"export": ["exporter", "exportation"],
"exports": ["exportations"],
"expression": ["expression"],
"expressions": ["expressions"],
"framework": ["cadriciel"],
"frozen package": ["paquet figé"],
"frozen packages": ["paquets figés"],
"frozen set": ["ensemble figé"],
"frozen sets": ["ensembles figés"],
"garbage collector": ["ramasse-miettes"],
"getter": ["accesseur"],
"getters": ["accesseurs"],
"i.e": ["c.-à-d.", "c'est-à-dire"],
"identifier": ["identifiant"],
"identifiers": ["identifiants"],
"index": ["indice"], # chaînes de caractères
"indexes": ["indices"], # chaînes de caractères
"immutable": ["immuable"],
"import": ["importer", "importation"],
"imports": ["importations"],
"installer": ["installateur"],
"installers": ["installateurs"],
"interpreter": ["interpréteur"],
"interpreters": ["interpréteurs"],
"keyword(?! argument)": ["mot clé"],
"keywords": ["mots clés"],
"keyword argument": ["argument nommé"],
"keyword arguments": ["arguments nommés"],
"library": ["bibliothèque"],
"libraries": ["bibliothèques"],
"list comprehension": ["liste en compréhension"],
Expand All @@ -107,23 +121,41 @@ def check_item(self, item: PoItem):
],
"return": ["renvoie"],
"returns": ["renvoie"],
"returned": ["renvoyé"],
"returned": ["renvoyé", "renvoyée", "renvoyés", "renvoyées"],
"roughly": ["approximativement", "à peu près"],
"setter": ["mutateur"],
"setters": ["mutateurs"],
"simple quote": ["guillemet simple"],
"simple quotes": ["guillemets simples"],
"socket": ["connecteur", "interface de connexion"],
"sockets": ["connecteurs", "interfaces de connexion"],
"specify": ["définir", "préciser"],
"statement": ["instruction"],
"statements": ["instructions"],
"subprocess": ["sous-processus"],
"subprocesses": ["sous-processus"],
"support": [
"prendre en charge",
"prend en charge",
"prennent en charge",
"implémenter",
"implémente",
"implémentent",
],
"thread": ["fil d'exécution"],
"threads": ["fils d'exécution"],
"traceback": ["trace d'appels", "trace de pile"],
"tracebacks": ["traces d'appels", "traces de pile"],
"underscore": ["tiret bas", "*underscore*"],
"underscores": ["tirets bas", "*underscores*"],
"(?<![-])tuple": ["*n*-uplet"],
"2-tuple": ["paire", "couple"],
"3-tuple": ["triplet"],
"4-tuple": ["quadruplet"],
"5-tuple": ["quintuplet"],
"6-tuple": ["sextuplet"],
"7-tuple": ["heptuplet"], # …
"typically": ["normalement", "habituellement", "comme d'habitude"],
"underscore": ["tiret bas", "*underscore*", "sous-tiret"],
"underscores": ["tirets bas", "*underscores*", "sous-tiret"],
"whitespace": ["caractère d'espacement"],
"whitespaces": ["caractères d'espacement"],
}
Expand All @@ -136,12 +168,8 @@ def check_item(self, item: PoItem):
"abstract base classes": ["classes de base abstraites"],
"annotation": ["annotation"],
"annotations": ["annotations"],
"asynchronous context manager": [
"gestionnaire de contexte asynchrone"
],
"asynchronous context managers": [
"gestionnaires de contexte asynchrone"
],
"asynchronous context manager": ["gestionnaire de contexte asynchrone"],
"asynchronous context managers": ["gestionnaires de contexte asynchrone"],
"asynchronous generator": ["générateur asynchrone"],
"asynchronous generators": ["générateurs asynchrones"],
"asynchronous iterable": ["itérable asynchrone"],
Expand Down

0 comments on commit cb7dd30

Please sign in to comment.