Skip to content

CONSOLE-5428: migrate to i18next-cli#16796

Merged
openshift-merge-bot[bot] merged 6 commits into
openshift:mainfrom
logonoff:CONSOLE-5428-i18n
Jul 22, 2026
Merged

CONSOLE-5428: migrate to i18next-cli#16796
openshift-merge-bot[bot] merged 6 commits into
openshift:mainfrom
logonoff:CONSOLE-5428-i18n

Conversation

@logonoff

@logonoff logonoff commented Jul 21, 2026

Copy link
Copy Markdown
Member

Analysis / Root cause:

From yarn npm audit, i18next-http-backend has a CVE and i18next-parser is deprecated.

 % yarn npm audit
├─ i18next-http-backend
│  ├─ ID: 1117949
│  ├─ Issue:  i18next-http-backend has Path Traversal & URL Injection via Unsanitised lng/ns
│  ├─ URL: https://github.com/advisories/GHSA-q89c-q3h5-w34g
│  ├─ Severity: moderate
│  ├─ Vulnerable Versions: <3.0.5
│  │ 
│  ├─ Tree Versions
│  │  └─ 1.0.21
│  │ 
│  └─ Dependents
│     └─ openshift-console@workspace:.
│
├─ i18next-parser
│  ├─ ID: i18next-parser (deprecation)
│  ├─ Issue: Project is deprecated, use i18next-cli instead
│  ├─ Severity: moderate
│  ├─ Vulnerable Versions: 9.4.0
│  │ 
│  ├─ Tree Versions
│  │  └─ 9.4.0
│  │ 
│  └─ Dependents
│     └─ openshift-console@workspace:.

Solution description:

  • replace i18next-parser with i18next-cli
  • bump i18next-http-backend

Additional info:

yarn i18n is now ~2 times faster:

before:

frontend % time yarn i18n
[log omitted]
yarn i18n  12.92s user 2.46s system 145% cpu 10.594 total

after:

frontend % time yarn i18n
✔ Extraction complete!
yarn i18n  4.18s user 0.81s system 102% cpu 4.874 total

Summary by CodeRabbit

  • New Features
    • Added i18n namespace↔directory mapping helpers and enhanced i18next-cli extraction (including support for console-extension keys).
  • Bug Fixes
    • Standardized i18n usage across the UI with consistent namespaces, {{ }} interpolations, improved pluralization prompts, and updated rich-text emphasis markup.
    • Added missing English locale entry: “Add Rule”.
  • Refactor
    • Migrated the i18n build flow to i18next-cli and upgraded i18next-http-backend.
  • Tests
    • Updated i18n structure validation; removed obsolete lexer-related tests.
  • Chores
    • Removed legacy i18n parser and generation/consolidation scripts.

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Pipeline controller notification
This repo is configured to use the pipeline controller. Second-stage tests will be triggered either automatically or after lgtm label is added, depending on the repository configuration. The pipeline controller will automatically detect which contexts are required and will utilize /test Prow commands to trigger the second stage.

For optional jobs, comment /test ? to see a list of all defined jobs. To trigger manually all jobs from second stage use /pipeline required command.

This repository is configured in: LGTM mode

@openshift-ci-robot

openshift-ci-robot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

@logonoff: This pull request references CONSOLE-5428 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "5.0.0" version, but no target version was set.

Details

In response to this:

Analysis / Root cause:

From yarn npm audit, i18next-http-backend has a CVE and i18next-parser is deprecated.

% yarn npm audit
├─ i18next-http-backend
│ ├─ ID: 1117949
│ ├─ Issue: i18next-http-backend has Path Traversal & URL Injection via Unsanitised lng/ns
│ ├─ URL: GHSA-q89c-q3h5-w34g
│ ├─ Severity: moderate
│ ├─ Vulnerable Versions: <3.0.5
│ │
│ ├─ Tree Versions
│ │ └─ 1.0.21
│ │
│ └─ Dependents
│ └─ openshift-console@workspace:.

├─ i18next-parser
│ ├─ ID: i18next-parser (deprecation)
│ ├─ Issue: Project is deprecated, use i18next-cli instead
│ ├─ Severity: moderate
│ ├─ Vulnerable Versions: 9.4.0
│ │
│ ├─ Tree Versions
│ │ └─ 9.4.0
│ │
│ └─ Dependents
│ └─ openshift-console@workspace:.


**Solution description**:
<!-- Describe your code changes in detail and explain the solution or functionality -->

- replace i18next-parser with i18next-cli
- bump i18next-http-backend

**Additional info:**
<!-- Add any additional info here -->

`yarn i18n` is now ~2 times faster:

before:

frontend % time yarn i18n
[log omitted]
yarn i18n 12.92s user 2.46s system 145% cpu 10.594 total


