Repository navigation
feat(web): translate the admin library and media pages - #3904
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
The Evidence section identifies desktop captures, but these admin-page translations also change text at phone width. Please add before-and-after mobile web captures of the affected admin screens, or explain why mobile is unaffected, as required by CONTRIBUTING.md’s “Show visible changes.” |
ceb1a2e to
a257dd7
Compare
bda80f9 to
6a89181
Compare
|
Added phone-width captures to the evidence page: Libraries and Collections in English (before and after), Spanish and Arabic. The Arabic folder count in the Libraries table showed unjoined letters at both widths; #3911 fixes it. |
6a89181 to
fbe8143
Compare
6a93e8a to
8c40b2b
Compare
fbe8143 to
62f49d4
Compare
8c40b2b to
d262d19
Compare
Extracts the admin library, metadata, collections, Discover, scans and downloads pages to the shared catalog with English unchanged. Discover previews and unnamed brand rows still send their English defaults, and scan and storage labels stay safe for values the server adds later. Co-Authored-By: Claude Opus 5.5 <[email protected]>
62f49d4 to
68f9b9d
Compare
Problem
Related issue: #3188
Validation tasks: none (English output is unchanged apart from one plural fix in a Discover warning)
Stacked on #3903; the full stack order is in #3723.
The admin library and media pages are hardcoded English, so an administrator using a translated interface still manages libraries, collections, Home sections and requests in English. This converts them to catalog messages.
Approach
Libraries, Autoscan, Collections, Home sections, Recommendations, Subtitles, Marker history, Downloads, Requests, History import and Catalog maintenance, plus the admin search dialog, their dialogs, empty states and the toasts their query hooks raise, now come from the catalog under
web.admin.*, which loads in the admin chunk from #3903. Discover previews and unnamed brand rows still send their English defaults, and scan and storage labels stay safe for values the server adds later.To stay under the 800-line limit,
hooks/queries/admin/requests.ts,AdminRecommendations.tsxandRequestQueue.tsxmove self-contained parts intorequestLimits.ts,AdminRecommendationsEmbedding.tsxandBulkProgress.tsx;requests.tsre-exports its hooks.English is unchanged apart from one plural fix: the Discover refresh warning reads "showing the 1 title from before" where it said "1 titles".
Validation
mainon every converted screen apart from that plural fix.Evidence
Evidence: https://evidence.siloserver.org/r/silo-server/pr-3904/
Surface and build: web admin, desktop and phone width; English on
mainand on a build of the whole stack, and Spanish, Arabic, German and Japanese on that build. Phone captures show English (before and after), Spanish and Arabic.Risks
Checklist
AI Disclosure
🤖 Generated with Claude Code
Note
Add i18n infrastructure and translate admin library and media pages
useT/useAppLanguage/useAdminMessageshooks, and aLocaleProviderwired intoAppShellAccept-Languageon API requests inbuildApiHeadersweb/src/lib(dates, language names, formatters)formatLocale()across dashboard widgets, stats, and charts; addseslint-plugin-formatjslint rules to block untranslated literalscatalogPartsVite plugin in web/vite.config.ts to split locale JSON into app and admin message bundles, and ascripts/sync-translationsscript to fetch or generate translation filesuseAdminMessagesconfirms the admin catalog loaded (AdminLayout.tsx gates on it);formatDelayandformatSubtitleOffsetno longer include the "ms" unit;LANGUAGESis replaced by thelanguageOptions()function; paginationitemNounis now optional and falls back to a translated summaryMacroscope summarized 62f49d4.