Commit Graph

76 Commits (da988c15dee6040165885f80589d9d3e65348757)

Author SHA1 Message Date
Frans de Jonge da988c15de
[CI] Switch to custom xgettext build to extract multiline strings (#5242)
Because let's face it, it just looks much better this way.

Docker image update in https://github.com/koreader/virdevenv/pull/43

Discussion in https://github.com/koreader/koreader/pull/5238#issuecomment-523675211 and https://github.com/koreader/koreader/pull/4524
5 years ago
Frans de Jonge e2ceace302
[fix, CI] Push to Transifex from master, fix multiline strings for xgettext (#5238)
Related to https://github.com/koreader/koreader/pull/5237
5 years ago
poire-z a82d7832b9 Dict lookups: have them always interruptible
They should be now interruptible when fuzzy search is disabled
and on Android.
5 years ago
Martín Fernández b385e443e6 [Android] Add support for 3rd party dictionary apps (#5108)
Co-Authored-By: poire-z <poire-z@users.noreply.github.com>
5 years ago
Frans de Jonge 57ce8dc574
[UX] Gesture manager: add action - show dictionary/Wikipedia (#4699)
References #4687.
5 years ago
poire-z 335a513826 [chore] cleanup multi-lines translatable strings
Revert 9971eb85 and make multi-lines strings more readable.
(Multiline translatable strings extraction has been fixed
in koreader-misc tralua_xgettext.py.)
5 years ago
Frans de Jonge b21a9efa53
[UX] Download dictionary: keep menu open (#4412)
As suggested by @poire-z in https://github.com/koreader/koreader/pull/4401#issuecomment-447629244
5 years ago
Frans de Jonge b261a647c2
[feat] Add dictionary download option (#3176)
You can now download pretty much all of the easily available freely licensed dictionaries I could find.
6 years ago
poire-z b3efd5a333 ReaderDictionary:dismissLookupInfo(): avoid forceRePaint()
Avoid forceRePaint() (and showing the full page without any
widget) between closing the "Looking up..." info message and
displaying the Dictionary result window, as it's not really
needed (I must have added it for symmetry with
ReaderDictionary:showLookupInfo() where it is needed.)
This avoids some occasional refresh competition glitches.

Also trim spaces at start or end of selection (can't hurt),
and replaced ugly string.gsub(text) with text:gsub().
6 years ago
poire-z 850be52177
Keep some menus open when Tap or Hold (#4189)
TouchMenu: added options to menu items with the following defaults:
    keep_menu_open = false
    hold_keep_menu_open = true
So, default for Tap callback is to close menu, and for Hold callback
to keep menu open.
In both cases, provide the TouchMenu instance as the 1st argument to
the callback functions (instead of a refresh_menu_func I added in #3941)
so the callback can do more things, like closing, refreshing,
changing menu items text and re-ordering...

ReaderZooming: show symbol for default (like it was done for
ReaderFont, ReaderHyphenation...)
TextEditor plugin: update the previously opened files list in real
time, so the menu can be kept open and used as the TextEditor main
interface.
SSH plugin: keep menu open and update the Start/Stop state in real time
ReadTimer plugin: tried to do what feels right (but I don't use it)

Also remove forgotten cp in the move/paste file code
6 years ago
poire-z 9971eb8533 Fix untranslatable strings (#4132)
Some problem somewhere with [[...]] strings starting with a
leading newline. Should probably be allowed, but for now
fix the few such cases to allow them being translated.
6 years ago
poire-z 24d4ab43c4
dict: convert htmlentities in non-html text results (#3921) 6 years ago
onde2rock dad7f209fa [CI] Add a check to detect tab in lua files (#3919) 6 years ago
poire-z e7377cd20e Dict & wiki history: use filename when no book title (#3635) 6 years ago
TnS-hun b40bc53fc7 HTML dictionary link support (#3603) 6 years ago
poire-z e389510257 Fix speedup of dictionaries init (#3592)
Revert 338d14edb7 (#3489)
Simply just don't walk into "res/" subdirectories, which is where
resource files should be per startdict specs.
6 years ago
poire-z 8c897a086f HTML dict: enable color rendering and per-dict user fix html func (#3585)
Also fix possibility of crash in HtmlBoxWidget:free()
6 years ago
poire-z 91092c442d Fix negative nb of enabled dictionaries (#3584)
Happened when some dictionaries files have been removed, while
these were still referenced in the 'dicts_disabled' setting.
6 years ago
TnS-hun 06a8a33d39 HTML dictionary support (#3573)
* Adds a generic HTML widget modeled after the text widget, and HTML dictionary support. HTML dictionaries can have their own CSS (for X.ifo it must be X.css). The base CSS just resets the margin and sets the font.

Note that the widget doesn't handle links, that wasn't needed for the dictionary.

Closes <https://github.com/koreader/koreader/issues/1776>.

* Show tag stripped HTML if the dictionary entry isn't valid HTML

* Simulate the normal <br/> behavior

* Bump base
6 years ago
poire-z 70f2aa09ea Adds Wikipedia history (#3549)
Just like Dictionary lookup history.
Also changed Disable to Enable in some menu items to be more positive.
7 years ago
TnS-hun 29b376fdd9 [UX] Option to show dictionary in large window (#3499) 7 years ago
poire-z 338d14edb7 Speedup dictionaries init (#3489)
When looking for .ifo to populate Dictionary settings menu,
avoid walking sub-directories once we found a .ifo, as these
sub-directories may contain a lot of images and other subdirs.
7 years ago
Frans de Jonge 2ddcc7155a [fix] Dictionary no fuzzy search flag (#3433)
Upstream uses `-e` rather than the `-f` that was first introduced in our fork.

References https://github.com/koreader/koreader/issues/3429#issuecomment-339749396
7 years ago
Frans de Jonge d23d01643e Add LuaData and Dictionary Lookup History (#3161)
* Add dictionary history

Fixes #2033, fixes #2998.

* Add LuaData

* table handling in base settings

* Add LuaData spec
7 years ago
poire-z 1a97b4289c [Fix] Show 'Follow Link' even when no dict installed 7 years ago
poire-z 47139266b2 Dict lookup: allow cancelling with tap
base bumped for ffi/util.getNonBlockingReadSize(luafile)
7 years ago
Frans de Jonge f439ca0e8d [UX] Add "Follow Link" in hold/highlight dialog (#3190)
* This way you can disable "tap to follow links" on single tap yet still follow links.
* Change menu as well as per @poire-z's suggestion.
7 years ago
Frans de Jonge ba7fad2cdf [fix] Dict settings NaN in installed dicts submenu (#3173) 7 years ago
poire-z 6efcfce479 Fix "Info on dictionaries ordering" string for translation (#3156) 7 years ago
poire-z d5924f1d3d Use multiple sdcv -u params instead of renaming .ifo 7 years ago
poire-z 6d8d202f3b Dict settings menu: list dicts, and allow disabling them 7 years ago
poire-z 5d2bebcc0b Added Dictionary settings and Wikipedia settings menus (#3121)
Also removed OPDS `download_dir` from the candidates to Wikipedia
"Save as EPUB" dir.
7 years ago
Huang Xin 8938786472 [fix] stop propagation of tap events when triggering reader menu (#2934)
* [fix] stop propagation of tap events
when triggering reader menu
And also get rid of unnecessary screen refreshes on Kindle Voyage.
The "progress" window for dict lookup is also eliminated as most of the time dict lookup is an instant process, and the "progress" window is preserved for wikipedia lookup as it may take longer time to show the result window.

* [up] add an option to disable dictionary fuzzy search

* [fix] tidy up require

* [fix] fix read settings
7 years ago
poire-z 9e346f5559 Allow wikipedia lookup from filemanager
Also allow taking screenshot when on dictionary window.
7 years ago
Qingping Hou bde2139b27 wifi(fix): quote ssid and password for wpa_passphrase 7 years ago
Qingping Hou 23c2955500 chore: style cleanup for infomessage 7 years ago
Frans de Jonge ed7937f65d ReaderDictionary: add info message about installing dictionaries
Fixes #2816.
7 years ago
poire-z 5bc19fa084 clean ReaderDictionary:cleanSelection
crengine now does a much better job at finding word boundaries, so
less cleanup is needed
7 years ago
Frans de Jonge e8721887ba InputContainer: add cancel_text and ok_text
Makes it easier to comply with UX style.

* Change "OK" to "Search dictionary" in Dictionary lookup to comply with UX style
* Change "OK" to "Search all text" in Fulltext search to comply with UX style

Tacked on but highly related:

* change "OK" to "Search Wikipedia" in Wikipedia lookup to comply with UX style
* change "OK" to "Set default" in ConfigDialog to comply with UX style

Chore:

* fixed up order of requires
7 years ago
Frans de Jonge a970a1f034 MenuSorter: fix outside testability (for potential unit tests) 7 years ago
Frans de Jonge b7b5950e98 MenuSorter: review comments and various bug fixes
* fixed wrongful retention of submenus variable and added return to MenuSorter:findById
* fixed readerfooter_spec.lua error
* fixed review comments
7 years ago
Frans de Jonge 5b20106db7 MenuSorter: initial implementation
* Menus are now sanely configurable
* Custom separator placement for clearer menus
7 years ago
Qingping Hou fc12ee6537 decouple reader footer from dictquicklookup widget & translation fix (#2664)
* chore: fix strings for translations

* dictionary(chore): decouple reader footer from dictquicklookup widget
7 years ago
Frans de Jonge d1785e1863 Reorganize menus
* Replace "home" (exit) menu with hamburger
* Discard pokeball and put items in hamburger
* Introduce search menu in reader

Cf. #2562
7 years ago
Qingping Hou f95ad00b9e feat: add logger module & rewrite kobo suspend script in lua 7 years ago
poire-z 1708fd5e1c Dictionary and wikipedia enhancements (#2393)
Stardict:
- remove duplicate results
- better cleaning of selection
- append results from a 2nd query of a 2nd set of dictionaries
  in data/dict_ext/

Wikipedia:
- use the search API for better results
- allow viewing the full page content of a result in a bigger window
- allow queries for multiple languages
- available languages can be set in settings.reader.lua :
    ["wikipedia_languages"] = {"en", "fr", "it"}
- "Wikipedia lookup" added to Tools menu

For both:
- allow selection of multiple words for a new lookup (so one can
  actually browse wikipedia)
- allow continuous reading with Tap
- display "current result / total number of results"

Details in #2393
8 years ago
Sergey Organov 3800a3077a DictQuickLookup:update(): strip all leading empty lines/spaces
This gets rid of sometimes huge spacing between a word and its
description taken from dictionary, and thus need for scrolling just to
read fisrs few lines of description.
8 years ago
chrox 1c5c7d3a7c fix #1682 by closing all dict windows when holding close icon 8 years ago
Qingping Hou fadad90447 uimanager(fix): handle stack change in close 8 years ago
chrox a60544b1ad Koreader Ubuntu-touch port
Currently only tested on Ubuntu-touch emulator with framework
ubuntu-sdk-14.10 for armhf.
The ubuntu-touch port is binary compatible with the Kobo port
major changes in this PR are:
1. rename the emulator device to sdl device since both the emulator
and the ubuntu-touch target use libsdl to handle input/output.
2. ubuntu-touch app has no write access to the installation dir so
all write-outs should be in a seperate dir definded in `datastorage`.
9 years ago