Adds 424 bilingual StarDict dictionaries from WikDict
(https://www.wikdict.com). #9037 requested dictionaries from both
ebook-reader-dict and WikDict; the ebook-reader-dict (reader.dict) entries
are already present, and this adds the WikDict side. Source data is
Wiktionary via DBnary; the dictionaries are licensed CC BY-SA 3.0 and hosted
at download.wikdict.com.
The entries are kept in a separate file, dictionaries_wikdict.lua, instead
of being inlined into dictionaries.lua, because:
- The list is large (424 pairs) and would dominate the hand-curated
dictionaries.lua, making that file harder to review and diff.
- It is generated programmatically from the published dictionaries (via
wikdict-gen's `helper.py koreader`), so it is regenerated wholesale on
each WikDict release. Keeping it as its own file makes an update a single
file replacement with no manual merging.
dictionaries.lua appends the entries with table.move and still returns one
flat dictionaries table, so nothing else needs to change.
self:write({ collection_name = true }) used the literal string
"collection_name" as the table key instead of the variable's value.
write() consults the table as a per-collection allowlist
(updated_collections[coll_name]), so the gate never matched any
real collection and the per-collection saveSetting branch was
silently skipped -- the in-memory removal didn't reach disk.
Stock FM avoids the path (the collection dialog uses
addRemoveItemMultiple + full write()), so end-users have not been
impacted. Plugins calling removeItem(file, name) directly do hit
it. Fixes#15453.
Includes:
- fix GCC 16 warnings (-Wunused-but-set-variable)
- ldomXRange::getRangeText(): newline on <br/>
- createXPointer(pt)/getRect(): use formatter src->t.text
- getRect(): unify one-char-long word width handling
- CSS ::first-letter: use non-letter char if no letter in first text node
- CSS ::first-line: properly handle inline-block
- createXPointer(pt): return source text node on pseudoElem[FirstLetter]
- getSegmentRects(): compare .bottom additionally to .top
- lvfntman: add getCapHeight()
- CSS initial-letter: add CSS parsing and style slot
- CSS initial-letter: render ::first-letter via inline-box
Also includes:
- MuPDF: check if page has smask before applying it
credocument: fix call cache statistics
Using the wikipedia enforced image step sizes to avoid 429 errors. Also
respecting the 'retry-after' field so that epub downloads are not rate
limited on retrieving images.
The viewport introduced in #11302 is a bit conservative and as a result, after opening KOReader menus, some artifacts remain on the right screen margin as black bars, which are disturbing.
Solution: Increase the viewport until no artifacts can be seen and also make sure book is not rendered behind the screen bezel.
Calibre's author_sort field carries the curated "Surname, Forename"
form for each author -- distinct from the display string in authors,
and the only reliable way to get surname-ordering right for compound
names, particles, and inverted-naming cultures (CJK, Hungarian).
slim() currently strips this field when writing the device-side
.metadata.calibre after a wireless transfer, even when desktop Calibre
includes it in the transfer payload. Downstream plugins that want
correct surname ordering can't get at it for libraries synced via the
Calibre Companion plugin -- reported in the Bookshelf koplugin issue
tracker by a user with ~2250 books all showing empty author_sort
after sync, despite their desktop Calibre having the field populated
on every book.
Add "author_sort" to the used_metadata whitelist so it's preserved on
the device-side file. Books without the field continue to load
cleanly (slim's "or rapidjson.null" handles missing fields); on-disk
size grows by a small per-book constant.
search_used_metadata stays unchanged -- search displays the author
string, not the sort form.
If you have a Tolino device and have switched it into "Kobo mode" using the
developer options, the codename of the device is updated as well. This adds the
codenames for these devices to the device detection for Kobo devices.