feat(ui): i18n - migrate shared constants, base components, and app chrome - #6423
feat(ui): i18n - migrate shared constants, base components, and app chrome#6423valkirilov wants to merge 9 commits into
Conversation
Route hardcoded English strings in shared constants through t() so already-migrated screens render in the active locale. - getValidationErrors(t) factory replacing the default export (11 consumers updated) - AI_CHAT_ERRORS uses i18n singleton instead of bare strings - Remove TEXT_* consts from browser.ts (inlined at call sites via t()) - Drop TABLE_IMPORT_RESULT_COLUMN_ID_HEADER_MAP (built with t() in TableResult) - Delete breadcrumbs.ts (dead code, zero consumers) - Add 15 new keys to en.json + bg.json - Update .tscheck.rec.json baselines for pre-existing TS errors References: #RI-8364
Route hardcoded strings in RiFilePicker and AutoTag through t()
so these shared components render in the active locale.
- RiFilePicker: prompt text, file-count, aria-label, Remove button
- AutoTag: Clear button title
- Add common.button.{clear,remove} and common.filePicker.* keys
Also fix 4 pre-existing prettier violations in HashDetailsTable.spec.tsx
(long toHaveTextContent lines, same pattern fixed elsewhere in Chunk 1).
References: #RI-8364
Route hardcoded strings in app-chrome navigation and header components through t() so they render in the active locale. - NavigationMenu: aria-label, GitHub tooltip - useNavigation: all nav-item tooltip + ariaLabel strings (navigation.page.*) - InstanceHeader: breadcrumb link, tooltip, aria-label, db index placeholder - ShortInstanceInfo: database info alt, logical db section, user default, modules heading - home-tabs/constants: static tabs array replaced with getTabs(t) factory - RdiInstanceHeader: tooltip, aria-label, breadcrumb link text - Add 31 keys across homeTabs.*, instanceHeader.*, navigation.*, rdiInstanceHeader.* References: #RI-8364
Routes hardcoded strings in AutoRefresh, TableColumnSearch, ConnectivityError, GroupBadge, ActionBar, DeleteAction, and ExportAction through t(). Adds 20 new keys across autoRefresh.*, common.button.*, common.search.*, and itemList.* namespaces to en.json and bg.json. References: #RI-8364
Routes remaining hardcoded English strings through t() in markdown code blocks, the redis upload button, the import file modal, and the consents settings/popup. Uses Trans component for the EULA agreement sentence with inline links. References: #RI-8364
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d2c07ad504
ℹ️ 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".
TypeScript infers the state type as never when useState is initialized with a lazy i18n t() call, causing a type error on the setter. References: #RI-8364
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 3 potential issues.
There are 4 total unresolved issues (including 1 from previous review).
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 27661f0. Configure here.
…8n-shared-constants-base-components
The Chunk 1 tscheck run on macOS recorded 10 extra platform-specific TS2769/TS2345 errors in unrelated browser/virtual-grid files. CI (Ubuntu) does not see these, so the baseline was 10 higher than it should be. Restore to the Linux-accurate count (1287). References: #RI-8364
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 08d4979113
ℹ️ 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".
Code Coverage - Frontend unit tests
Test suite run success8042 tests passing in 872 suites. Report generated by 🧪jest coverage report action from be273b4 |
tab.label is now a translated string; sending it to analytics would
split the same action across locales. Use tab.value ('databases' /
'rdi-instances') which is locale-independent.
References: #RI-8364

What changed
Many parts of the app were hardcoded in English and would not switch when a user changed the language. This PR wires those pieces up to the translation system so they follow the active language like everything else.
Covers buttons, tooltips, placeholders, headings, and status messages across the navigation bar, database header, auto-refresh control, file picker, import modal, Workbench code blocks, and the EULA/privacy settings screen.
Also deleted a file that existed in the codebase but was never used.
References: #RI-8364
Note
Low Risk
Presentation-layer i18n and string centralization with no auth, data, or API behavior changes beyond a minor telemetry payload tweak for tab identifiers.
Overview
Replaces hardcoded English UI copy with i18next (
useTranslation,Trans, andi18n.twhere hooks are unavailable) across shared components and app chrome: auto-refresh, file picker, navigation, instance headers, consents/EULA, import modals, Workbench code blocks, item-list actions, and related browser key-detail tooltips.Constants are refactored for localization:
validationErrorsbecomesgetValidationErrors(t)at call sites; form/import table headers and several browser-only message constants move to locale keys (e.g.browser.keyDetails.truncatedActionDisabled, stream “name too long” strings). AI chat error helpers and markdown Redis Cloud fallback text usei18n.t. Unusedbreadcrumbs.tsis removed.Home tabs labels come from
getTabs(t); tab-change telemetry now sends the stabletab.value(e.g.rdi-instances) instead of the translated label. Matching spec update included.en and bg locale files gain the new keys (
common.button.*,navigation.*,autoRefresh.*, etc.).Reviewed by Cursor Bugbot for commit be273b4. Bugbot is set up for automated code reviews on this repo. Configure here.