koreader / koreader

An ebook reader application supporting PDF, DjVu, EPUB, FB2 and many more formats, running on Cervantes, Kindle, Kobo, PocketBook and Android devices
http://koreader.rocks/
GNU Affero General Public License v3.0
16.38k stars 1.25k forks source link

FR: Add translation lookup history #9984

Open michal-korniak opened 1 year ago

michal-korniak commented 1 year ago

Currently we have an option to check history of dictionary and wikipedia lookups, but we don't have simmilar functionality for translation lookups. For now I implemented this feature by myself (by integrating it with dictionary history), but to be honest I don't know anything about Lua, so this implementation is very poor :) Link to commit

Frenzie commented 1 year ago

I suppose that should be fine but it's been a while since I looked at that code.

michal-korniak commented 1 year ago

Yes, it works, but there is a lot repetition, as I actually duplicated dictionary lookup history for translations. I'm also not sure if it should save translations in dictionary lookup history (if I click on entry in dictionary history, it tries to search entry in dictionary, which doesn't make sense for translations entries), so maybe it should have separated history. As I said I don't fully understand how Lua works, so it will be great if someone could improve my solution.