Skip to content

feat(web): translate the shared helpers, and write possessives as whole messages - #3907

Merged
Quick104 merged 5 commits into
mainfrom
i18n/web-shared-helpers
Nov 10, 2026
Merged

Quick104 merged 5 commits into
mainfrom
i18n/web-shared-helpers

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 an admin error)

Stacked on #3906; the full stack order is in #3723.

The helpers several areas share (formatting, tab titles, sort and genre labels, counts, query-hook toasts) are still hardcoded English, so every translated screen keeps English fragments. Possessives are also built in code ("Sam's"), which can't be translated. This converts the helpers, writes possessives as whole messages, and brings the generated catalog back to the silo-translations release.

Approach

Formatting helpers (sizes, bitrates, runtimes, relative times, manga chapters, calendar labels), tab titles, sort labels, TMDB genres and request-routing options, request access text, select-mode and pagination counts, and the toasts the shared query hooks raise now come from the catalog, under web.common.* (any user) and web.admin.common.* (admin only). Saved rule names, synced-list names and Discover chart titles stay English, since the code stores or compares them. Counts a user can set print through string placeholders.

Possessives are whole messages with the owner's name as a placeholder, so translators adapt the structure and the name is isolated in right-to-left languages. Text non-administrators can see moves from web.admin.* to web.common.* (device platform labels, signing-secret dialog, plugin schema form, playback method labels), since admin text loads only with the admin area.

Two caller fixes come with the release: seven messages gained quantity placeholders, so their call sites pass the old values (English unchanged), and the generic settings controls show skip-interval choices through player.seekInterval.choice instead of the manifest's literal "10 seconds".

The last commit regenerates web/src/locales/ from the silo-translations release 2026.11.09-5ca0019, replacing the intermediate output #3900 to #3906 used.

Validation

  • Web tests, typecheck, ESLint, prettier, the size ratchet and the bidi check pass on this branch.
  • English: unchanged on every compared screen, apart from "of 1 overrides" → "of 1 override".
  • On a sandbox: the screens below render in Spanish, Arabic (right to left), German and Japanese.

Evidence

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

Surface and build: web app and admin, desktop; English on main and on a build of the whole stack, and Spanish, Arabic, German and Japanese on that build.

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 integration branch, findings fixed. Background review by Codex (gpt-6.1-sol) on 569dbaa: no findings.

🤖 Generated with Claude Code

Note

Translate the web app UI with react-intl and write possessives as whole messages

  • Adds an i18n layer in web/src/i18n: eager English app catalog, lazy admin and translated catalogs, useT/useAppLanguage hooks, and an AppIntlProvider wired into the app shell via LocaleProvider.
  • Replaces fixed English strings across pages, components, hooks, and player code with translation messages, including plural forms and possessives as whole messages. Dynamic counts and values are passed as message parameters.
  • Adds a catalogParts Vite plugin that splits locale imports into app and web.admin.-prefixed admin parts, with tests in vite.config.test.ts. Adds a sync-translations script with checksum and path-safety checks.
  • Adds a signed-out language picker on auth screens, sends Accept-Language on API requests, and declares react-intl and eslint-plugin-formatjs in package.json.
  • Behavioral Change: admin layout and setup wizard now render nothing until the admin message catalog loads; useAdminMessages throws a recorded error while it is unavailable. Numeric output (dates, counts, sizes) now uses the app locale instead of the runtime default. Tests wrap rendered components in an English AppIntlProvider and load admin English messages in test-setup.ts.

Macroscope summarized 80b9e1f.

@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

Warning

Review limit reached

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

  • Ask an admin to enable usage-based reviews

Open in CodeRabbit

Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing.

Next included review available in 56 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 4 included reviews currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 2965456a-211c-41f9-b8c1-97b24469597a
Commits

Reviewing files that changed from the base of the PR and between 96b7cc6 and 8300e51.