after:
```sh
frontend % time yarn i18n
✔ Extraction complete!
yarn i18n  4.18s user 0.81s system 102% cpu 4.874 total

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jul 21, 2026
@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Walkthrough

The frontend i18n workflow now uses i18next-cli with shared namespace mapping and custom console-extension extraction. Translation lookups, interpolation, pluralization, rich-text markup, accessibility labels, and locale catalogs are updated across frontend packages and public UI components.

Changes

Frontend i18n migration

Layer / File(s) Summary
i18next-cli extraction and namespace routing
frontend/i18next.config.ts, frontend/i18n-scripts/*, frontend/package.json, frontend/__tests__/i18n-structure.spec.ts
Adds namespace conversion and console-extension extraction, switches the i18n command and tooling, and removes the previous extraction helpers and configuration.
Namespaced component translations
frontend/packages/*/src/**, frontend/public/components/**
Updates package and public UI translation lookups, accessibility labels, fallback text, and Trans interpolation usage.
Locale catalog normalization
frontend/packages/*/locales/en/*, frontend/public/locales/en/public.json
Updates plural forms, interpolation syntax, emphasis markup, typed placeholders, translation entries, and catalog ordering.

Estimated code review effort: 4 (Complex) | ~45 minutes

Possibly related PRs

Suggested reviewers: baijum, cajieh

🚥 Pre-merge checks | ✅ 14 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description covers root cause, solution, and extra info, but omits several required template sections like screenshots, test setup, test cases, browser conformance, and reviewers. Add the missing template sections, especially test setup, test cases, browser conformance, screenshots if applicable, and reviewers/assignees.
✅ Passed checks (14 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Stable And Deterministic Test Names ✅ Passed The touched spec file uses only static literal titles (describe/it strings) and no generated values or interpolation.
Test Structure And Quality ✅ Passed The changed spec is a static describe/it check with no cluster ops or Ginkgo patterns, so cleanup/timeouts don’t apply and it matches repo test structure.
Microshift Test Compatibility ✅ Passed No Ginkgo e2e tests were added; the diff only touches frontend/i18n files and contains no MicroShift-sensitive APIs, namespaces, or unsupported assumptions.
Single Node Openshift (Sno) Test Compatibility ✅ Passed No new Ginkgo e2e tests were added; the patch only touches i18n/runtime files and contains no e2e test files or SNO-sensitive test markers.
Topology-Aware Scheduling Compatibility ✅ Passed PASS: Diff is limited to i18n scripts/locales and UI text; no deployment manifests, controllers, affinity/tolerations, nodeSelectors, or PDB scheduling logic changed.
Ote Binary Stdout Contract ✅ Passed No process-level stdout writes found; changed config/scripts only use console.error/console.warn (stderr), and no OTE binary/TestMain/Ginkgo setup code was touched.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed No new Ginkgo e2e tests were added; the only changed spec is Jest-style, and changed files show no IPv4/networking assumptions or external connectivity.
No-Weak-Crypto ✅ Passed Touched files are i18n/config/UI changes only; scan found no md5/sha1/des/rc4/3des/blowfish, custom crypto, or secret/token comparisons.
Container-Privileges ✅ Passed Diff is frontend/i18n-only; no K8s/container manifests or privilege fields (privileged, hostNetwork, allowPrivilegeEscalation, etc.) appear in changed files.
No-Sensitive-Data-In-Logs ✅ Passed PASS: The PR’s logging only emits file paths, namespace keys, operator names, and generic errors; no passwords, tokens, PII, session IDs, or customer data are logged.
Title check ✅ Passed The title is concise, Jira-prefixed, and accurately summarizes the main change to migrate to i18next-cli.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@logonoff

Copy link
Copy Markdown
Member Author

/label px-approved
/label docs-approved

@openshift-ci
openshift-ci Bot requested review from baijum and cajieh July 21, 2026 19:28
@openshift-ci openshift-ci Bot added px-approved Signifies that Product Support has signed off on this PR docs-approved Signifies that Docs has signed off on this PR component/core Related to console core functionality component/dev-console Related to dev-console approved Indicates a PR has been approved by an approver from all required OWNERS files. component/helm Related to helm-plugin component/knative Related to knative-plugin component/metal3 Related to metal3-plugin component/olm Related to OLM component/topology Related to topology kind/i18n Indicates issue or PR relates to internationalization or has content that needs to be translated labels Jul 21, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@frontend/i18next.config.ts`:
- Around line 37-39: Update the catch block in the extension manifest extraction
flow to re-throw the parsing error after logging it, instead of continuing past
the malformed file. Keep the existing contextual console.error message and
ensure invalid console-extensions.json manifests fail the i18n build.

In `@frontend/package.json`:
- Line 176: Update the dependency declarations for i18next-http-backend and
i18next-cli in package.json to use exact versions without caret or other range
operators, keeping i18next-http-backend at a version at or above 3.0.5.

In `@frontend/packages/console-app/locales/en/console-app.json`:
- Line 750: Update the count-based locale entries near the identified item keys
to use explicit plural variants, adding `_one` and `_other` forms while
retaining the existing count interpolation. Ensure values greater than one
resolve to the plural wording instead of the singular string.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: cbb4ca3e-7995-436a-9d68-40b37e3550e8

📥 Commits

Reviewing files that changed from the base of the PR and between 6d0dcf1 and 7eebd8d.

