You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(metadata): read/write book languages instead of hardcoded "en" (#130)
* feat(startup): foreground the app when the main window first shows
The main window starts hidden and is revealed from the frontend once
settings hydrate. show() made it visible but never activated the app,
so Citadel could launch behind whatever window already had focus. Focus
the window right after showing it, mirroring the settings-window pattern.
Fixes CDL-16
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* feat(metadata): read/write book languages instead of hardcoded "en"
Book never read the languages/books_languages_link tables, BookUpdate had
no language field, and OPF generation hardcoded <dc:language>en</dc:language>
— multilingual libraries were silently mislabeled.
- libcalibre: Language entity + queries (canonicalize ISO 639-1→639-3,
set_for_book replace/clear, batched + single readers via raw SQL since
there's no diesel joinable! for languages). Book.language_codes,
BookUpdate.language_codes (Some=replace/empty=clear/None=untouched),
BookAdd.language.
- OPF emits one <dc:language> per real code (und when none). New
Library::regenerate_metadata_opf rebuilds metadata.opf from DB state and
runs on both add and update, so the derived OPF stays faithful for every
field — not just language.
- Tauri: LibraryBook.language_list, BookUpdate DTO.language_list, and
ImportableBookMetadata.language now flows into to_book_add (was dropped).
- UI: multi-value Languages row on Edit Book (ui TagsInput) backed by
src/lib/languages.ts code↔name mapping.
Fixes CDL-2
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
0 commit comments