View Single Post
Old Today, 06:54 AM   #4
reapps_eu
Reborn Dev
reapps_eu began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Aug 2026
Device: Boox Page
Update: the part that is meant for learning a language by reading

Thanks Frenzie - "Go Advanced" was exactly what I was missing. Screenshots attached this time, and there is something new to show.

Since the first post the plugin has grown the feature I actually wanted it for. Translate a phrase once and it is remembered. From then on that phrase carries a faint dotted underline wherever it turns up again - in that book and in the next one, because what is stored is a phrase, not a position in a file. A tap on an underlined phrase brings its translation straight back, with nothing to select first.

That recurrence is the whole point. Meeting an expression again, recognising that you have met it before, and eventually finding you no longer need the translation is what learning by reading actually looks like, and it is the part a translation window cannot do for you, because it happens between the lookups rather than during one. The bubble carries a Learned button, which forgets the phrase and takes its underline out of every book at once. Deliberately not called "delete": forgetting is what the plugin does, while what you are doing is saying you are done with this one.

Tools -> Offline translate -> Remembered translations is the same collection away from the page - what is kept for the language pair you are reading, in alphabetical order, one tap to see a translation and one more to drop it.

Both of these are off until you switch them on. Underlining changes what a page looks like, which is the definition of a regression for someone who never asked for it. With it off, nothing about tapping, selecting or turning pages changes. With it on, a tap anywhere that is not an underlined phrase turns the page exactly as before, and a highlight you made yourself still opens KOReader's own menu.

Since "it scans your book" is the kind of sentence that would worry me in someone else's post: it does not. There is no background scanning and no per-book state. On a page turn the plugin takes the text of that page, matches it in Lua against the phrases it knows, and only then asks the document to locate the ones actually present, bounded by the number of occurrences it counted - so a search cannot wander off the page. On a Boox Page that costs 1-2 ms per page turn, independent of how many phrases are stored, with the worst case I could build coming in around 10 ms. Measured on the device rather than assumed.

Limits worth stating up front: matching is literal, so "the old man" is not recognised in "the old men", and a heavily inflected language will hide more of these than English does. What survives that are short fixed expressions, which is where a phrase translation earns its keep anyway. Underlining works in EPUB and other reflowable formats, not in PDF.

Also, thanks to a bug report: when nothing is listening, the failure message now says what to check instead of only naming the address.

Attachments, in order: a page with several phrases underlined and one of them tapped; the list of remembered translations; the settings, with both of these switched on.

Latest release: https://github.com/fundacja-reborn/o...eleases/latest

Still AGPL-3.0, still pure Lua, still nothing on the wire but loopback.
Attached Thumbnails
Click image for larger version

Name:	marked-phrases.png
Views:	6
Size:	44.1 KB
ID:	224922   Click image for larger version

Name:	remembered-list.png
Views:	7
Size:	15.5 KB
ID:	224923   Click image for larger version

Name:	settings.png
Views:	5
Size:	31.6 KB
ID:	224924  
reapps_eu is offline   Reply With Quote