1
0
mirror of https://github.com/gryf/ebook-converter.git synced 2026-04-16 02:53:33 +02:00

Removed translations module

This commit is contained in:
2020-04-12 15:48:08 +02:00
parent 453d77ce98
commit 0bf43ec6e8
4 changed files with 1 additions and 47 deletions

View File

@@ -15,7 +15,6 @@ from operator import attrgetter
from lxml import etree, html
from ebook_converter import force_unicode
from ebook_converter.constants import filesystem_encoding, __version__, ispy3
from ebook_converter.translations.dynamic import translate
from ebook_converter.utils.xml_parse import safe_xml_fromstring
from ebook_converter.ebooks.chardet import xml_to_unicode
from ebook_converter.ebooks.conversion.preprocess import CSSPreProcessor
@@ -1843,9 +1842,7 @@ class OEBBook(object):
def translate(self, text):
"""Translate :param:`text` into the book's primary language."""
lang = unicode_type(self.metadata.language[0])
lang = lang.split('-', 1)[0].lower()
return translate(lang, text)
return text
def decode(self, data):
"""Automatically decode :param:`data` into a `unicode` object."""