1
0
mirror of https://github.com/gryf/ebook-converter.git synced 2026-03-15 06:03:38 +01: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

@@ -49,7 +49,8 @@ class RTFInput(InputFormatPlugin):
options = {
OptionRecommendation(name='ignore_wmf', recommended_value=False,
help=_('Ignore WMF images instead of replacing them with a placeholder image.')),
help='Ignore WMF images instead of replacing them with a '
'placeholder image.'),
}
def generate_xml(self, stream):
@@ -259,8 +260,9 @@ class RTFInput(InputFormatPlugin):
xml = self.generate_xml(stream.name)
except RtfInvalidCodeException as e:
self.log.exception('Unable to parse RTF')
raise ValueError(_('This RTF file has a feature calibre does not '
'support. Convert it to HTML first and then try it.\n%s')%e)
raise ValueError('This RTF file has a feature calibre does not '
'support. Convert it to HTML first and then try '
'it.\n%s' % e)
d = glob.glob(os.path.join('*_rtf_pict_dir', 'picts.rtf'))
if d:
@@ -303,9 +305,9 @@ class RTFInput(InputFormatPlugin):
stream.seek(0)
mi = get_metadata(stream, 'rtf')
if not mi.title:
mi.title = _('Unknown')
mi.title = 'Unknown'
if not mi.authors:
mi.authors = [_('Unknown')]
mi.authors = ['Unknown']
opf = OPFCreator(os.getcwd(), mi)
opf.create_manifest([(u'index.xhtml', None)])
opf.create_spine([u'index.xhtml'])