⛔ Files ignored due to path filters (1)
  • frontend/yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (47)
  • frontend/__tests__/i18n-structure.spec.ts
  • frontend/i18n-scripts/build-i18n.sh
  • frontend/i18n-scripts/common.js
  • frontend/i18n-scripts/consolidate-public-folders.js
  • frontend/i18n-scripts/lexers.js
  • frontend/i18n-scripts/namespace-map.ts
  • frontend/i18n-scripts/set-english-defaults.js
  • frontend/i18next-parser.config.js
  • frontend/i18next.config.ts
  • frontend/package.json
  • frontend/packages/console-app/locales/en/console-app.json
  • frontend/packages/console-app/src/components/nodes/configuration/high-availability/RemediationAgent.tsx
  • frontend/packages/console-app/src/components/pdb/PDBFormPage.tsx
  • frontend/packages/dev-console/locales/en/devconsole.json
  • frontend/packages/dev-console/src/components/buildconfig/BuildConfigFormEditor.tsx
  • frontend/packages/dev-console/src/components/catalog/providers/useBuilderImageSamples.ts
  • frontend/packages/dev-console/src/components/catalog/providers/useBuilderImages.tsx
  • frontend/packages/dev-console/src/components/catalog/providers/useDevfile.tsx
  • frontend/packages/dev-console/src/components/catalog/providers/useDevfileSamples.tsx
  • frontend/packages/dev-console/src/components/catalog/providers/useTemplates.tsx
  • frontend/packages/dev-console/src/components/deployments/AdvancedSection.tsx
  • frontend/packages/dev-console/src/components/health-checks/RequestTypeForms.tsx
  • frontend/packages/dev-console/src/components/import/ImportPage.tsx
  • frontend/packages/dev-console/src/components/import/advanced/AdvancedSection.tsx
  • frontend/packages/dev-console/src/components/pipeline-section/pipeline/GithubSection.tsx
  • frontend/packages/helm-plugin/locales/en/helm-plugin.json
  • frontend/packages/knative-plugin/src/catalog/useEventSourceProvider.ts
  • frontend/packages/knative-plugin/src/catalog/useEventTypeProvider.tsx
  • frontend/packages/knative-plugin/src/catalog/useKafkaSinkProvider.ts
  • frontend/packages/knative-plugin/src/catalog/useKameletsProvider.ts
  • frontend/packages/knative-plugin/src/catalog/useKameletsSinkProvider.ts
  • frontend/packages/knative-plugin/src/components/eventing/EventType.tsx
  • frontend/packages/metal3-plugin/locales/en/metal3-plugin.json
  • frontend/packages/metal3-plugin/src/components/baremetal-hosts/BareMetalHostDisks.tsx
  • frontend/packages/metal3-plugin/src/components/baremetal-hosts/BareMetalHostNICs.tsx
  • frontend/packages/metal3-plugin/src/components/baremetal-hosts/BareMetalHostStatus.tsx
  • frontend/packages/metal3-plugin/src/components/baremetal-hosts/BareMetalHostsPage.tsx
  • frontend/packages/metal3-plugin/src/components/baremetal-hosts/BareMetalHostsTable.tsx
  • frontend/packages/metal3-plugin/src/components/modals/StopNodeMaintenanceModal.tsx
  • frontend/packages/operator-lifecycle-manager/locales/en/olm.json
  • frontend/packages/shipwright-plugin/src/components/build-list/BuildTable.tsx
  • frontend/packages/shipwright-plugin/src/components/buildrun-list/BuildRunTable.tsx
  • frontend/packages/topology/locales/en/topology.json
  • frontend/packages/vsphere-plugin/src/components/VSphereOperatorStatuses.tsx
  • frontend/packages/webterminal-plugin/src/components/cloud-shell/setup/CloudShellAdvancedOption.tsx
  • frontend/public/components/error.tsx
  • frontend/public/locales/en/public.json
💤 Files with no reviewable changes (6)
  • frontend/i18n-scripts/set-english-defaults.js
  • frontend/i18n-scripts/consolidate-public-folders.js
  • frontend/i18next-parser.config.js
  • frontend/i18n-scripts/lexers.js
  • frontend/i18n-scripts/build-i18n.sh
  • frontend/i18n-scripts/common.js

Comment thread frontend/i18next.config.ts Outdated
Comment thread frontend/package.json
Comment thread frontend/packages/console-app/locales/en/console-app.json Outdated
@logonoff
logonoff force-pushed the CONSOLE-5428-i18n branch 3 times, most recently from 2908854 to ca254a8 Compare July 21, 2026 19:56

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
frontend/packages/console-app/src/components/quick-starts/utils/quick-start-context.tsx (1)

183-201: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Update the stale parser reference in this extraction block.

The surrounding comment still directs maintainers to i18next-parser, while this PR migrates extraction to i18next-cli. Update the caveat and instructions so future changes do not follow obsolete tooling guidance.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@frontend/packages/console-app/src/components/quick-starts/utils/quick-start-context.tsx`
around lines 183 - 201, Update the extraction-block comment in
quick-start-context.tsx to replace the stale i18next-parser guidance with the
current i18next-cli tooling and instructions, while leaving the translation key
list unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In
`@frontend/packages/console-app/src/components/quick-starts/utils/quick-start-context.tsx`:
- Around line 183-201: Update the extraction-block comment in
quick-start-context.tsx to replace the stale i18next-parser guidance with the
current i18next-cli tooling and instructions, while leaving the translation key
list unchanged.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 51658654-95c2-4a84-b83b-2fb9321eae30

📥 Commits

Reviewing files that changed from the base of the PR and between 932c7a3 and 2908854.

⛔ Files ignored due to path filters (1)
  • frontend/yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (49)
  • frontend/__tests__/i18n-structure.spec.ts
  • frontend/i18n-scripts/__tests__/lexers.spec.ts
  • frontend/i18n-scripts/build-i18n.sh
  • frontend/i18n-scripts/common.js
  • frontend/i18n-scripts/consolidate-public-folders.js
  • frontend/i18n-scripts/lexers.js
  • frontend/i18n-scripts/namespace-map.ts
  • frontend/i18n-scripts/set-english-defaults.js
  • frontend/i18next-parser.config.js
  • frontend/i18next.config.ts
  • frontend/package.json
  • frontend/packages/console-app/locales/en/console-app.json
  • frontend/packages/console-app/src/components/nodes/configuration/high-availability/RemediationAgent.tsx
  • frontend/packages/console-app/src/components/pdb/PDBFormPage.tsx
  • frontend/packages/console-app/src/components/quick-starts/utils/quick-start-context.tsx
  • frontend/packages/dev-console/locales/en/devconsole.json
  • frontend/packages/dev-console/src/components/buildconfig/BuildConfigFormEditor.tsx
  • frontend/packages/dev-console/src/components/catalog/providers/useBuilderImageSamples.ts
  • frontend/packages/dev-console/src/components/catalog/providers/useBuilderImages.tsx
  • frontend/packages/dev-console/src/components/catalog/providers/useDevfile.tsx
  • frontend/packages/dev-console/src/components/catalog/providers/useDevfileSamples.tsx
  • frontend/packages/dev-console/src/components/catalog/providers/useTemplates.tsx
  • frontend/packages/dev-console/src/components/deployments/AdvancedSection.tsx
  • frontend/packages/dev-console/src/components/health-checks/RequestTypeForms.tsx
  • frontend/packages/dev-console/src/components/import/ImportPage.tsx
  • frontend/packages/dev-console/src/components/import/advanced/AdvancedSection.tsx
  • frontend/packages/dev-console/src/components/pipeline-section/pipeline/GithubSection.tsx
  • frontend/packages/helm-plugin/locales/en/helm-plugin.json
  • frontend/packages/knative-plugin/src/catalog/useEventSourceProvider.ts
  • frontend/packages/knative-plugin/src/catalog/useEventTypeProvider.tsx
  • frontend/packages/knative-plugin/src/catalog/useKafkaSinkProvider.ts
  • frontend/packages/knative-plugin/src/catalog/useKameletsProvider.ts
  • frontend/packages/knative-plugin/src/catalog/useKameletsSinkProvider.ts
  • frontend/packages/knative-plugin/src/components/eventing/EventType.tsx
  • frontend/packages/metal3-plugin/locales/en/metal3-plugin.json
  • frontend/packages/metal3-plugin/src/components/baremetal-hosts/BareMetalHostDisks.tsx
  • frontend/packages/metal3-plugin/src/components/baremetal-hosts/BareMetalHostNICs.tsx
  • frontend/packages/metal3-plugin/src/components/baremetal-hosts/BareMetalHostStatus.tsx
  • frontend/packages/metal3-plugin/src/components/baremetal-hosts/BareMetalHostsPage.tsx
  • frontend/packages/metal3-plugin/src/components/baremetal-hosts/BareMetalHostsTable.tsx
  • frontend/packages/metal3-plugin/src/components/modals/StopNodeMaintenanceModal.tsx
  • frontend/packages/operator-lifecycle-manager/locales/en/olm.json
  • frontend/packages/shipwright-plugin/src/components/build-list/BuildTable.tsx
  • frontend/packages/shipwright-plugin/src/components/buildrun-list/BuildRunTable.tsx
  • frontend/packages/topology/locales/en/topology.json
  • frontend/packages/vsphere-plugin/src/components/VSphereOperatorStatuses.tsx
  • frontend/packages/webterminal-plugin/src/components/cloud-shell/setup/CloudShellAdvancedOption.tsx
  • frontend/public/components/error.tsx
  • frontend/public/locales/en/public.json
💤 Files with no reviewable changes (7)
  • frontend/i18n-scripts/tests/lexers.spec.ts
  • frontend/i18n-scripts/build-i18n.sh
  • frontend/i18n-scripts/lexers.js
  • frontend/i18n-scripts/set-english-defaults.js
  • frontend/i18n-scripts/consolidate-public-folders.js
  • frontend/i18n-scripts/common.js
  • frontend/i18next-parser.config.js
🚧 Files skipped from review as they are similar to previous changes (33)
  • frontend/packages/knative-plugin/src/catalog/useEventTypeProvider.tsx
  • frontend/packages/dev-console/src/components/catalog/providers/useBuilderImageSamples.ts
  • frontend/packages/dev-console/src/components/catalog/providers/useBuilderImages.tsx
  • frontend/packages/dev-console/src/components/catalog/providers/useDevfileSamples.tsx
  • frontend/packages/metal3-plugin/src/components/baremetal-hosts/BareMetalHostDisks.tsx
  • frontend/packages/metal3-plugin/src/components/modals/StopNodeMaintenanceModal.tsx
  • frontend/packages/dev-console/src/components/pipeline-section/pipeline/GithubSection.tsx
  • frontend/packages/dev-console/src/components/deployments/AdvancedSection.tsx
  • frontend/packages/knative-plugin/src/catalog/useKameletsProvider.ts
  • frontend/packages/metal3-plugin/src/components/baremetal-hosts/BareMetalHostsTable.tsx
  • frontend/i18n-scripts/namespace-map.ts
  • frontend/packages/metal3-plugin/src/components/baremetal-hosts/BareMetalHostsPage.tsx
  • frontend/packages/metal3-plugin/src/components/baremetal-hosts/BareMetalHostStatus.tsx
  • frontend/packages/dev-console/src/components/import/ImportPage.tsx
  • frontend/packages/dev-console/src/components/catalog/providers/useTemplates.tsx
  • frontend/packages/webterminal-plugin/src/components/cloud-shell/setup/CloudShellAdvancedOption.tsx
  • frontend/packages/helm-plugin/locales/en/helm-plugin.json
  • frontend/public/components/error.tsx
  • frontend/tests/i18n-structure.spec.ts
  • frontend/packages/dev-console/src/components/import/advanced/AdvancedSection.tsx
  • frontend/packages/knative-plugin/src/components/eventing/EventType.tsx
  • frontend/packages/metal3-plugin/src/components/baremetal-hosts/BareMetalHostNICs.tsx
  • frontend/package.json
  • frontend/packages/dev-console/src/components/catalog/providers/useDevfile.tsx
  • frontend/packages/console-app/src/components/pdb/PDBFormPage.tsx
  • frontend/packages/console-app/src/components/nodes/configuration/high-availability/RemediationAgent.tsx
  • frontend/packages/dev-console/src/components/health-checks/RequestTypeForms.tsx
  • frontend/packages/operator-lifecycle-manager/locales/en/olm.json
  • frontend/packages/shipwright-plugin/src/components/build-list/BuildTable.tsx
  • frontend/packages/knative-plugin/src/catalog/useEventSourceProvider.ts
  • frontend/packages/vsphere-plugin/src/components/VSphereOperatorStatuses.tsx
  • frontend/packages/metal3-plugin/locales/en/metal3-plugin.json
  • frontend/packages/shipwright-plugin/src/components/buildrun-list/BuildRunTable.tsx

@logonoff
logonoff force-pushed the CONSOLE-5428-i18n branch 4 times, most recently from 391b14b to 0293ad6 Compare July 21, 2026 20:12
The new i18next-cli config correctly assume the ns is "public" when the `t` function from `useTranslation` is not directly used by a caller.

Explicitly add namespaces to functions which use the t function but indirectly through a param.

the extractor also doesn't like `{ count: 0 }` in code comments, but for some reason it will catch `{ count: 2}`.
@logonoff
logonoff force-pushed the CONSOLE-5428-i18n branch 2 times, most recently from ed819b0 to 1ac76ef Compare July 21, 2026 23:50
@openshift-ci openshift-ci Bot added the component/shared Related to console-shared label Jul 22, 2026
@logonoff
logonoff force-pushed the CONSOLE-5428-i18n branch from 4a953d5 to 0f26660 Compare July 22, 2026 01:30
logonoff added 3 commits July 21, 2026 21:35
Note that i18next is sort of nasty with their dependency semver ranges so 1.50.3 is the last compatible version with react-i18next 16.5.8
i18next-cli prints out some extraction errors which this commit fixes
@logonoff
logonoff force-pushed the CONSOLE-5428-i18n branch from 0f26660 to 8c7532f Compare July 22, 2026 01:35
Older version of i18next-cli has a bug if `sort: false` is set, the sort order is non-deterministic and different every time.

To counteract this, i18n keys need to be sorted.

No changes were made to the key/value pairs in this commit, only the sorting order.
@logonoff
logonoff force-pushed the CONSOLE-5428-i18n branch from 568cd62 to c4a1cee Compare July 22, 2026 01:58
@logonoff

Copy link
Copy Markdown
Member Author

@coderabbitai resume

@coderabbitai

coderabbitai Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Reviews resumed.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@frontend/packages/console-app/locales/en/console-app.json`:
- Around line 827-828: Correct the _other translation for “You selected all
{{count}} {{label}}” so the plural suffix appears before the period, producing
“Pod.s” no longer and preserving the existing _one wording.

In `@frontend/packages/console-shared/locales/en/console-shared.json`:
- Around line 11-12: Update the plural translation value for "{{count}} resource
reached quota_other" so the counted noun is pluralized, producing "{{count}}
resources reached quota"; leave the singular "{{count}} resource reached
quota_one" translation unchanged.

In `@frontend/packages/topology/locales/en/topology.json`:
- Around line 10-11: Update the singular and plural CPU translation values in
the topology locale so a space is preserved between the <0> value tag and <1>
unit tag, matching the spacing produced by CpuCell. Keep the existing
pluralization and tag structure unchanged.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: d92ff214-2cf8-4b36-8ddf-473b7bfcb627

📥 Commits

Reviewing files that changed from the base of the PR and between 391b14b and c4a1cee.

⛔ Files ignored due to path filters (1)
  • frontend/yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (77)
  • frontend/__tests__/i18n-structure.spec.ts
  • frontend/i18n-scripts/__tests__/lexers.spec.ts
  • frontend/i18n-scripts/build-i18n.sh
  • frontend/i18n-scripts/common.js
  • frontend/i18n-scripts/consolidate-public-folders.js
  • frontend/i18n-scripts/lexers.js
  • frontend/i18n-scripts/namespace-map.ts
  • frontend/i18n-scripts/set-english-defaults.js
  • frontend/i18next-parser.config.js
  • frontend/i18next.config.ts
  • frontend/package.json
  • frontend/packages/console-app/locales/en/console-app.json
  • frontend/packages/console-app/src/components/nodes/configuration/high-availability/RemediationAgent.tsx
  • frontend/packages/console-app/src/components/pdb/PDBFormPage.tsx
  • frontend/packages/console-app/src/components/quick-starts/utils/quick-start-context.tsx
  • frontend/packages/console-app/src/components/volume-snapshot/volume-snapshot-class.tsx
  • frontend/packages/console-shared/locales/en/console-shared.json
  • frontend/packages/console-telemetry-plugin/locales/en/console-telemetry-plugin.json
  • frontend/packages/container-security/locales/en/container-security.json
  • frontend/packages/dev-console/locales/en/devconsole.json
  • frontend/packages/dev-console/src/components/NamespacedPage.tsx
  • frontend/packages/dev-console/src/components/buildconfig/BuildConfigFormEditor.tsx
  • frontend/packages/dev-console/src/components/catalog/providers/useBuilderImageSamples.ts
  • frontend/packages/dev-console/src/components/catalog/providers/useBuilderImages.tsx
  • frontend/packages/dev-console/src/components/catalog/providers/useDevfile.tsx
  • frontend/packages/dev-console/src/components/catalog/providers/useDevfileSamples.tsx
  • frontend/packages/dev-console/src/components/catalog/providers/useTemplates.tsx
  • frontend/packages/dev-console/src/components/deployments/AdvancedSection.tsx
  • frontend/packages/dev-console/src/components/health-checks/RequestTypeForms.tsx
  • frontend/packages/dev-console/src/components/import/ImportPage.tsx
  • frontend/packages/dev-console/src/components/import/advanced/AdvancedSection.tsx
  • frontend/packages/dev-console/src/components/pipeline-section/pipeline/GithubSection.tsx
  • frontend/packages/git-service/locales/en/git-service.json
  • frontend/packages/helm-plugin/locales/en/helm-plugin.json
  • frontend/packages/helm-plugin/src/topology/sidebar/release-panel/tab-sections.tsx
  • frontend/packages/insights-plugin/locales/en/insights-plugin.json
  • frontend/packages/knative-plugin/locales/en/knative-plugin.json
  • frontend/packages/knative-plugin/src/catalog/useEventSourceProvider.ts
  • frontend/packages/knative-plugin/src/catalog/useEventTypeProvider.tsx
  • frontend/packages/knative-plugin/src/catalog/useKafkaSinkProvider.ts
  • frontend/packages/knative-plugin/src/catalog/useKameletsProvider.ts
  • frontend/packages/knative-plugin/src/catalog/useKameletsSinkProvider.ts
  • frontend/packages/knative-plugin/src/components/eventing/EventType.tsx
  • frontend/packages/metal3-plugin/locales/en/metal3-plugin.json
  • frontend/packages/metal3-plugin/src/components/baremetal-hosts/BareMetalHostDisks.tsx
  • frontend/packages/metal3-plugin/src/components/baremetal-hosts/BareMetalHostNICs.tsx
  • frontend/packages/metal3-plugin/src/components/baremetal-hosts/BareMetalHostStatus.tsx
  • frontend/packages/metal3-plugin/src/components/baremetal-hosts/BareMetalHostsPage.tsx
  • frontend/packages/metal3-plugin/src/components/baremetal-hosts/BareMetalHostsTable.tsx
  • frontend/packages/metal3-plugin/src/components/baremetal-hosts/dashboard/EventsCard.tsx
  • frontend/packages/metal3-plugin/src/components/modals/StopNodeMaintenanceModal.tsx
  • frontend/packages/operator-lifecycle-manager-v1/locales/en/olm-v1.json
  • frontend/packages/operator-lifecycle-manager/locales/en/olm.json
  • frontend/packages/operator-lifecycle-manager/src/components/descriptors/spec/endpoint.tsx
  • frontend/packages/operator-lifecycle-manager/src/components/descriptors/spec/match-expressions.tsx
  • frontend/packages/shipwright-plugin/locales/en/shipwright-plugin.json
  • frontend/packages/shipwright-plugin/src/components/build-list/BuildTable.tsx
  • frontend/packages/shipwright-plugin/src/components/buildrun-list/BuildRunTable.tsx
  • frontend/packages/topology/locales/en/topology.json
  • frontend/packages/topology/src/components/list-view/cells/CpuCell.tsx
  • frontend/packages/topology/src/components/list-view/cells/MemoryCell.tsx
  • frontend/packages/topology/src/components/list-view/cells/MetricsTooltip.tsx
  • frontend/packages/vsphere-plugin/locales/en/vsphere-plugin.json
  • frontend/packages/vsphere-plugin/src/components/VSphereOperatorStatuses.tsx
  • frontend/packages/webterminal-plugin/locales/en/webterminal-plugin.json
  • frontend/packages/webterminal-plugin/src/components/cloud-shell/setup/CloudShellAdvancedOption.tsx
  • frontend/public/components/RBAC/rules.jsx
  • frontend/public/components/cluster-settings/cluster-settings.tsx
  • frontend/public/components/configmap-and-secret-data.tsx
  • frontend/public/components/error.tsx
  • frontend/public/components/image-stream-timeline.tsx
  • frontend/public/components/instantiate-template.tsx
  • frontend/public/components/modals/impersonate-user-modal.tsx
  • frontend/public/components/service-monitor.jsx
  • frontend/public/components/utils/download-button.tsx
  • frontend/public/components/utils/webhooks.tsx
  • frontend/public/locales/en/public.json
