1
0
mirror of https://github.com/gryf/ebook-converter.git synced 2026-04-20 05:03:35 +02:00

Removed gettext related functions

This commit is contained in:
2020-05-03 19:00:20 +02:00
parent 35445cb736
commit 212cb56d42
92 changed files with 1505 additions and 1605 deletions

View File

@@ -194,8 +194,9 @@ def split(container, name, loc_or_xpath, before=True, totals=None):
try:
split_point = node_from_loc(root, loc_or_xpath, totals=totals)
except MalformedMarkup:
raise MalformedMarkup(_('The file %s has malformed markup. Try running the Fix HTML tool'
' before splitting') % name)
raise MalformedMarkup('The file %s has malformed markup. Try '
'running the Fix HTML tool before '
'splitting' % name)
container.replace(name, root)
if in_table(split_point):
raise AbortError('Cannot split inside tables')
@@ -269,7 +270,7 @@ def multisplit(container, name, xpath, before=True):
root = container.parsed(name)
nodes = root.xpath(xpath, namespaces=XPNSMAP)
if not nodes:
raise AbortError(_('The expression %s did not match any nodes') % xpath)
raise AbortError('The expression %s did not match any nodes' % xpath)
for split_point in nodes:
if in_table(split_point):
raise AbortError('Cannot split inside tables')