03-29-2023, 04:36 AM | #1 |
Enthusiast
Posts: 47
Karma: 220512
Join Date: Jul 2016
Device: PW2
|
[GUI Plugin] Ebook Translator
Ebook Translator is a Calibre plugin to translate your ebook into a specified language (optionally keeping the original content).
When reading a foreign ebook/document/file, it can be frustrating to switch back and forth between a translation tool and the reading material. Ebook Translator offers a convenient solution to obtain all translated text, with or without original paragraph, in a single click. This can be a good assistant for reading and translation work. With the huge ebook formats supported by Calibre, and the huge number of languages supported by translation engines, we can put almost any ebook format to translate and output as any format we like. For example, you can put TXT and get TXT/EPUB translation, or put PDF and get PDF/DOCX translation. Here is a brief introduction to Ebook Translator: Here is what a translated ebook looks like: Features
Installation Please make sure Calibre is installed on your OS, and install the plugin via either ways below: [Install from Calibre] 1. Click Calibre Menu [Preference... -> Plug-ins -> Get new plugins]. 2. Select Ebook Translator from the plugin list, and click [Install]. 3. Reboot Calibre. [Load from file] 1. Download the plugin zip file from Plugin Homepage or Github Releases or attachment of this post. 2. Click Calibre Menu [Preference... -> Plug-ins -> Load plug-in from file], and choose the zip file you downloaded. 3. Reboot Calibre. * If the "Translate Book" plugin is not showing up on Calibre menu, you need to add it from [Preference... -> Toolbars & menus], choose [The main toolbar], find the plugin and click ->, and [Apply]). Usage [Advanced Mode] 1. Choose the ebook and enter "Advanced Mode" via either ways below:
3. Click [Delete] button to delete the selected paragraph if you don't need to translate it. (Optional) 4. Translate the ebook by either ways below:
6. Click [Output] button at the top right to save the ebook. The output process will be taken over by Calibre Jobs. [Batch Mode] 1. Choose the ebook and enter "Batch Mode" via either ways below:
3. Select the Output Format (if needed) and Target Language. 4. Click [TRANSLATE] button. After that, you can check the translation process by clicking "Jobs" at the bottom right. Double clicking the job item, you can check the real-time translation log from the window it prompts. Settings Ebook Translator offers plenty of customization settings. You can choose from "General", "Engine" and "Content" panels. For details, please check https://github.com/bookfere/Ebook-Tr...glish#settings Last edited by kindlefere; 06-14-2024 at 07:17 AM. |
03-30-2023, 12:53 PM | #2 |
Guru
Posts: 614
Karma: 2031728
Join Date: Jan 2010
Device: PocketBook Touch (622), PocketBook Touch Lux 2, Pocketbook Touch HD 3
|
Great idea. This would be very helpful for reading books in a foreign language. But there is still quite some work to be done, I'm afraid. I tried this on 3 or 4 books (epub and fb2 formats). Either only some headers in the book were translated, or the process ended in an error.
Please keep up the good work! I'll try again when there is a new release. |
Advert | |
|
03-30-2023, 01:30 PM | #3 |
Enthusiast
Posts: 47
Karma: 220512
Join Date: Jul 2016
Device: PW2
|
Thanks for your try. We will work on the issue on fb2 format.
For the error, is it something like "<urlopen error [Errno 54] Connection reset by peer>"? (You can check the error message from: "Jobs" link on Calibre at bottom right - double click the job item - drag to the bottom of prompt log window.) If yes, it is the connection issue of translation engine. You can increase the number of [Maximum interval] from setting interface and [Save] to try again. |
03-30-2023, 05:24 PM | #4 |
Guru
Posts: 614
Karma: 2031728
Join Date: Jan 2010
Device: PocketBook Touch (622), PocketBook Touch Lux 2, Pocketbook Touch HD 3
|
Thanks for the feedback. I'll play around with the settings and see if it helps.
Note that I did not just have problems with fb2, but also for a few epubs I had this issue that only a few headers were translated and no body text. After conversion epub --> epub in Calibre the problem still occurred. I then converted one of these epubs to txt and started translation of that version. Translation is currently in progress, but now I see in "Jobs" under Status that 4590 units are being translated instead of only 7. So it seems that something goes wrong when the translator tries to parse the epub, or something in the epub prevents proper parsing, whichever way you want to look at it. |
03-31-2023, 01:44 AM | #5 |
Enthusiast
Posts: 47
Karma: 220512
Join Date: Jul 2016
Device: PW2
|
ok, observation noted. The problem is currently only certain tags are chosen for content to be translated. For books with content in other tags, this will not work.
We will figure out a way to handle different structure of various books. Thanks for your concern. |
Advert | |
|
03-31-2023, 06:51 AM | #6 |
Guru
Posts: 614
Karma: 2031728
Join Date: Jan 2010
Device: PocketBook Touch (622), PocketBook Touch Lux 2, Pocketbook Touch HD 3
|
Thanks!
The translation of the txt book completed successfully. Now I'm doing some simple formatting to make it into a more or less decent epub. I understand that epub and fb2 are not fully supported yet. Are there any other formats (besides txt) that currently are fully supported? Looking forward to new and improved releases! |
03-31-2023, 09:07 AM | #7 |
Addict
Posts: 206
Karma: 547516
Join Date: Mar 2008
Location: Berlin, Germany
Device: KObo Clara, Kobo Aura, PRS-T1, PB602, CyBook Gen3
|
This is a really great idea. I have tried it out with one short story and it works!
There are some things I would wish for /find helpful: - add the new book to thelibrary as a new book instead of overwriting the original - set a language attribute at each paragraph - be able to switch the order of translated and original paragraph Thank you for your work. |
04-01-2023, 01:16 AM | #8 | |
Enthusiast
Posts: 47
Karma: 220512
Join Date: Jul 2016
Device: PW2
|
Quote:
|
|
04-01-2023, 01:21 AM | #9 | |
Enthusiast
Posts: 47
Karma: 220512
Join Date: Jul 2016
Device: PW2
|
Quote:
|
|
04-04-2023, 06:11 PM | #10 |
Guru
Posts: 614
Karma: 2031728
Join Date: Jan 2010
Device: PocketBook Touch (622), PocketBook Touch Lux 2, Pocketbook Touch HD 3
|
I got a few books translated successfully. But for several books translation ran for several hours, and then, when all units had been translated, I got a FileNotFoundError error, e.g. like the following. No translated book was created. Is there something I can do about this?
Spoiler:
Thanks for your help! Last edited by Zetmolm; 04-04-2023 at 06:16 PM. |
04-04-2023, 06:49 PM | #11 |
null operator (he/him)
Posts: 21,006
Karma: 27620706
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
@Zetmolm - I would try giving calibre a dedicated directory for its temporary files via the CALIBRE_TEMP_DIR Environment variable.
On Windows I have it set to C:\_AppData\Calibre\Temp. And, on Windows this 'feature' was introduced a while back, presumably because MacOS has something similar. I suspect on newish systems it's turned on by default. Added: such features have been known to pull the rug out from under the feet of a long running application. What might make sense on a fiddle-fone OS, doesn't necessarily make sense on a desk/laptop OS. BR Last edited by BetterRed; 04-04-2023 at 06:58 PM. |
04-05-2023, 05:27 AM | #12 | |
Enthusiast
Posts: 47
Karma: 220512
Join Date: Jul 2016
Device: PW2
|
Quote:
|
|
04-05-2023, 06:22 AM | #13 |
Guru
Posts: 614
Karma: 2031728
Join Date: Jan 2010
Device: PocketBook Touch (622), PocketBook Touch Lux 2, Pocketbook Touch HD 3
|
@BetterRed, thanks for the tip. It seems however that my problem solved itself 'automagically'. I did set the CALIBRE_TEMP_DIR environment variable, but did not restart my computer so that the new setting did not take effect yet. I restarted the Translate Book function for a couple of books that had failed earlier, and almost instantly the translated versions appeared! So the temporary files were still there, and this time the plugin found them. No idea why it needs two attempts, but I'm happy that it works.
|
04-05-2023, 07:02 AM | #14 |
null operator (he/him)
Posts: 21,006
Karma: 27620706
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
@Zetmolm - what OS are you using, Windows doesn't require a reboot after setting an EnvVar, all you have to do is restart the app that uses the EnvVar - in this case Calibre. Other OSs may require a reboot.
BR Last edited by BetterRed; 04-05-2023 at 07:07 AM. |
04-05-2023, 07:40 AM | #15 |
Guru
Posts: 614
Karma: 2031728
Join Date: Jan 2010
Device: PocketBook Touch (622), PocketBook Touch Lux 2, Pocketbook Touch HD 3
|
I'm using Windows 10 (my computer is too old to run Windows 11). I did not restart Calibre after setting the EnvVar, and the folder I assigned is still empty.
(BTW, the reason I did not restart my computer or Calibre is that a translation job is running for a huge book - 450k words, 20k units to translate. The job has been running for 24 hours now, and is not even half way yet. I expect to see the outcome when I wake up Friday morning.) |
Tags |
calibre, translate |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[GUI Plugin] Noosfere_util, a companion plugin to noosfere DB | lrpirlet | Plugins | 2 | 08-18-2022 04:15 PM |
[GUI Plugin] Save Virtual Libraries To Column (GUI) | chaley | Plugins | 14 | 04-04-2021 06:25 AM |
ebook-convert.exe doesn't work with deDRM plugin, unlike GUI or calibredb.exe | fireattack | Conversion | 8 | 09-26-2020 08:14 PM |
[GUI Plugin] Plugin Updater **Deprecated** | kiwidude | Plugins | 159 | 06-19-2011 01:27 PM |