💤 Files with no reviewable changes (8)
  • frontend/i18n-scripts/lexers.js
  • frontend/i18n-scripts/tests/lexers.spec.ts
  • frontend/i18n-scripts/build-i18n.sh
  • frontend/i18n-scripts/common.js
  • frontend/i18n-scripts/set-english-defaults.js
  • frontend/i18next-parser.config.js
  • frontend/i18n-scripts/consolidate-public-folders.js
  • frontend/public/components/cluster-settings/cluster-settings.tsx
🚧 Files skipped from review as they are similar to previous changes (37)
  • frontend/packages/dev-console/src/components/catalog/providers/useTemplates.tsx
  • frontend/packages/knative-plugin/src/catalog/useEventTypeProvider.tsx
  • frontend/packages/metal3-plugin/src/components/baremetal-hosts/BareMetalHostStatus.tsx
  • frontend/packages/dev-console/src/components/catalog/providers/useDevfileSamples.tsx
  • frontend/packages/dev-console/src/components/import/advanced/AdvancedSection.tsx
  • frontend/packages/dev-console/src/components/catalog/providers/useBuilderImageSamples.ts
  • frontend/packages/console-app/src/components/volume-snapshot/volume-snapshot-class.tsx
  • frontend/i18n-scripts/namespace-map.ts
  • frontend/packages/dev-console/src/components/buildconfig/BuildConfigFormEditor.tsx
  • frontend/packages/metal3-plugin/src/components/baremetal-hosts/BareMetalHostsTable.tsx
  • frontend/packages/knative-plugin/src/catalog/useKafkaSinkProvider.ts
  • frontend/packages/knative-plugin/src/components/eventing/EventType.tsx
  • frontend/packages/webterminal-plugin/src/components/cloud-shell/setup/CloudShellAdvancedOption.tsx
  • frontend/packages/dev-console/src/components/pipeline-section/pipeline/GithubSection.tsx
  • frontend/packages/dev-console/src/components/catalog/providers/useDevfile.tsx
  • frontend/packages/metal3-plugin/src/components/baremetal-hosts/BareMetalHostsPage.tsx
  • frontend/packages/dev-console/src/components/deployments/AdvancedSection.tsx
  • frontend/packages/dev-console/src/components/catalog/providers/useBuilderImages.tsx
  • frontend/packages/metal3-plugin/src/components/modals/StopNodeMaintenanceModal.tsx
  • frontend/packages/metal3-plugin/src/components/baremetal-hosts/BareMetalHostNICs.tsx
  • frontend/packages/dev-console/src/components/import/ImportPage.tsx
  • frontend/packages/knative-plugin/src/catalog/useKameletsProvider.ts
  • frontend/packages/knative-plugin/src/catalog/useKameletsSinkProvider.ts
  • frontend/packages/metal3-plugin/src/components/baremetal-hosts/BareMetalHostDisks.tsx
  • frontend/packages/dev-console/src/components/health-checks/RequestTypeForms.tsx
  • frontend/packages/knative-plugin/src/catalog/useEventSourceProvider.ts
  • frontend/packages/shipwright-plugin/src/components/buildrun-list/BuildRunTable.tsx
  • frontend/packages/console-app/src/components/quick-starts/utils/quick-start-context.tsx
  • frontend/packages/console-app/src/components/nodes/configuration/high-availability/RemediationAgent.tsx
  • frontend/package.json
  • frontend/i18next.config.ts
  • frontend/packages/shipwright-plugin/src/components/build-list/BuildTable.tsx
  • frontend/packages/dev-console/locales/en/devconsole.json
  • frontend/tests/i18n-structure.spec.ts
  • frontend/packages/vsphere-plugin/src/components/VSphereOperatorStatuses.tsx
  • frontend/packages/helm-plugin/locales/en/helm-plugin.json
  • frontend/packages/operator-lifecycle-manager/locales/en/olm.json

