Skip to content

RI-8268 Translate all backend error codes (round 3)#6127

Open
valkirilov wants to merge 9 commits into
mainfrom
fe/RI-8268/translate-error-codes
Open

RI-8268 Translate all backend error codes (round 3)#6127
valkirilov wants to merge 9 commits into
mainfrom
fe/RI-8268/translate-error-codes

Conversation

@valkirilov

@valkirilov valkirilov commented Jun 29, 2026

Copy link
Copy Markdown
Member

What

Round 3 of frontend notification translation, stacked on the baseline (#6126). Fills in i18n coverage for all remaining backend error codes from #6125 — going from 15 to ~80 translated codes.

Data-only. Round 1 wired a fully dynamic lookup (getTranslatedApiError / getTranslatedApiTitle resolve notification.error.code.<n>.title / .message at runtime, with English fallback; removeUnusedKeys: false). So this PR adds keys to en.json + bg.json only — no .tsx changes — and coded errors now render a
localized title + body instead of the backend English.

Per-domain commits:

  • connection (10900–10908)
  • cloud API/OAuth/CAPI gaps (11007–11023)
  • cloud jobs (11100–11116)
  • database (11200)
  • AI (11300–11304 / 11351–11362)
  • RDI (11402–11411)
  • import (11700–11710)
  • encryption (11800–11807)
  • misc (11900–11901)
  • generic/validation titles (12100, 12400–12500)

Conventions kept from rounds 1–2:

  • Title from a concise localized heading; message from the backend text.
  • Codes whose backend message carries runtime detail get a .title only, so the backend message (with its specifics) still shows: 10905/10907 (connection), 11407/11408/11409 (RDI pipeline, like 11401), and the generic 12_xxx family.
  • en/bg key parity (301/301), i18n:extract canonical order (idempotent).

Testing

  • yarn type-check (additive keys, baseline clean), yarn test (error/notification specs green), yarn i18n:extract (no churn, parity holds).
  • Manual: with yarn dev:ui, dispatch a raw coded error from the console and confirm localized title+body, plus ?lang=bg:
    store.dispatch(addErrorNotification(getAxiosError({ response: { data: { errorCode: 11700 } } })))

Part of RI-8268

Related community requests: #605, #1317, #1883, #2040, #2137, #2181, #2213, #2417, #2550, #2590, #2695, #2715, #2716, #2727, #2828, #2912, #2943, #2945, #3081, #3141, #3142, #3319, #3411, #3601, #3625, #3628, #3663, #3671, #3812, #3815, #4150, #4182, #4408, #4664, #4672, #4744, #5052, #5967


Note

Low Risk
Mostly additive locale strings plus a cosmetic pre-line style on error notifications; no auth or business-logic changes.

Overview
Round 3 expands localized API error coverage from a small set to roughly 80 backend errorCode values by adding matching api.error.code.<n>.title / .message entries in en.json and bg.json. Existing runtime lookup (getTranslatedApiError / getTranslatedApiTitle) picks these up automatically, so coded errors show localized titles and bodies (including Bulgarian via ?lang=bg) instead of raw English from the API.

Domains covered in the new keys include Redis connection (10900–10908), Cloud OAuth/CAPI gaps, cloud jobs/subscriptions (11100–11116), database (11200), AI assistant/service limits (113xx), RDI (11402–11411), SSH/tunnel titles (116xx), import/SSH certs (11700–11710), encryption/keytar (11800–11807), remote config (119xx), and generic HTTP-style title-only codes (12100, 124xx, 12500). Several codes use title-only or {{detail}} / {{url}} interpolation so runtime-specific backend text still appears where intended.

A small notification UI tweak applies white-space: pre-line on default error text so messages with embedded newlines (e.g. ...\n{{detail}}) display on multiple lines.

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

@valkirilov valkirilov changed the title RI-8268 [i18n] Frontend: translate all backend error codes (round 3) RI-8268 Translate all backend error codes (round 3) Jun 29, 2026
@jit-ci

jit-ci Bot commented Jun 29, 2026

Copy link
Copy Markdown

🛡️ Jit Security Scan Results

CRITICAL HIGH MEDIUM

✅ No security findings were detected in this PR


Security scan by Jit

@valkirilov valkirilov marked this pull request as ready for review June 29, 2026 13:35
@valkirilov valkirilov requested a review from a team as a code owner June 29, 2026 13:35
@valkirilov valkirilov force-pushed the fe/RI-8268/translate-error-codes branch from ec81b1c to 618d0da Compare June 29, 2026 13:36

@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: ec81b1c2e9

ℹ️ 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/i18n/locales/en.json Outdated
Comment thread redisinsight/ui/src/i18n/locales/en.json Outdated
@github-actions

github-actions Bot commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Code Coverage - Integration Tests

Status Category Percentage Covered / Total
🟡 Statements 79.12% 18070/22838
🟡 Branches 61.88% 8375/13534
🟡 Functions 66.86% 2448/3661
🟡 Lines 78.73% 17008/21602

Comment thread redisinsight/ui/src/i18n/locales/bg.json Outdated

@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: 8ba130f4cf

ℹ️ 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/i18n/locales/en.json Outdated
@valkirilov valkirilov force-pushed the fe/RI-8268/translate-success-infinite branch from e63fa65 to b5ffaae Compare June 30, 2026 09:56
@valkirilov valkirilov force-pushed the fe/RI-8268/translate-error-codes branch from 8ba130f to 7811f9f Compare June 30, 2026 10:31

@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 7811f9f. Configure here.

Comment thread redisinsight/ui/src/i18n/locales/en.json Outdated

@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: 7811f9f892

ℹ️ 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/i18n/locales/en.json Outdated
Comment thread redisinsight/ui/src/i18n/locales/en.json Outdated
@valkirilov valkirilov force-pushed the fe/RI-8268/translate-error-codes branch from 7811f9f to 260a0b1 Compare June 30, 2026 10:55

@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: 260a0b11d0

ℹ️ 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/i18n/locales/en.json Outdated
Comment thread redisinsight/ui/src/i18n/locales/en.json Outdated
Comment thread redisinsight/ui/src/i18n/locales/bg.json

@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: 904c12ac2e

ℹ️ 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/i18n/locales/en.json
@valkirilov valkirilov self-assigned this Jul 1, 2026
@valkirilov valkirilov force-pushed the fe/RI-8268/translate-success-infinite branch from 403254f to 12f1111 Compare July 2, 2026 09:55
@valkirilov valkirilov force-pushed the fe/RI-8268/translate-error-codes branch from 7dc70db to 5c6f079 Compare July 2, 2026 09:58

@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: 5c6f079a24

ℹ️ 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/i18n/locales/en.json
Comment thread redisinsight/ui/src/i18n/locales/en.json
@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Code Coverage - Frontend unit tests

St.
Category Percentage Covered / Total
🟢 Statements 83.51% 26386/31597
🟡 Branches 69.12% 11204/16210
🟡 Functions 78.8% 7073/8976
🟢 Lines 83.97% 25720/30629

Test suite run success

7474 tests passing in 840 suites.

Report generated by 🧪jest coverage report action from 5c6f079

@valkirilov valkirilov force-pushed the fe/RI-8268/translate-success-infinite branch from 12f1111 to 1a6659f Compare July 2, 2026 11:43
@valkirilov valkirilov force-pushed the fe/RI-8268/translate-error-codes branch from 5c6f079 to 8dc98e3 Compare July 2, 2026 11:43
valkirilov and others added 4 commits July 2, 2026 15:00
Migrate success-messages.tsx factories to i18n (notification.success.* keys),
using the i18n singleton + <Trans> for bold names, the Release Notes link, and
{{total}} counts. MESSAGE_ACTION now resolves its action word (claimed/
acknowledged) through i18n so the whole toast localizes.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Migrate INFINITE_MESSAGES to i18n (notification.infinite.* keys) via the i18n
singleton + <Trans> for the bold Notice and inline Redis Cloud link, with a
button.* segment for the action labels (Manage DB, Connect, Import, OK, Create,
Restart). Keys re-sorted to i18next-cli's canonical order via i18n:extract.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The value type (Member/Field/Group/Entry/Element/Consumer/JSON key) was an
English literal interpolated into the title, producing mixed-language Bulgarian
toasts. Add a per-type title key for each so it reads correctly and agrees in
gender in Bulgarian.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
<Trans> parses interpolated values as markup (escapeValue is off), so a Redis
key/name containing e.g. "<br/>" was rendered as a tag instead of literal text.
Escape the user-provided values before interpolating them.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@valkirilov valkirilov force-pushed the fe/RI-8268/translate-success-infinite branch from 1a6659f to 042c0a2 Compare July 2, 2026 12:03
valkirilov and others added 2 commits July 2, 2026 15:08
Add api.error.code.<n>.{title,message,...} for the remaining backend error codes
(connection, cloud jobs, AI, RDI, import, encryption, misc, generic). Rebuilt on
the api.error.code.* namespace; the per-code error text now lives under api.* while
FE toast chrome stays under notification.*. en/bg parity, 301 keys.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
These codes wrap runtime detail into the backend message (cloud-job failure
reason, RDI detail, import filename), so drop their static .message and keep
only .title — the localized lookup now falls through to the backend message
instead of overriding it with generic copy.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
valkirilov and others added 2 commits July 2, 2026 15:08
Title-only entries so the heading localizes while the backend message (which
carries the sanitized runtime detail) still shows. Closes the SSH range gap.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
RedisConnectionFailedException (10900) and CloudOauthMissedRequiredDataException
(11009) carry runtime detail in their message (driver/OS reason, missing-field
list), so drop their static .message and keep only .title.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@valkirilov valkirilov force-pushed the fe/RI-8268/translate-error-codes branch from 8dc98e3 to b0a0d6b Compare July 2, 2026 12:10
* feat(ui): localize interpolated backend error messages (RI-8268)
* fix(ui): render newlines in the default error toast body (RI-8268)

Refs: RI-8268
Base automatically changed from fe/RI-8268/translate-success-infinite to main July 2, 2026 13:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant