Thanks to <https://github.com/koreader/koreader/pull/5237> we can now extract the knowledge currently embedded in Transifex and put it directly in our source. This positively affects <https://github.com/koreader/koreader/issues/3754>.
Translation instructions and knowledge that comes out of localization-related questions should be preserved in the source, because Transifex is too ephemeral. For example, the links from <https://github.com/koreader/koreader/pull/2290> are no longer accessible. Even when they are, it's quite useful to have this information around while dealing with the code as well, and I also hope it'll be informative to contributors who seldom visit Transifex.
This commit also makes a few minor changes to obviate the need for comments where possible.
When a main document is opened for displaying, some other
document openings (for getting metadata or cover image)
could affect the main document.
Split some code from CreDocument:init() into another new
method CreDocument:setupDefaultView(), that will only be
called by ReaderUI when opening the main document (and not
by these other openings like Book inforation, View cover...)
Also speed up some of these other openings (Search, Screensaver)
by using doc:loadDocument(false) to load only metadata and
avoid parsing the HTML.
Details in https://github.com/koreader/koreader/issues/4346#issuecomment-440036496
* Make findcalibre actually useful
By setting SEARCH_LIBRARY_PATH when a Calibre tree is found, so that
book paths can properly be constructed.
Users should still very much set it themselves, but at least everything
works as intended when not, instead of mysteriously half-breaking later.
Drop the SetDefaults bits, it appeared to have been added to fix no-ops
detected by Luacheck, and it's actually non-functional, because
SetDefaults doesn't handle saving variables it did not itself assign.
So this was just causing the "Do you want to save new defaults" popup to
show up on exit, but it couldn't actually do anything useful (like, say,
save the new SEARCH_LIBRARY_PATH value).
fix#4082
* Better comments about the state of NaturalLight on the Clara, and how this might translate to the H2O²r2.
re #4015
* Make ScrolltextWidget refresh as "partial" only on actual Scroll events
Moving the cursor should stay "ui", or things gets annoying really fast
;).
re #4084
* Bump base to pickup ZMQ fixes (fix#4086)
* [VirtualKeyboard] Add support for keynaviguation
Also rename the variable "layout" to "keyboard_layout" because conflict
with the layout from the focusmanager
* Make the goto dialog compatible with key naviguation
My solution is to change the order of the widget. The last one will the
virtualkeybard so it catch all the keybinding, and below it, make the
dialog "is_always_active = true" so it can receive touch event.
* Correctly show the virtual keyboard on dpad devices
* change the order to call the virtualKeyboard so it end up on top
* Handle the multi input dialog
* Support reopening the virtualKeyboard by the Press key
* add check focusmanager
* Fix https://github.com/koreader/koreader/issues/3797
* MultiInputDialog : Now work on non touch-device
* Set the virtualkeyboard to be a modal widget
* Fix the layout in multiinputwidget
* Fix for the various combination of
hasKeys,hasDpad,isTouchDevice
* [Focusmanager] Better handling of malformed layout
This is a major overhaul of the hardware abstraction layer.
A few notes:
General platform distinction happens in
frontend/device.lua
which will delegate everything else to
frontend/device/<platform_name>/device.lua
which should extend
frontend/device/generic/device.lua
Screen handling is implemented in
frontend/device/screen.lua
which includes the *functionality* to support device specifics.
Actually setting up the device specific functionality, however,
is done in the device specific setup code in the relevant
device.lua file.
The same goes for input handling.
I would suggest when creating a translate string you'd better keep
as much words together as you can other than trying to call the
`_` function on each word which may cause the final
translation in some languages unreadable.
For example, no matter how we translate the single words, the Chinese
translation of
```
_("No ") .. some_thing .. _("found ") .. _("matching") .. other_thing
```
will be nonsense.
Better way would be:
```
some_thing .. " is not found matching" .. other_thing
```
This should make it easier to update the format of the file and also prevents errors when someone keeps this file but the deletes the original calibre file