mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Remove other changes, leaving the fix for the formatter function.
This commit is contained in:
parent
cbbfdee79c
commit
4e2c19e7e0
@ -1411,7 +1411,9 @@ class BuiltinUserCategories(BuiltinFormatterFunction):
|
||||
|
||||
def evaluate(self, formatter, kwargs, mi, locals_):
|
||||
if hasattr(mi, '_proxy_metadata'):
|
||||
return ', '.join(k for k, v in mi._proxy_metadata.user_categories.iteritems() if v)
|
||||
cats = set(k for k, v in mi._proxy_metadata.user_categories.iteritems() if v)
|
||||
cats = sorted(cats, key=sort_key)
|
||||
return ', '.join(cats)
|
||||
return _('This function can be used only in the GUI')
|
||||
|
||||
class BuiltinTransliterate(BuiltinFormatterFunction):
|
||||
|
Loading…
x
Reference in New Issue
Block a user