Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Epub fix #2

Merged
merged 2 commits into from Aug 5, 2023
Merged

Epub fix #2

merged 2 commits into from Aug 5, 2023

Conversation

argosopentech
Copy link

@argosopentech argosopentech commented Aug 5, 2023

We're expecting inzipinfo.filename == "OPS/content.opf" while this
value is "OEBPS/content.opf" for an EPUB file created with
LibreOffice.

The current logic that decides wether HTML should be translated
will often not translate text in an EPUB that the user would
want translated. This commit will translate any html or xhtml
files in the EPUB document.

Example of a filename that isn't translated with the current code
but is with this commit:
OEBPS/sections/section0003.xhtml

#1

We're expecting inzipinfo.filename == "OPS/content.opf" while this
value is "OEBPS/content.opf" for an EPUB file created with
LibreOffice.

LibreTranslate#1
The current logic that decides wether HTML should be translated
will often not translate text in an EPUB that the user would
want translated. This commite will translate any html or xhtml
files in the EPUB document.

Example of a filename that isn't translated with the current code
but is with this commit:
OEBPS/sections/section0003.xhtml
@TheTakylo TheTakylo merged commit 5b28b6f into LibreTranslate:main Aug 5, 2023
5 checks passed
@TheTakylo
Copy link
Collaborator

Thanks @argosopentech

@argosopentech argosopentech deleted the epub-fix branch August 5, 2023 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants