mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
7c7ff4cf08
commit
21b9a5db89
@ -122,6 +122,7 @@ def mi_to_html(
|
|||||||
p = prepare_string_for_xml
|
p = prepare_string_for_xml
|
||||||
a = partial(prepare_string_for_xml, attribute=True)
|
a = partial(prepare_string_for_xml, attribute=True)
|
||||||
book_id = getattr(mi, 'id', 0)
|
book_id = getattr(mi, 'id', 0)
|
||||||
|
title_sep = '\xa0'
|
||||||
|
|
||||||
for field in (field for field, display in field_list if display):
|
for field in (field for field, display in field_list if display):
|
||||||
try:
|
try:
|
||||||
@ -147,8 +148,7 @@ def mi_to_html(
|
|||||||
name = metadata['name']
|
name = metadata['name']
|
||||||
if not name:
|
if not name:
|
||||||
name = field
|
name = field
|
||||||
sep = '\xa0'
|
name += title_sep
|
||||||
name += sep
|
|
||||||
disp = metadata['display']
|
disp = metadata['display']
|
||||||
if (metadata['datatype'] == 'comments' or field == 'comments'
|
if (metadata['datatype'] == 'comments' or field == 'comments'
|
||||||
or disp.get('composite_show_in_comments', '')):
|
or disp.get('composite_show_in_comments', '')):
|
||||||
@ -225,7 +225,7 @@ def mi_to_html(
|
|||||||
num_of_folders = 2
|
num_of_folders = 2
|
||||||
break
|
break
|
||||||
text = _('Book files')
|
text = _('Book files')
|
||||||
name = ngettext('Folder', 'Folders', num_of_folders) + sep
|
name = ngettext('Folder', 'Folders', num_of_folders) + title_sep
|
||||||
links = ['<a href="{}" title="{}">{}</a>{}'.format(action(scheme, book_id=book_id, loc=loc),
|
links = ['<a href="{}" title="{}">{}</a>{}'.format(action(scheme, book_id=book_id, loc=loc),
|
||||||
prepare_string_for_xml(path, True), text, extra)]
|
prepare_string_for_xml(path, True), text, extra)]
|
||||||
if num_of_folders > 1:
|
if num_of_folders > 1:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user