Skip to content

RI-8275 i18n: migrate Workbench#6189

Open
valkirilov wants to merge 5 commits into
mainfrom
fe/feature/RI-8275/i18n-workbench
Open

RI-8275 i18n: migrate Workbench#6189
valkirilov wants to merge 5 commits into
mainfrom
fe/feature/RI-8275/i18n-workbench

Conversation

@valkirilov

@valkirilov valkirilov commented Jul 10, 2026

Copy link
Copy Markdown
Member

What

Route the Workbench page user-facing strings through i18next (t() / <Trans>), with Bulgarian translations, under the workbench.* namespace.

Note: Includes a small docs(i18n) update to the i18n skill documenting the count-based plural convention.

Testing

  • yarn type-check (no new errors), yarn i18n:check (en/bg parity), yarn lint:ui.
  • Workbench + components/query jest suites pass.
  • Manually: open Workbench, append ?lang=bg to preview Bulgarian; empty bg values fall back to English.

Note

Low Risk
Presentation-layer i18n only; behavior of command execution and confirmations is unchanged aside from localized/pluralized copy.

Overview
Routes Workbench and shared query UI copy through i18next (t(), <Trans>, i18n.t), with matching en.json / bg.json entries under workbench.*, query.*, and common.fullScreen.*.

Workbench covers the page title, empty-results panel, tutorial link labels (via titleKey in constants), results “clear” actions, Monaco “no indexes” suggestions, and view-type/profile labels from non-React helpers. Shared query components pick up run/clear actions, tooltips, card chrome, CLI warnings, and keyboard shortcut labels (including Mac vs non-Mac).

Plurals move to i18next count + _one/_other keys—for example query card summaries and the dangerous-command confirmation in WBViewWrapper (replacing a manual isPlural JSX branch with <Trans count={…}>). The i18n skill doc gains a short Plurals section describing that convention.

Tests: QueryCard.spec expectation updated for the new summary wording.

Reviewed by Cursor Bugbot for commit 00d705e. Bugbot is set up for automated code reviews on this repo. Configure here.

valkirilov and others added 3 commits July 10, 2026 09:31
Route the Workbench page user-facing strings through i18n under the
workbench.* namespace, with Bulgarian translations:

- no-results message and Clear Results button
- dangerous-command run confirmation (<Trans> with count-based plurals
  and escaped db-name interpolation)
- tutorial titles, view-type labels, Monaco no-index suggestions
- document title suffix

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add a Plurals section to the i18n skill: use i18next count-based
_one/_other keys (base key type-checks), write the full sentence per
form, and delete orphan keys that i18n:extract leaves behind.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Complete the Workbench page translation by routing its shared components
through i18n with Bulgarian translations:

- components/query/** (editor actions, tutorials, run button, result card
  header/CLI wrapper, summary plurals) under a new query.* namespace
- shared FullScreen control under common.fullScreen.*
- resolve tutorial titles and view-type labels at render time via t()
  instead of module-level i18n.t() (which captured the language at import)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@valkirilov valkirilov self-assigned this Jul 10, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d52dbf5547

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

Comment thread redisinsight/ui/src/pages/workbench/components/wb-view/WBViewWrapper.tsx Outdated
…I-8275)

The dangerous-command confirmation renders interpolated values through
<Trans> with escapeValue off. `db` was escaped but `commands` (user-typed
command text) was not, so markup-like input (e.g. angle brackets) could
break out of the <bold> span. Escape `commands` via escapeTrans too, matching
the previous literal-text rendering behavior.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Code Coverage - Frontend unit tests

St.
Category Percentage Covered / Total
🟢 Statements 83.79% 27044/32275
🟡 Branches 69.54% 11509/16549
🟡 Functions 79.18% 7252/9159
🟢 Lines 84.27% 26343/31261

Test suite run success

7714 tests passing in 856 suites.

Report generated by 🧪jest coverage report action from 00d705e

Comment thread redisinsight/ui/src/components/query/query-actions/QueryActions.tsx Outdated
The run-query shortcut tooltip label was hardcoded to "Run commands", but the
original KEYBOARD_SHORTCUTS label is "Run" on Windows/Linux and "Run commands"
on macOS. Restore the platform distinction via isMacOs() with a separate
query.runShortcut.labelNonMac key so non-Mac users see the original label.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ 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 00d705e. Configure here.

Comment thread redisinsight/ui/src/components/query/query-card/QueryCard.tsx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant