2
0
mirror of https://github.com/koreader/koreader synced 2024-11-13 19:11:25 +00:00
koreader/frontend/ui/elements
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
..
avoid_flashing_ui.lua UI Behavior tweaks (#3983) 2018-06-02 12:10:55 -04:00
common_info_menu_table.lua Bump android backend (#7813) 2021-06-07 17:13:34 +02:00
common_settings_menu_table.lua common_settings: migrate document menu to menu_order ordering 2021-10-23 15:49:54 +02:00
file_ext_assoc.lua Pocketbook misc fixes (#6633) 2020-09-12 10:47:35 +02:00
filemanager_menu_order.lua reader: implement language-support plugin system 2021-10-23 15:49:54 +02:00
flash_keyboard.lua LuaSettings: Add a method to initialize a setting properly (#7371) 2021-03-06 22:44:18 +01:00
flash_ui.lua Allow for disabling flashing of menu, icons and buttons (#3339) 2017-10-10 23:50:45 +02:00
font_settings.lua add hasSystemFonts device property (#7535) 2021-04-19 09:04:31 +02:00
font-test-sample-default.template Pocketbook misc fixes (#6633) 2020-09-12 10:47:35 +02:00
mass_storage.lua USBMS: Dismiss ConfirmBox on unplug 2021-08-25 20:15:57 +02:00
menu_activate.lua "Page turns" menu development (#8022) 2021-07-25 23:59:06 +02:00
menu_keyboard_layout.lua InputDialog: add :addWidget(), use it for checkboxes (#8168) 2021-09-02 22:53:54 +02:00
page_overlap.lua SpinWidget: similar size in portrait and landscape (#8226) 2021-09-25 10:40:04 +02:00
page_turns.lua "Page turns" menu development (#8022) 2021-07-25 23:59:06 +02:00
reader_menu_order.lua reader: implement language-support plugin system 2021-10-23 15:49:54 +02:00
refresh_menu_table.lua Refresh menu table: more remove unused 2021-09-13 19:32:19 +02:00
screen_android.lua Address assorted Weblate comments (#7154) 2021-01-16 21:40:00 +01:00
screen_color_menu_table.lua Warn if color rendering is enabled on a grayscale device. (#5871) 2020-02-18 02:24:48 +01:00
screen_disable_double_tap_table.lua LuaSettings: Add a method to initialize a setting properly (#7371) 2021-03-06 22:44:18 +01:00
screen_dpi_menu_table.lua SpinWidget: similar size in portrait and landscape (#8226) 2021-09-25 10:40:04 +02:00
screen_eink_opt_menu_table.lua Pocketbook: waveform presets (#6794) 2020-10-22 13:23:09 +02:00
screen_notification_menu_table.lua Notifications menu: remove "No notifications" (#7736) 2021-05-22 23:47:55 +02:00
screen_rotation_menu_table.lua [chore] Get rid of ui/data/strings.lua (#6921) 2020-11-29 10:18:59 +01:00
screensaver_menu.lua ScreenSaver: Allow toggling the reboot/poweroff overlay message (#7566) 2021-04-19 02:20:46 +02:00
waveform_level.lua Pocketbook: waveform presets (#6794) 2020-10-22 13:23:09 +02:00