mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Ignore added dictionaries that do not have a country code
These dictionaries were added mistakenly due to a bug in 1.33
This commit is contained in:
parent
b1a45f3147
commit
e7a279e1c4
@ -91,8 +91,11 @@ def custom_dictionaries(reread=False):
|
||||
except IndexError:
|
||||
continue
|
||||
base = os.path.dirname(lc)
|
||||
ploc = parse_lang_code(locale)
|
||||
if ploc.countrycode is None:
|
||||
continue
|
||||
dics.append(Dictionary(
|
||||
parse_lang_code(locale), frozenset(map(parse_lang_code, locales)), os.path.join(base, '%s.dic' % locale),
|
||||
ploc, frozenset(filter(lambda x:x.countrycode is not None, map(parse_lang_code, locales))), os.path.join(base, '%s.dic' % locale),
|
||||
os.path.join(base, '%s.aff' % locale), False, name, os.path.basename(base)))
|
||||
_custom = frozenset(dics)
|
||||
return _custom
|
||||
|
Loading…
x
Reference in New Issue
Block a user