Files selected for processing: 112

  • .silo-translations
  • .silo-translations-files
  • web/eslint.config.js
  • web/src/App.tsx
  • web/src/api/adminPolicy.ts
  • web/src/api/adminSections.ts
  • web/src/api/v2/adminSubtitleProviderConfiguration.ts
  • web/src/components/AdminLayout.tsx
  • web/src/components/AdminSidebar.tsx
  • web/src/components/BrandCarousel.tsx
  • web/src/components/DateTimePicker.tsx
  • web/src/components/HomeRedirect.tsx
  • web/src/components/ImageUploadField.tsx
  • web/src/components/LibraryItemLink.tsx
  • web/src/components/LoadMoreOnScroll.tsx
  • web/src/components/RefreshFailedNotice.tsx
  • web/src/components/SideNav.tsx
  • web/src/components/SigningSecretDialog.tsx
  • web/src/components/StreamBitrateLimitInput.tsx
  • web/src/components/TagInput.tsx
  • web/src/components/admin/deviceOverrides.tsx
  • web/src/components/admin/devicePlatformLabels.ts
  • web/src/components/admin/plugins/SchemaForm.tsx
  • web/src/components/admin/plugins/schemaFormUtils.ts
  • web/src/components/calm/SelectModeBar.tsx
  • web/src/components/catalog/CatalogFilterSheet.tsx
  • web/src/components/collections/guidedRepresentable.ts
  • web/src/components/homeRows/addRow/RuleBuilder.tsx
  • web/src/components/loadErrorDescription.ts
  • web/src/components/overlays/CardWatchStatus.tsx
  • web/src/components/overlays/OverlayPreviewVariantToggle.tsx
  • web/src/components/settings/DeviceSettingGroups.test.tsx
  • web/src/components/settings/DeviceSettingGroups.tsx
  • web/src/components/settings/SettingsSidebar.tsx
  • web/src/components/subtitles/SubtitleUploadForm.tsx
  • web/src/components/ui/calendar.tsx
  • web/src/components/ui/pagination.tsx
  • web/src/hooks/queries/admin/rateLimits.ts
  • web/src/hooks/queries/admin/scanControls.ts
  • web/src/hooks/queries/admin/userProfiles.ts
  • web/src/hooks/queries/admin/users.ts
  • web/src/hooks/queries/collectionScope.ts
  • web/src/hooks/queries/favorites.ts
  • web/src/hooks/queries/history-import.ts
  • web/src/hooks/queries/homeRows/useProfileHomeRows.ts
  • web/src/hooks/queries/markers.ts
  • web/src/hooks/queries/notInterested.ts
  • web/src/hooks/queries/notificationWebhooks.ts
  • web/src/hooks/queries/profiles.ts
  • web/src/hooks/queries/ratings.ts
  • web/src/hooks/queries/sections.ts
  • web/src/hooks/queries/subtitles.ts
  • web/src/hooks/queries/useAutoscan.ts
  • web/src/hooks/queries/useRequests.ts
  • web/src/hooks/queries/watchProviders.ts
  • web/src/hooks/queries/watchlistTitles.ts
  • web/src/hooks/queries/webhook-sync.ts
  • web/src/lib/accountOwner.ts
  • web/src/lib/buildPluginHref.ts
  • web/src/lib/collections/tmdbSources.ts
  • web/src/lib/date.ts
  • web/src/lib/documentTitle.ts
  • web/src/lib/mangaChapters.ts
  • web/src/lib/markers.ts
  • web/src/lib/mediaFormat.ts
  • web/src/lib/overlays/icons.tsx
  • web/src/lib/querySortOptions.ts
  • web/src/lib/quotaPeriods.ts
  • web/src/lib/requestAccess.ts
  • web/src/lib/requestRoutingOptions.ts
  • web/src/lib/scanRuns.ts
  • web/src/lib/settingsText.ts
  • web/src/lib/tmdbGenres.ts
  • web/src/locales/ar-XB.json
  • web/src/locales/ar.json
  • web/src/locales/de.json
  • web/src/locales/en-XA.json
  • web/src/locales/en.json
  • web/src/locales/es.json
  • web/src/locales/fr.json
  • web/src/locales/ja.json
  • web/src/locales/keys.ts
  • web/src/locales/pt-BR.json
  • web/src/locales/zh-Hans.json
  • web/src/pages/AdminActivity.tsx
  • web/src/pages/AdminBackupRestore.tsx
  • web/src/pages/AdminLibraries.tsx
  • web/src/pages/AdminMarkerHistory.tsx
  • web/src/pages/AdminPlaybackHistory.tsx
  • web/src/pages/AdminUsers.tsx
  • web/src/pages/EbookReader.tsx
  • web/src/pages/ItemDetail/MangaContent.tsx
  • web/src/pages/ItemDetail/itemDetailLayout.ts
  • web/src/pages/admin-backups/RestoreUsers.tsx
  • web/src/pages/admin-backups/backupPresentation.ts
  • web/src/pages/admin-downloads/DeviceCopiesTab.tsx
  • web/src/pages/admin-downloads/StorageTab.tsx
  • web/src/pages/admin-requests/discoverLayoutModel.ts
  • web/src/pages/admin-settings/MarkerProviderTiles.tsx
  • web/src/pages/admin-settings/RequestRouteFields.tsx
  • web/src/pages/admin-settings/requestRoutingModel.ts
  • web/src/pages/admin-users/detail/format.ts
  • web/src/pages/admin-users/detail/preferences/LevelSettings.tsx
  • web/src/pages/admin-users/detail/preferences/ProfileHomeSections.tsx
  • web/src/pages/admin-users/detail/preferences/levels.ts
  • web/src/pages/admin-users/detail/profiles/ProfilesTab.tsx
  • web/src/pages/admin/autoscan/ActivityPanel.tsx
  • web/src/pages/adminActivityPresentation.ts
  • web/src/pages/settings/AccountSignInSection.tsx
  • web/src/pages/settings/DeviceSettings.tsx
  • web/src/pages/setup-wizard/steps/FeaturesStep.tsx
  • web/src/player/bandwidth-measure.ts
  • 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:15:11.529256Z 8300e51 New commits
