mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Added the '_' to the non-translated values to prevent possible clashes with translations
This commit is contained in:
parent
8f931ddb2f
commit
6482914216
@ -551,20 +551,20 @@ class ResultCache(SearchQueryParser): # {{{
|
|||||||
val = force_to_bool(item[loc])
|
val = force_to_bool(item[loc])
|
||||||
if not bools_are_tristate:
|
if not bools_are_tristate:
|
||||||
if val is None or not val: # item is None or set to false
|
if val is None or not val: # item is None or set to false
|
||||||
if query in [_('no'), _('unchecked'), 'no', 'false']:
|
if query in [_('no'), _('unchecked'), '_no', 'false']:
|
||||||
matches.add(item[0])
|
matches.add(item[0])
|
||||||
else: # item is explicitly set to true
|
else: # item is explicitly set to true
|
||||||
if query in [_('yes'), _('checked'), 'yes', 'true']:
|
if query in [_('yes'), _('checked'), '_yes', 'true']:
|
||||||
matches.add(item[0])
|
matches.add(item[0])
|
||||||
else:
|
else:
|
||||||
if val is None:
|
if val is None:
|
||||||
if query in [_('empty'), _('blank'), 'empty', 'false']:
|
if query in [_('empty'), _('blank'), '_empty', 'false']:
|
||||||
matches.add(item[0])
|
matches.add(item[0])
|
||||||
elif not val: # is not None and false
|
elif not val: # is not None and false
|
||||||
if query in [_('no'), _('unchecked'), 'no', 'true']:
|
if query in [_('no'), _('unchecked'), '_no', 'true']:
|
||||||
matches.add(item[0])
|
matches.add(item[0])
|
||||||
else: # item is not None and true
|
else: # item is not None and true
|
||||||
if query in [_('yes'), _('checked'), 'yes', 'true']:
|
if query in [_('yes'), _('checked'), '_yes', 'true']:
|
||||||
matches.add(item[0])
|
matches.add(item[0])
|
||||||
return matches
|
return matches
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user