2
0
mirror of https://github.com/koreader/koreader synced 2024-11-13 19:11:25 +00:00
koreader/frontend/ui
Aleksa Sarai 7c5243667b reader: implement language-support plugin system
This creates a new plugin system which hooks into a handful of reader
operations in order to allow plugins to add language-specific support
where the default reader falls short. The two hooks added are:

 * During hold-without-pan taps, language plugins can modify the
   selection in order to better match what users expect koreader to
   highlight when selecting a single word.

   The vast majority of CJK language words are more than one character,
   but KOReader treats all CJK characters as a single word by default,
   so adding this hook means that readers no longer need to manually
   select the whole word every time they need to look something.

 * During dictionary lookup, language plugins can propose alternative
   candidate words to look up if the selected word could not be found in
   the dictionary.

   This is pretty necessary for Japanese and Korean, both of which are
   highly agglutinative languages and the fuzzy searching system of
   StarDict is simply not usable because often the inflection of the
   word is so much longer than the dictionary form that sdcv decides to
   chop off the actual word and search for the inflection (which yields
   useless results).

This system is of particular interest for readers of CJK languages
(without this, looking up words using KOReader was fairly painful) but
this system is designed to be minimal and language-agnostic enough that
other languages could make use of it by creating their own plugins if
the default "whole word" highlight and fuzzy-search system doesn't match
their needs.

Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
2021-10-23 15:49:54 +02:00
..
data Greek keyboard: minor updates (#8319) 2021-10-14 11:33:33 +02:00
elements reader: implement language-support plugin system 2021-10-23 15:49:54 +02:00
message Remove zsync plugin (#7957) 2021-07-22 09:01:57 +02:00
network Fix syntax 2021-09-11 10:55:50 +02:00
plugin Plugins: adds PluginMenuInserter helper (#7419) 2021-05-10 12:46:55 +02:00
widget readerhighlight: remove selected_word and use selected_text everywhere 2021-10-23 15:49:54 +02:00
bidi.lua [RTL UI] Bidi-wrap filenames, paths, urls, metadata 2020-01-04 01:34:46 +01:00
cloudmgr.lua Standardize select/choose to choose (#8128) 2021-08-24 22:19:07 +02:00
downloadmgr.lua Calibre plugin fixes for android (#6996) 2020-12-15 00:46:38 +01:00
event.lua Revamp flash_ui handling, once more, with feeling ;) (#7262) 2021-02-20 18:22:48 +01:00
font.lua Font menu: show font names with their own font 2020-10-06 00:34:17 +02:00
geometry.lua geom: supplement :combine with more generic .boundingBox 2021-10-23 15:49:54 +02:00
gesturerange.lua Minor Input & TimeVal cleanups 2021-04-16 22:12:15 +02:00
hook_container.lua Input: Process input events in batches (#7483) 2021-04-03 01:48:35 +02:00
language.lua VirtualKeyboard: redesign and enhancements (#8089) 2021-08-24 23:51:39 +02:00
menusorter.lua [fix] MenuSorter: use orderedPairs for orphans (#6403) 2020-07-20 20:58:01 +02:00
otamanager.lua Check for update → Check for updates (#8027) 2021-07-25 21:04:13 +02:00
quickstart.lua Quick start guide: fix links to images (#8072) 2021-08-14 22:53:46 +02:00
renderimage.lua Update UI layout code to use new SVG icons 2020-12-19 14:49:18 +01:00
rendertext.lua Cache: Some more tweaks after #7624 2021-05-09 23:10:44 +02:00
screensaver.lua Screensaver: correct call of BookStatusWidget 2021-10-17 17:52:34 +03:00
size.lua [RFC] Pagination UI shenanigans (#7335) 2021-02-25 05:15:23 +01:00
timeval.lua Port ffiUtil.getTimestamp users to TimeVal:now() 2021-05-05 20:37:33 +02:00
translator.lua Translator: add "Translate from book language" option (#8094) 2021-08-18 00:42:14 +02:00
trapper.lua Revamp flash_ui handling, once more, with feeling ;) (#7262) 2021-02-20 18:22:48 +01:00
uimanager.lua Adds ScrollableContainer, to be used with tall widgets (#8299) 2021-10-10 15:09:42 +02:00
wikipedia.lua Unify LuaSocket usage (#7405) 2021-03-15 01:25:10 +01:00