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:
@@ -222,7 +222,7 @@ class DOCX(object):
|
||||
|
||||
@property
|
||||
def metadata(self):
|
||||
mi = Metadata(_('Unknown'))
|
||||
mi = Metadata('Unknown')
|
||||
dp_name, ap_name = self.get_document_properties_names()
|
||||
if dp_name:
|
||||
try:
|
||||
|
||||
@@ -61,7 +61,7 @@ class Convert(object):
|
||||
self.ws_pat = re.compile(r'[\n\r\t]')
|
||||
self.log = self.docx.log
|
||||
self.detect_cover = detect_cover
|
||||
self.notes_text = notes_text or _('Notes')
|
||||
self.notes_text = notes_text or 'Notes'
|
||||
self.notes_nopb = notes_nopb
|
||||
self.nosupsub = nosupsub
|
||||
self.dest_dir = dest_dir or os.getcwd()
|
||||
@@ -77,7 +77,7 @@ class Convert(object):
|
||||
self.html = HTML(
|
||||
HEAD(
|
||||
META(charset='utf-8'),
|
||||
TITLE(self.mi.title or _('Unknown')),
|
||||
TITLE(self.mi.title or 'Unknown'),
|
||||
LINK(rel='stylesheet', type='text/css', href='docx.css'),
|
||||
),
|
||||
self.body
|
||||
@@ -390,8 +390,9 @@ class Convert(object):
|
||||
|
||||
def process_guide(E, guide):
|
||||
if self.toc_anchor is not None:
|
||||
guide.append(E.reference(
|
||||
href='index.html#' + self.toc_anchor, title=_('Table of Contents'), type='toc'))
|
||||
guide.append(E.reference(href='index.html#' + self.toc_anchor,
|
||||
title='Table of Contents',
|
||||
type='toc'))
|
||||
toc_file = os.path.join(self.dest_dir, 'toc.ncx')
|
||||
with open(os.path.join(self.dest_dir, 'metadata.opf'), 'wb') as of, open(toc_file, 'wb') as ncx:
|
||||
opf.render(of, ncx, 'toc.ncx', process_guide=process_guide)
|
||||
|
||||
@@ -202,7 +202,8 @@ class ImagesManager(object):
|
||||
makeelement(parent, 'wp:extent', cx=str(width), cy=str(height))
|
||||
makeelement(parent, 'wp:effectExtent', l='0', r='0', t='0', b='0')
|
||||
makeelement(parent, 'wp:wrapTopAndBottom')
|
||||
self.create_docx_image_markup(parent, 'cover.jpg', _('Cover'), img.rid, width, height)
|
||||
self.create_docx_image_markup(parent, 'cover.jpg', 'Cover', img.rid,
|
||||
width, height)
|
||||
return ans
|
||||
|
||||
def write_cover_block(self, body, cover_image):
|
||||
|
||||
@@ -161,7 +161,7 @@ class LinksManager(object):
|
||||
pbb.set('{%s}val' % self.namespace.namespaces['w'], 'on')
|
||||
for block in reversed(self.toc):
|
||||
block.serialize(body, self.namespace.makeelement)
|
||||
title = __('Table of Contents')
|
||||
title = 'Table of Contents'
|
||||
makeelement = self.namespace.makeelement
|
||||
p = makeelement(body, 'w:p', append=False)
|
||||
ppr = makeelement(p, 'w:pPr')
|
||||
|
||||
Reference in New Issue
Block a user