Comment thread frontend/packages/console-app/locales/en/console-app.json
Comment thread frontend/packages/console-shared/locales/en/console-shared.json
Comment thread frontend/packages/topology/locales/en/topology.json Outdated
@logonoff
logonoff force-pushed the CONSOLE-5428-i18n branch 2 times, most recently from d9a0af9 to bad4d07 Compare July 22, 2026 13:43
@logonoff
logonoff force-pushed the CONSOLE-5428-i18n branch from bad4d07 to 4610c54 Compare July 22, 2026 13:44
@vojtechszocs

Copy link
Copy Markdown
Contributor

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Jul 22, 2026
@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Scheduling tests matching the pipeline_run_if_changed or not excluded by pipeline_skip_if_only_changed parameters:
/test e2e-gcp-console
/test e2e-playwright

@openshift-ci

openshift-ci Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: logonoff, vojtechszocs

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

1 similar comment
@openshift-ci

openshift-ci Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: logonoff, vojtechszocs

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@logonoff

Copy link
Copy Markdown
Member Author

QA Verification Evidence

Details
Branch CONSOLE-5428-i18n
Baseline main @ ee4383e546
Candidate CONSOLE-5428-i18n @ 4610c54852
Verified 2026-07-22
Browser Playwright 1.61.1 / Chrome for Testing 149.0.7827.55 (playwright chromium v1228)
OS Darwin 25.5.0
Jira CONSOLE-5428

