1
0
mirror of https://github.com/gryf/ebook-converter.git synced 2026-04-27 01:01:28 +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
+11 -9
View File
@@ -1458,12 +1458,13 @@ class AZW3Container(Container):
with open(pathtoazw3, 'rb') as stream:
raw = stream.read(3)
if raw == b'TPZ':
raise InvalidMobi(_('This is not a MOBI file. It is a Topaz file.'))
raise InvalidMobi('This is not a MOBI file. It is a Topaz '
'file.')
try:
header = MetadataHeader(stream, default_log)
except MobiError:
raise InvalidMobi(_('This is not a MOBI file.'))
raise InvalidMobi('This is not a MOBI file.')
if header.encryption_type != 0:
raise DRMError()
@@ -1471,15 +1472,16 @@ class AZW3Container(Container):
kf8_type = header.kf8_type
if kf8_type is None:
raise InvalidMobi(_('This MOBI file does not contain a KF8 format '
'book. KF8 is the new format from Amazon. calibre can '
'only edit MOBI files that contain KF8 books. Older '
'MOBI files without KF8 are not editable.'))
raise InvalidMobi('This MOBI file does not contain a KF8 '
'format book. KF8 is the new format from '
'Amazon. calibre can only edit MOBI files '
'that contain KF8 books. Older MOBI files '
'without KF8 are not editable.')
if kf8_type == 'joint':
raise InvalidMobi(_('This MOBI file contains both KF8 and '
'older Mobi6 data. calibre can only edit MOBI files '
'that contain only KF8 data.'))
raise InvalidMobi('This MOBI file contains both KF8 and older '
'Mobi6 data. calibre can only edit MOBI '
'files that contain only KF8 data.')
try:
opf_path, obfuscated_fonts = fork_job(