🔒 Security Review ✅ Completed 2026-11-10T02:17:03.891878Z 8300e51 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.

@chatgpt-codex-connector

Copy link
Copy Markdown

💡 Codex Review

https://github.com/Silo-Server/silo-server/blob/3fc73850193c30dc724d589d1c8d1c6d475c6e29/web/src/locales/en.json#L112959-L112963
P2 Badge Update callers when adding required message placeholders

The regenerated catalog introduces required arguments without updating the existing callers. For example, StreamBitrateLimitInput.tsx:57 still calls this message without places or min, causing a formatting error on every render of the bitrate control. The same mismatch affects lowWarning (mbps), resolveSeriesPrimaryAction (episode), quotaPeriodWindowLabel (hours/days), and the subtitle upload help (megabytes). These previously displayed valid text but now fail formatting, including in English; the test-mode formatter throws on these errors. Update all affected callers alongside the catalog, or preserve the argument-free messages until their callers are migrated.

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@silo-triage silo-triage Bot added enhancement New feature or request evidence-required Needs before-and-after evidence before the Evidence check passes 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
@Quick104
Quick104 force-pushed the i18n/web-area-admin-ops branch from 4aba3d6 to bb9d4e2 Compare November 9, 2026 18:47
@Quick104
Quick104 force-pushed the i18n/web-shared-helpers branch from 3fc7385 to 569dbaa Compare November 9, 2026 18:47
@Quick104

Quick104 commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor Author

On the Codex note about required placeholders: it read an earlier head (3fc7385). The current head carries 43ed24e before the regen commit, which passes the new arguments at each caller: places and min for the bitrate input, mbps for its low warning, episode for the series action, hours/days for the quota windows, and megabytes for the subtitle upload help.

@Quick104
Quick104 force-pushed the i18n/web-shared-helpers branch from 569dbaa to 603645e Compare November 9, 2026 20:08
@Quick104
Quick104 force-pushed the i18n/web-area-admin-ops branch from bb9d4e2 to 1a1d413 Compare November 9, 2026 20:08
@Quick104
Quick104 force-pushed the i18n/web-shared-helpers branch from 603645e to 80b9e1f Compare November 10, 2026 02:08
@Quick104
Quick104 force-pushed the i18n/web-area-admin-ops branch 2 times, most recently from 4e75cd8 to 25003a9 Compare November 10, 2026 02:11
@Quick104
Quick104 changed the base branch from i18n/web-area-admin-ops to main November 10, 2026 02:11
Quick104 and others added 5 commits November 9, 2026 21:11
Converts what the area extractions left for shared ownership:
formatting helpers (sizes, bitrates, runtimes, relative times, manga
chapters, calendar labels), tab titles, sort labels, TMDB genres and
request-routing options, request access text, select-mode and
pagination counts, and the toasts the shared query hooks raise.

Saved rule names, synced-list names and Discover chart titles stay
English, since the code stores or compares them. Counts a user can set print through string placeholders.
English is unchanged apart from "of 1 overrides" -> "of 1 override".
The converted files go on the ESLint guard, with components/sessions
and components/overlays/settings, which the profiles and settings extraction converted.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ut of web.admin

The catalog now allows an apostrophe after a placeholder, so the empty
and no-op tags that kept "{name}'s" byte-identical become plain
placeholders, which also isolates the names in right-to-left languages.
Device settings no longer passes a code-built "Sam's"/"your" into its
messages.

Device platform labels, the signing-secret dialog, the plugin schema
form and the playback method labels show on user settings pages too,
so their keys move from web.admin.* to web.common.*: admin text loads
only with the admin area.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The catalog turned literal quantities in seven web messages into
placeholders: "Start From Episode 1", the stream bitrate hints, the
subtitle quota windows ("24 hours", "7 days", "30 days") and the subtitle
upload size. Each call site passes the old value, so English is unchanged
and the numbers follow the screen's digits.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The settings manifest writes skip interval options as text ("10 seconds"),
which the generic settings controls showed as written. They now use the
catalog's player.seekInterval.choice message with the option's value, as
the other clients do, so the seconds follow the screen's digits. English
is unchanged. Builds with the regenerated catalog in the next commit.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
….09-5ca0019

Generated by scripts/sync-translations --version 2026.11.09-5ca0019. The
area PRs below this one built against an intermediate catalog; from here
on the output is the release.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@Quick104
Quick104 force-pushed the i18n/web-shared-helpers branch from 80b9e1f to 8300e51 Compare November 10, 2026 02:11
@Quick104
Quick104 merged commit 42f22e4 into main Nov 10, 2026
1 check passed
@Quick104
Quick104 deleted the i18n/web-shared-helpers branch November 10, 2026 02:12
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 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