Verification Steps

# Route / Check Action Result
1 yarn i18n Run i18n lint + extraction ✅ pass
2 git diff Check for drift after extraction ✅ pass (no changes)
3 locale files Compare source locale file counts ✅ pass (17/17 identical)
4 /dashboards Navigate, wait load ✅ pass
5 /k8s/ns/default/pods Navigate, wait load ✅ pass
6 /k8s/ns/default/poddisruptionbudgets/~new Navigate, wait load ✅ pass
7 /k8s/cluster/clusterroles Navigate, wait load ✅ pass
8 /k8s/ns/default/configmaps/~new Navigate, wait load ✅ pass
9 /settings/cluster Navigate, wait load ✅ pass
10 language switch (ja) Fetch locale files with lng=ja via http-backend v4 ✅ pass (3/3 namespaces returned valid JSON with Japanese translations)
11 console errors Check for i18n-related errors ✅ pass (no i18n errors; only standard API 404/500s for missing CRDs)

i18n Tooling Verification

Check Old Pipeline (main) New Pipeline (PR) Result
Extraction tool i18next-parser v9.4.0 i18next-cli v1.50.3 (Rust/SWC) ✅ Extracts same keys
Lint step None i18next-cli lint ✅ New — no issues found
console-extensions.json keys CustomJSONLexer (EventEmitter) consoleExtensionsPlugin (onEnd hook) ✅ Same %key% extraction
Public namespace consolidation consolidate-public-folders.js Output function routes directly ✅ No separate merge needed
English defaults set-english-defaults.js + pluralize Keys already have values in committed JSON ✅ Existing values preserved
Key sorting Unsorted (sort: false) Sorted (sort: true) ✅ Intentional change
Namespace mapping Implicit (from t() calls) Explicit namespace-map.ts (3 exceptions) ✅ Correct
i18next-http-backend ^1.0.21 (CVE) ^4.0.0 ✅ Loads en + ja locales
Source locale file count 17 files 17 files ✅ Identical
Extraction drift N/A yarn i18n then git diff ✅ No drift

Visual Evidence

Animated overview (click to expand)
Baseline (main) Candidate (CONSOLE-5428-i18n)
Step 4: Dashboard overview
Baseline (main) Candidate (CONSOLE-5428-i18n)
Step 5: Pods list page
Baseline (main) Candidate (CONSOLE-5428-i18n)
Step 6: PDB creation form
Baseline (main) Candidate (CONSOLE-5428-i18n)
Step 7: Cluster roles table
Baseline (main) Candidate (CONSOLE-5428-i18n)
Step 8: ConfigMap creation form
Baseline (main) Candidate (CONSOLE-5428-i18n)
Step 9: Cluster settings page
Baseline (main) Candidate (CONSOLE-5428-i18n)
Step 7 (original plan): Deployments list
Baseline (main) Candidate (CONSOLE-5428-i18n)

Note

All screenshots are visually identical between baseline and candidate, confirming no visual regressions from the i18n tooling migration. Console errors are the same on both branches (standard API 404/500s for missing CRDs — unrelated to i18n).

Warning

This verification was performed by an AI agent. Results may contain false positives or miss
regressions that require human judgment. Always review the screenshots manually before approving.

Automated QA verification by Claude Code

@logonoff

Copy link
Copy Markdown
Member Author

/verified by claude

@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label Jul 22, 2026
@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@logonoff: This PR has been marked as verified by claude.

Details

In response to this:

/verified by claude

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@logonoff

Copy link
Copy Markdown
Member Author

/test all

@openshift-ci

openshift-ci Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

@logonoff: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-playwright 4610c54 link false /test e2e-playwright

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@openshift-merge-bot
openshift-merge-bot Bot merged commit 56550c1 into openshift:main Jul 22, 2026
8 of 11 checks passed
@logonoff
logonoff deleted the CONSOLE-5428-i18n branch July 22, 2026 20:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. component/core Related to console core functionality component/dev-console Related to dev-console component/git-service Related to git-service component/helm Related to helm-plugin component/insights Related to insights plugin component/knative Related to knative-plugin component/metal3 Related to metal3-plugin component/olm Related to OLM component/shared Related to console-shared component/topology Related to topology docs-approved Signifies that Docs has signed off on this PR jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. kind/i18n Indicates issue or PR relates to internationalization or has content that needs to be translated lgtm Indicates that a PR is ready to be merged. px-approved Signifies that Product Support has signed off on this PR verified Signifies that the PR passed pre-merge verification criteria

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants