mirror of
https://github.com/koreader/koreader
synced 2024-11-13 19:11:25 +00:00
7c5243667b
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> |
||
---|---|---|
.. | ||
avoid_flashing_ui.lua | ||
common_info_menu_table.lua | ||
common_settings_menu_table.lua | ||
file_ext_assoc.lua | ||
filemanager_menu_order.lua | ||
flash_keyboard.lua | ||
flash_ui.lua | ||
font_settings.lua | ||
font-test-sample-default.template | ||
mass_storage.lua | ||
menu_activate.lua | ||
menu_keyboard_layout.lua | ||
page_overlap.lua | ||
page_turns.lua | ||
reader_menu_order.lua | ||
refresh_menu_table.lua | ||
screen_android.lua | ||
screen_color_menu_table.lua | ||
screen_disable_double_tap_table.lua | ||
screen_dpi_menu_table.lua | ||
screen_eink_opt_menu_table.lua | ||
screen_notification_menu_table.lua | ||
screen_rotation_menu_table.lua | ||
screensaver_menu.lua | ||
waveform_level.lua |