2
0
mirror of https://github.com/koreader/koreader synced 2024-11-10 01:10:34 +00:00
Commit Graph

10670 Commits

Author SHA1 Message Date
SomeGuy
fb86acaf1a
Sleep screen wording fixes (#11647) 2024-04-09 12:53:30 +02:00
Frans de Jonge
ad266f46c2
GetText: fix crash if a value is used as unique value and as singular/plural (#11643)
Concretely 1 second, %1 seconds since #11549 added `1 second` all by itself.
2024-04-09 10:17:26 +02:00
SomeGuy
279f16aa23
Sleep screen menu reworked (#11549) 2024-04-08 22:47:17 +02:00
Bastian Wagner
aaa56a814f
CreDocument: support added 'identifier' metadata (#11628)
Currently not exposed in Book information.
2024-04-08 04:17:41 +02:00
poire-z
ac4d4756f8
bump crengine: various fixes, updated russian hyphenation (#11637)
Includes:
- Russian hyphenation: allow hyphens after Russian "не" prefix
- EPUB: add "identifiers" to doc props
- EPUB: avoid crash when '@font-face' in <head><style>
- FB2: fix block images sizing and centering
- lvrend: fix positioning of bottom border on empty block elements
Also includes:
- cre: add 'identifiers' to doc props
- build and ci: various tweaks
2024-04-07 23:40:51 +02:00
Tomas Janousek
1fbdc1f19d NetworkMgr: Limit the hasDefaultRoute check in isOnline to PocketBooks
It's not necessary on other platforms. To be more precise, it would be
necessary on Kobo as well, but there's a different workaround in place:
https://github.com/koreader/koreader/pull/6424/files#diff-be863601c59a2d6607af6b04b3be2392ec4494df6d25dae48250fae57b737f61R216-R224
2024-04-07 21:58:12 +02:00
Tomas Janousek
4fa6783dbb NetworkMgr: Use cheaper/simpler hasDefaultRoute in isOnline
Device:getDefaultRoute parses /proc/net/route and converts the hex
addresses to textual IP addresses, but in `isOnline` we don't care what
address the gateway actually has, we only care about whether we have a
default route into the Internet.

This provides a simpler alternative that does the equivalent of
"ip route get 203.0.113.1 || ip route get 2001:db8::1" (note that it
does support IPv6-only connectivity as opposed to
Device:getDefaultRoute) and returns true if we have a route.

Inspired by https://github.com/pavel-odintsov/get_default_outgoing_ip_linux
2024-04-07 21:58:12 +02:00
Tomas Janousek
b3e125a7ce NetworkMgr: Fix PocketBook losing net access
Doing the `isOnline` check (`socket.dns.toip("dns.msftncsi.com")`)
without having internet connectivity (`!isConnected`) results in the
`isOnline` check never succeeding again even if connectivity is later
acquired. This is most likely caused by /etc/resolv.conf only being
parsed once - https://sourceware.org/bugzilla/show_bug.cgi?id=984, an
issue that was fixed in glibc 2.26 (PocketBook firmware U740.6.8.2461
has glibc 2.23).

This fix works around the problem by checking if we have a default route
first before even attempting to check `isOnline`. If we don't, then
`isOnline` is (almost) guaranteed to fail anyway.

We could alternatively check `isConnected` instead, but that only checks
wireless connectivity on many platforms, and we could have internet
access via USBNet instead. Checking for the default route via any
interface should work reliably for both wireless and USBNet
connectivity.

Another alternative fix is to add a fallback nameserver to
/etc/resolv.conf like we do for the Kobo platform [1]. Unfortunately,
this fix would not work in the following (rather common) scenario:

1. PocketBook boots, connects to WiFi
2. KOReader starts, /etc/resolv.conf looks all right, no fallback needed
3. PocketBook goes to sleep, disconnects from WiFi, clears resolv.conf
4. PocketBook wakes up, stays disconnected
5. KOReader user does a Wikipedia lookup, networking freezes

[1]: https://github.com/koreader/koreader/pull/6424/files#diff-be863601c59a2d6607af6b04b3be2392ec4494df6d25dae48250fae57b737f61R216-R224

Fixes: https://github.com/koreader/koreader/issues/10183
Related: https://github.com/koreader/koreader/issues/6421
2024-04-07 21:58:12 +02:00
hugleo
cd7d3b5ef6
Bump luajit-launcher (#11636)
Add support for C64P
2024-04-07 18:18:46 +02:00
Denis Malinovsky
6cc970dbb4
Do flashui refresh for first display of History page (#11603)
This fixes ghosting for color Pocketbook devices

Fixes #11602.
2024-04-06 13:07:34 +02:00
hius07
c415aea67e
File manager: fix classic mode item font size (#11626)
Closes #11625.
2024-04-05 19:03:05 +02:00
Frans de Jonge
601925ab87
[minor] CSS tweaks: fix typo cellpading → celpadding (#11618) 2024-04-04 16:02:02 +02:00
Frans de Jonge
ec54afcc0d
[minor] ReaderStyletweak: fix typo (#11616) 2024-04-04 16:01:49 +02:00
Frans de Jonge
a7edf213a5
[minor] FileChooser: use en-dash instead of dash for UI (#11615) 2024-04-04 16:00:53 +02:00
SomeGuy
f6588e95e8
ReaderHighlight: ~~strikeout~~ → Strikethrough (#11619) 2024-04-04 11:22:36 +02:00
Frans de Jonge
b1a80921ad
Revert "ReaderPaging: enable Kindle page-turn animations (#11424)" (#11617)
This reverts commit ee7c3ab551.
2024-04-03 19:04:27 +02:00
Frans de Jonge
b9261e0245
[i18n] Font UI fallbacks: insert replacement characters with template for Weblate compatibility (#11614)
Added in <https://github.com/koreader/koreader/pull/8722> and unproblematic for the past two years, but Weblate has now decided to complain about it to the extent of disabling translations:

> Error message
String contains control character: 'If some book titles, dictionary entries and such are not displayed well but shown as \ufffe\ufffe or ��, it may be necessary to download the required fonts for those languages. They can then be enabled as additional UI fallback fonts.\nFonts for many languages can be downloaded at:\n\nhttps://fonts.google.com/noto\n\nOnly fonts named "Noto Sans xyz" or "Noto Sans xyz UI" (regular, not bold nor italic, not Serif) will be available in this menu. However, bold fonts will be used if their corresponding regular fonts exist.'
2024-04-03 17:55:41 +02:00
Benoit Pierre
dce92020c1
bump base: fix sdcv binaries on non-Android/macOS platforms (#11609)
Closes #11604.
2024-04-01 18:38:10 +02:00
hasezoey
42c93a7623
FileChooser collates: use "item.sort_percent" for sorting + extra on-hold handling (#11592)
re https://github.com/koreader/koreader/pull/11524#issuecomment-1984110990
re https://github.com/koreader/koreader/pull/11542#issuecomment-2018164346

re #11592
2024-03-30 14:04:43 +01:00
SomeGuy
fbd3e822fe
ReaderView: increase underline thickness (#11586)
Closes #11581.
2024-03-29 09:38:31 +01:00
Denis Malinovsky
501cba6ebe
PocketBook: remove unused color_saturation parameter (#11597)
Bumps base for https://github.com/koreader/koreader-base/pull/1751

Includes several build system improvements as well
2024-03-29 09:36:53 +01:00
dkabot
ee7c3ab551
ReaderPaging: enable Kindle page-turn animations (#11424)
Fixes #11423.
2024-03-26 14:49:17 +01:00
Frans de Jonge
ca8e9352ba
[i18n] Add en-GB and Romanian translation to UI (#11577)
* Add en_GB translation to UI

Follow-up to https://github.com/koreader/koreader-translations/pull/167

* Uncomment Romanian
2024-03-20 23:41:32 +01:00
Denis Malinovsky
f4a8514545
ReaderTypography: update menu features symbols for Russian (#11570) 2024-03-20 23:24:49 +01:00
poire-z
86cb5cbd4c
bump crengine: various fixes, improved Russian typography (#11578)
Includes:
- In-page footnotes: avoid with '-cr-hint: noteref-ignore'
- In-page footnotes: ensure they don't cross "flows"
- Tables: fix rendering when negative text-indent
- FB2 cover drawing: ensure _invertImages flag
- EPUB: fallback to look for a cover in the first fragment
- TextLang: Russian: add typography rules
Also update to libunibreak 6.1.
2024-03-20 22:44:07 +01:00
poire-z
67cd647d1a
ReaderToc: add option to show chapter lengths (#11546) 2024-03-20 10:09:44 +01:00
hius07
c8c4e0301a
covermenu: fix file dialog (#11576) 2024-03-20 11:02:01 +02:00
Frans de Jonge
9387fcd2d0
[fix] ReaderLink: fix copy link (#11569)
Fixes #11567.
2024-03-18 17:36:01 +01:00
hius07
bb98cbf612
ReaderStatus: update status modification time (#11568)
In the "End of the book" action.
Closes #11564 (No idea how we got a book without modification time but the time stamp must be updated in any case)
2024-03-18 17:35:35 +01:00
hugleo
424fa9b6fd
ReaderView: ensure that the pan zoom direction is not nil (#11557)
Fix gif and web files not opening: https://github.com/koreader/koreader/pull/11425#issuecomment-2002164851
2024-03-17 12:13:04 +01:00
Martín Fernández
5d2782ddfe
bump luajit-launcher (#11554)
Add Linfiny eNote / Avalue ENT-13T1 / QuirkLogic Papyr
2024-03-15 19:36:34 +01:00
Martín Fernández
3638adc841
appimage: get full path before changing to assets dir (#11552) 2024-03-15 17:43:00 +01:00
Jo Van Bulck
4d19ce24ed
Dictionary: Fix download message when connection fails (#11548) 2024-03-14 16:58:47 +01:00
hugleo
95ce974ef9
bump base/libk2pdfopt and luajit-launcher (#11540)
- libk2pdfopt: allow asymmetric margins for auto-crop.
- luajit-launcher: new devices for e-ink test
2024-03-14 00:18:31 +01:00
poire-z
9a84755e56
Wikipedia EPUBs: add settings for include/highres images (#11544)
Allows setting a default answer to the "Include image"
and "slightly higher quality images" questions when
saving a Wikipedia article as EPUB.
2024-03-14 00:16:52 +01:00
poire-z
191ef2b4c0
Book style tweak: add more suggestions in "CSS ≡" (#11533) 2024-03-14 00:16:09 +01:00
hugleo
b026f84949
ReaderZooming: make auto-crop default be page content (#11438) 2024-03-14 00:15:10 +01:00
SomeGuy
ac0483bfce
Screensaver: 0% only on first page, 100% only on final page (#11541)
Fixes #11516
2024-03-13 21:22:33 +01:00
Frans de Jonge
20813cab53
Wallabag: properly deal with mimetype actually being content-type (#11532)
A typo snuck in #11492, which should've read `not type(article.mimetype) == "string" or type(article.mimetype) == "string" and not article.mimetype:find("^text/html")`. But in most cases the behavior would've been identically broken because of the same underlying issue: Wallabag mimetype is actually HTTP content-type.

Fixes #11528.

Also introduces a new setting associated with the behavior in case people have different preferences.
2024-03-13 12:47:13 +01:00
hius07
5414858b74
Menu widget: fix item property name (#11534) 2024-03-12 08:51:33 +02:00
poire-z
0eaa2d8248 Wikipedia: tweak EPUB css to force epub.css look
Include in the EPUB stylesheet most of our epub.css
tweaks, so we get our expected styling even when
html5.css is used as the default stylesheet.
(Users liking the "web page" look can still get it
by enabling some of our existing style tweaks.)
2024-03-10 17:06:14 +01:00
poire-z
70e6f4ce09 util.prettifyCSS(): handle better :is() and similar 2024-03-10 17:06:14 +01:00
poire-z
e3d7669588 Style tweaks: add tweak to avoid some presentational hints 2024-03-10 17:06:14 +01:00
poire-z
9467034f3f ReaderTypeset: tweak Style> menu logic and defaults
- Reword and document most menu items.
- Handle internally two default styles, one applying only
  to FB2/FB2 books, and the other to all other formats.
- Also don't reset the stylesheet to epub.css when
  toggling Embedded Styles to off.
2024-03-10 17:06:14 +01:00
poire-z
93b3e3504d bump crengine: better conformance to the HTML Standard rendering
Includes:
- Hyphenation: update French.pattern
- [CI] Add stylelint to help prevent typos in CSS
- In-page footnotes: better handle duplicated ids
- lvrend: handle in-page footnotes in table <caption>
- lvstsheet: fix compiler warnings
- LVString: ignore CJK chars in lStr_findWordBounds()
- lvtext: AddLine(): handle some CJK + space edge case
- EPUB: look for EPUB3 cover even when EPUB2 cover advertized
- List items: proper per-specs positionning and sizing
- epub.css: add/use "@media (-cr-max-cre-dom-version: 20180527)"
- fb2def.h: add more HTML element and attributes names
- CSS: generic support for handling presentational hints
- CSS: add support for private -cr-apply-func:
- ldomDocumentWriterFilter: remove attribute to CSS conversion
- lvrend: more proper rendering of block images
- lvrend: keep margin_left/right updated when "auto"
- CSS: add support for handling HTML's align= attribute
- lvrend: fix HR and images positionning when floats involved
- epub.css, html5.css: minor updates for easier stylesheet switch
- epub.css, html5.css: major updates for better conformance
- fb2.css: fix CI stylelint warnings
Also update to libunibreak 6.0.
2024-03-10 17:06:14 +01:00
hius07
6f896e9383
ReaderFooter: chapter progress bar (#11505) 2024-03-10 08:05:30 +02:00
hius07
bdb1c3135c
Fulltext search: default mode, fixes (#11507) 2024-03-10 07:57:50 +02:00
hius07
8df885438c
Bookmarks: edit highlighted text (#11484) 2024-03-09 17:03:43 +02:00
hius07
66afeebe85
CoverBrowser: show cached cover of deleted file in history (#11523) 2024-03-09 17:02:31 +02:00
poire-z
c65d128032
Menu, DictQuickLookup, TextViewer: allow mousewheel scrolling (#11525)
We also need to catch it in TrapWidget so we can
interrupt Wikipedia articles images loading.
2024-03-09 09:11:23 +01:00