1
0
mirror of https://github.com/gryf/ebook-converter.git synced 2026-04-19 12:43: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

@@ -110,7 +110,7 @@ def get_metadata(stream):
root = _get_fbroot(get_fb2_data(stream)[0])
ctx = Context(root)
book_title = _parse_book_title(root, ctx)
authors = _parse_authors(root, ctx) or [_('Unknown')]
authors = _parse_authors(root, ctx) or ['Unknown']
# fallback for book_title
if book_title:
@@ -118,7 +118,7 @@ def get_metadata(stream):
else:
book_title = force_unicode(os.path.splitext(
os.path.basename(getattr(stream, 'name',
_('Unknown'))))[0])
'Unknown')))[0])
mi = MetaInformation(book_title, authors)
try:
@@ -173,7 +173,7 @@ def _parse_authors(root, ctx):
# if no author so far
if not authors:
authors.append(_('Unknown'))
authors.append('Unknown')
return authors