From d99ff84f9c49fcc9348ca0606a9d879f315faeac Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 8 Nov 2013 15:41:21 +0530 Subject: [PATCH] Report when no smartenable punctuation is found --- src/calibre/ebooks/oeb/polish/replace.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/calibre/ebooks/oeb/polish/replace.py b/src/calibre/ebooks/oeb/polish/replace.py index a78f7b5ef7..7945787dd3 100644 --- a/src/calibre/ebooks/oeb/polish/replace.py +++ b/src/calibre/ebooks/oeb/polish/replace.py @@ -78,6 +78,7 @@ def replace_links(container, link_map, frag_map=lambda name, frag:frag, replace_ def smarten_punctuation(container, report): from calibre.ebooks.conversion.preprocess import smarten_punctuation + smartened = False for path in container.spine_items: name = container.abspath_to_name(path) changed = False @@ -98,6 +99,9 @@ def smarten_punctuation(container, report): for m in root.xpath('descendant::*[local-name()="meta" and @http-equiv]'): m.getparent().remove(m) container.dirty(name) + smartened = True + if not smartened: + report(_('No punctuation that could be smartened found')) def rename_files(container, file_map): overlap = set(file_map).intersection(set(file_map.itervalues()))