Actually use min_score in _language_in_list

We don't need to set it to any value but 80 now, but we will need to if
we try to distinguish three kinds of Chinese (zh-Hans, zh-Hant, and
unified zh-Hani).
This commit is contained in:
Robyn Speer 2018-03-14 15:08:52 -04:00
parent c57032d5cb
commit 2ecf31ee81

View File

@ -31,7 +31,7 @@ def _language_in_list(language, targets, min_score=80):
The languages can be given as strings (language tags) or as Language The languages can be given as strings (language tags) or as Language
objects. `targets` can be any iterable of such languages. objects. `targets` can be any iterable of such languages.
""" """
matched = best_match(language, targets) matched = best_match(language, targets, min_score=min_score)
return matched[1] > 0 return matched[1] > 0