Edit Book: Fix sorting by language in Report->Words not working

This commit is contained in:
Kovid Goyal 2017-05-02 08:10:06 +05:30
parent 8d54c6b83a
commit 03b9edb84c
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -684,7 +684,7 @@ class WordsModel(FileCollection):
try:
return lsk_cache[loc]
except KeyError:
lsk_cache[loc] = (psk(calibre_langcode_to_name(canonicalize_lang(loc[0]))), psk(loc[1] or ''))
lsk_cache[loc] = psk(calibre_langcode_to_name(canonicalize_lang(loc[0])) + (loc[1] or ''))
return lsk_cache[loc]
self.sort_keys = tuple((psk(entry.word), locale_sort_key(entry.locale), len(entry.usage)) for entry in self.files)