EPUB/MOBI Catalogs: Fix prefix rules not working when calibre UI language is something other than English

This commit is contained in:
Kovid Goyal 2019-01-14 08:39:58 +05:30
parent 469b633e7e
commit b53f33db0e
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -581,7 +581,7 @@ class CatalogBuilder(object):
# Compare the record to each rule looking for a match
for rule in self.prefix_rules:
# Literal comparison for Tags field
if rule['field'].lower() == 'tags':
if rule['field'].lower() == 'tags' or rule['field'] == _('Tags'):
if rule['pattern'].lower() in map(unicode.lower, record['tags']):
if self.DEBUG and self.opts.verbose:
self.opts.log.info(" %s '%s' by %s (%s: Tags includes '%s')" %