Skip to content

Commit

Permalink
hide unknown words if present in the glossary
Browse files Browse the repository at this point in the history
  • Loading branch information
vpoulailleau committed Feb 2, 2021
1 parent 76b77e5 commit 97bde75
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions padpo/checkers/grammalecte.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
)

from padpo.checkers.baseclass import Checker, replace_quotes
from padpo.checkers.glossary import glossary
from padpo.pofile import PoFile, PoItem

log = simplelogging.get_logger()
Expand Down Expand Up @@ -93,6 +94,8 @@ def filter_out_spelling_error(self, warning: GrammalecteMessage) -> bool:
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):
Expand Down

0 comments on commit 97bde75

Please sign in to comment.