LibreTranslate / argos-translate-files

Translate files using Argos Translate
MIT License
11 stars 6 forks source link

Epub fix #2

Closed argosopentech closed 1 year ago

argosopentech commented 1 year ago

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

https://github.com/LibreTranslate/argos-translate-files/issues/1

TheTakylo commented 1 year ago

Thanks @argosopentech