hide unknown words if present in the glossary

This commit is contained in:
Vincent Poulailleau 2021-02-02 14:30:21 +01:00
parent 76b77e502b
commit 97bde75feb
1 changed files with 3 additions and 0 deletions

View File

@ -13,6 +13,7 @@ from pygrammalecte import (
)
from padpo.checkers.baseclass import Checker, replace_quotes
from padpo.checkers.glossary import glossary
from padpo.pofile import PoFile, PoItem
log = simplelogging.get_logger()
@ -93,6 +94,8 @@ class GrammalecteChecker(Checker):
return True # white list
if warning.word.endswith("_"):
return True
if warning.word.lower() in glossary:
return True
return False
def get_personal_dict(self):