Skip to content

feat(web): translate the admin library and media pages - #3904

Merged
Quick104 merged 1 commit into
mainfrom
i18n/web-area-admin-media
Nov 10, 2026
Merged

Quick104 merged 1 commit into
mainfrom
i18n/web-area-admin-media

Conversation

@Quick104

@Quick104 Quick104 commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

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.tsx and RequestQueue.tsx move self-contained parts into requestLimits.ts, AdminRecommendationsEmbedding.tsx and BulkProgress.tsx; requests.ts re-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

  • Web tests, typecheck, ESLint, prettier, the size ratchet and the bidi check pass on this branch.
  • English: per-screen visible text matches main on every converted screen apart from that plural fix.
  • On a sandbox: the admin pages below render in Spanish, Arabic (right to left), German and Japanese.

Evidence

Evidence: https://evidence.siloserver.org/r/silo-server/pr-3904/

Surface and build: web admin, desktop and phone width; English on main and 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

  • I read and can explain the complete diff.
  • This pull request addresses one concern.
  • Each test this pull request adds meets "Decide what to test" in CONTRIBUTING.md.
  • The Evidence section shows every change a user can see, or says there is none.

AI Disclosure

  • Harness: Claude Code (in T3 Code)
  • Tool(s): Claude Code; Codex
  • Model(s): claude-opus-5-5; claude-sonnet-5-5; gpt-6.1-sol
  • Involvement: Fully AI-generated; human review pending
  • Adversarial review: code review by Claude (claude-opus-5-5); one adversarial round by Codex (gpt-6.1-sol) on the branch it was split from, findings fixed. Background review by Codex (gpt-6.1-sol) on bda80f9: F1 (the Discover warning's plural fix changes English) is intended and now listed.

🤖 Generated with Claude Code

Note

Add i18n infrastructure and translate admin library and media pages

  • Introduces a new i18n system in web/src/i18n: a lazy-loaded catalog split into app and admin parts, an Intl formatter with RTL argument isolation, useT/useAppLanguage/useAdminMessages hooks, and a LocaleProvider wired into AppShell
  • Adds a signed-out language picker on auth screens and an app-language setting in Accessibility settings, with the language sent as Accept-Language on API requests in buildApiHeaders
  • Replaces hard-coded English strings with translation lookups across the admin library, media, requests, collections, and settings surfaces, plus shared helpers in web/src/lib (dates, language names, formatters)
  • Formats numbers and dates with the application locale via formatLocale() across dashboard widgets, stats, and charts; adds eslint-plugin-formatjs lint rules to block untranslated literals
  • Adds a catalogParts Vite plugin in web/vite.config.ts to split locale JSON into app and admin message bundles, and a scripts/sync-translations script to fetch or generate translation files
  • Behavioral Change: admin pages render nothing until useAdminMessages confirms the admin catalog loaded (AdminLayout.tsx gates on it); formatDelay and formatSubtitleOffset no longer include the "ms" unit; LANGUAGES is replaced by the languageOptions() function; pagination itemNoun is now optional and falls back to a translated summary

Macroscope summarized 62f49d4.

@silo-triage silo-triage Bot added the size/XXXL 3000+ added + deleted lines (all files); change volume, not priority. label Nov 9, 2026
@coderabbitai

coderabbitai Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

Caution

Review failed

The pull request is closed.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-10T02:14:11.750359Z 68f9b9d New commits
🔒 Security Review ✅ Completed 2026-11-10T02:15:25.222771Z 68f9b9d New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@silo-triage silo-triage Bot added enhancement New feature or request evidence-required Needs before-and-after evidence before the Evidence check passes javascript Pull requests that update javascript code priority: P2 Limited scope, workaround exists, or polish stacked Base is another open PR; merge in stack order named in the body labels Nov 9, 2026
@silo-triage

silo-triage Bot commented Nov 9, 2026

Copy link
Copy Markdown

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.”

@Quick104 Quick104 left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adversarial review (gpt-6.1-sol, reviewed bda80f9)

AI disclosure: gpt-6.1-sol in T3 Code using the Codex provider.

@Quick104

Quick104 commented Nov 9, 2026

Copy link
Copy Markdown
Contributor Author

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.

@Quick104
Quick104 force-pushed the i18n/web-area-admin-media branch from 6a89181 to fbe8143 Compare November 9, 2026 20:08
@Quick104
Quick104 force-pushed the i18n/web-admin-chunk branch from 6a93e8a to 8c40b2b Compare November 10, 2026 02:08
@Quick104
Quick104 force-pushed the i18n/web-area-admin-media branch from fbe8143 to 62f49d4 Compare November 10, 2026 02:08
@Quick104
Quick104 force-pushed the i18n/web-admin-chunk branch from 8c40b2b to d262d19 Compare November 10, 2026 02:11
@Quick104
Quick104 changed the base branch from i18n/web-admin-chunk to main November 10, 2026 02:11
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]>
@Quick104
Quick104 force-pushed the i18n/web-area-admin-media branch from 62f49d4 to 68f9b9d Compare November 10, 2026 02:11
@Quick104
Quick104 merged commit c3c21a1 into main Nov 10, 2026
3 checks passed
@Quick104
Quick104 deleted the i18n/web-area-admin-media branch November 10, 2026 02:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request evidence-required Needs before-and-after evidence before the Evidence check passes javascript Pull requests that update javascript code priority: P2 Limited scope, workaround exists, or polish size/XXXL 3000+ added + deleted lines (all files); change volume, not priority. stacked Base is another open PR; merge in stack order named in the body

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant