Repository navigation
fix(web): translate series, calendar and push all strings, fix search interval hint - #3027
Conversation
… interval hint The wanted search interval is the gap between scheduled sweeps (scheduler.go runs search-wanted "@every <interval>"), so the hint telling rate limited users to reduce it made Bindery search more often. It now says to choose a longer interval. The de, es, fr, nl, tl and id files carried the same wrong advice as untranslated English, so the key is removed there and falls back to the corrected English. The Series page, its name modal, the Calendar month and weekday names and the Calibre Push all button and progress modal were hardcoded English. They now go through i18n; the Calendar formats names with Intl.DateTimeFormat in the active language. en.json prose now uses the ellipsis character throughout, with matching inline defaults. The other locales (excluding nb and sv, which #2994 handles) get the same change for translated values only; English filler values are left alone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016fJcCVbNnKsmj2MAAMwWj9 Signed-off-by: vavallee <vavallee@protonmail.com>
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
… line Removes common.deleting and discover.refreshing from locales where they were still verbatim English, so they fall back to en.json like the search interval hint. The calendar month label no longer wraps on phones for long names such as Spanish "septiembre de 2026". The changelog fragment carries the PR number and notes the capitalised series badges. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016fJcCVbNnKsmj2MAAMwWj9 Signed-off-by: vavallee <vavallee@protonmail.com>
Signed-off-by: vavallee <vavallee@protonmail.com>
The Push all block and its modal now go through t(), and this file mocks t to return keys, so the helper and the assertions for the description, the bridge warning, the missing plugin URL tooltip, the done summary and the Close button match on keys instead of English text. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016fJcCVbNnKsmj2MAAMwWj9 Signed-off-by: vavallee <vavallee@protonmail.com>
There was a problem hiding this comment.
Reviewed the full diff. Overall clean i18n sweep with good test coverage for locale-switching cases.
One item to verify before merge
SeriesPage.tsx (the Hardcover format select, around the fillMediaType block) now calls t('common.ebook'), t('common.audiobook'), and t('common.both') with no inline defaults, and the diff does not add these three keys to en.json. If they do not pre-exist in en.json the format select renders the raw key string (common.ebook etc.) in every language. The new SeriesPage.test.tsx locale test does not exercise the diff panel (it needs a hardcoverLink with missingCount > 0), so the gap would not be caught by CI. Worth a quick check: jq '.common | keys' web/src/i18n/locales/en.json
Everything else looks good
- The search-interval hint fix is correct: the scheduler registers the job as @every interval (clamped 1h-168h), so a shorter interval searches more often. Old advice was backwards; new wording is right.
- CalendarPage uses timeZone UTC throughout and anchors weekday names to 2023-01-01 (a Sunday, matching getDay()==0). UTC construction prevents local-offset edge cases. Switching key={d} to key={i} on weekday headers is correct since narrow names can collide (two S, two T).
- Removing searchIntervalHint and other stale English filler from de/es/fr/nl/tl/id correctly falls back to the fixed en.json rather than showing old wrong advice.
- Pluralisation of series.genre.applied (_one/_other) replaces the hacky book(s) suffix.
- The three new test suites (CalendarPage, SeriesPage translations, CalibreSyncModal translations) each assert on the pre-fix behaviour failing, so they actually catch the regression they describe.
--- bot Bindery triage bot (automated). Reply to correct me; a human will see it.
Summary
Fixes UI text bugs found while translating Norwegian and Swedish in #2994.
search.intervalis the gap between scheduled sweeps (internal/scheduler/scheduler.goregisterssearch-wantedas@every <interval>, clamped to 1h to 168h, read once at startup). The hint told rate limited users to reduce it, which makes Bindery search more often. It now says to choose a longer interval.…across en.json prose, and in the other locales where it is mechanical.Implementation notes
searchIntervalHintwhitespace-nowrap, min width). Hardcoded month and weekday arrays replaced withIntl.DateTimeFormatini18n.resolvedLanguage, built and formatted in UTC so no offset can shift a label. Covers the month header, thereleasingIninterpolation, the agenda day labels (Mar 5/5 mars), both weekday header rows and the document title.bookStatus.*labels) and the document title. New keys are underseries.*.Add Seriesbutton and modal title in AuthorsPage now use the same key.CalibreSyncModal. New keys are undersettings.calibre.pushAll.*....to…, plus the matching inlinet()defaults soinlineDefaults.test.tsstays green. de, es, fr, nl, tl, id and ko: translated values only. Values that were still verbatim English filler (common.deletingin de, es, fr, nl, tl and id, anddiscover.refreshingin de, fr and nl) are removed so they fall back to en.json. nb.json and sv.json were not touched (#2994).English rendering is unchanged except: ellipses,
Genres set on N books(wasbook(s)),N more missing booksingular, and series status pills now readImported/Wanted(capitalised, as on other pages) instead of the raw enum.Follow-ups (not in this PR)
CalibreTab.tsxis still hardcoded English: library path, write integration options, binary path, plugin URL, API key, path remap, Test connection, Library import, CWA section and import progress.AddSeriesBookModal.tsxandHardcoverSeriesLinkModal.tsx(opened from the Series page) are hardcoded English.<option>labels inGeneralTab.tsx(6 hours,12 hours (default)and so on).ABSTab.tsxhas hardcodedSearching...,Author,Book.document.titlefrom an English literal (Wanted, Search, History, Settings, Books, Users).searchIntervalLabelandsearchIntervalRestart. These should be removed so they fall back properly.Checklist
Test plan
cd web && npm ci && npm run lint(0 errors; the 7 warnings are already on main)npm run typechecknpx vitest run: 1226 of 1227 passed. The one failure was a 5s timeout inHistoryPage.test.tsx(a file this PR does not touch), and it passes when run on its own.npm run buildCalibreTab.coverage.test.tsxnow matches on i18n keys. The full suite passed 1547 of 1548; the one failure was a library import timing test in that file, in a section this PR does not change, and the file passed 3 of 3 runs on its own.CalendarPage.test.tsx(English and French month, weekday and day labels),SeriesPage.test.tsx"renders its labels from the active locale",CalibreSyncModal.test.tsxtranslation cases. I ran the locale tests against the original components and all three failed, so they do catch the old hardcoded strings.🤖 Generated with Claude Code
https://claude.ai/code/session_016fJcCVbNnKsmj2MAAMwWj9