Skip to content

OCPBUGS-84844: VSphere plugin changes broke i18n translations - missing strings in locales/en/#16384

Open
cajieh wants to merge 1 commit intoopenshift:mainfrom
cajieh:OCPBUGS-84844
Open

OCPBUGS-84844: VSphere plugin changes broke i18n translations - missing strings in locales/en/#16384
cajieh wants to merge 1 commit intoopenshift:mainfrom
cajieh:OCPBUGS-84844

Conversation

@cajieh
Copy link
Copy Markdown
Contributor

@cajieh cajieh commented Apr 30, 2026

Analysis / Root cause:

Following recent updates to the vSphere plugin, a regression was identified where several localized strings were removed or omitted from the locales/en/ source directory despite remaining active in the component implementation.

This resulted in:
Broken Translations: Missing keys caused the UI to fallback to raw key names or empty strings in non-English locales.

Sync Mismatch: The Phrase (Memsource) portal lacked these keys, preventing the localization team from providing translations for upcoming releases.

Solution description:

Source Restoration: Re-introduced the missing string keys into frontend/public/locales/en/vsphere-plugin.json to align the locale source with the current code implementation.

Phrase Portal Sync: Will be uploaded to portal later on.

Test setup:

Clean the local environment: rm -rf node_modules && yarn install && yarn i18n

Ensure the vSphere plugin is enabled in your local development environment.

Test cases:
Key Verification: Verify that the "Error loading" and other vSphere-specific messages no longer show raw translation keys in the console or UI.

Locale Switching: Switch the console language to a supported secondary language (e.g., French) and verify that the keys now appear (either as the restored English string or the translated version if already available in the portal).

Build Integrity: Run yarn build to ensure that the i18n asset compilation completes without errors.

Screenshots

Reviewers and assignees:

Summary by CodeRabbit

  • New Features

    • Added comprehensive error messages in English, Spanish, French, Japanese, Korean, and Chinese for vSphere operations including kube-controller-manager management, cloud provider configuration, node tainting, and infrastructure patching.
  • Localization

    • Reorganized error message translations to improve localization structure and consistency.

@openshift-ci openshift-ci Bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 30, 2026
@openshift-ci-robot openshift-ci-robot added jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Apr 30, 2026
@openshift-ci-robot
Copy link
Copy Markdown
Contributor

@cajieh: This pull request references Jira Issue OCPBUGS-84844, which is invalid:

  • expected the bug to target the "5.0.0" version, but no target version was set

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

Details

In response to this:

Analysis / Root cause:

Solution description:

Screenshots / screen recording:

Test setup:

Test cases:

Browser conformance:

  • Chrome
  • Firefox
  • Safari (or Epiphany on Linux)

Additional info:

Reviewers and assignees:

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 openshift-ci Bot requested review from rawagner and rhamilto April 30, 2026 21:09
@openshift-ci openshift-ci Bot added component/core Related to console core functionality kind/i18n Indicates issue or PR relates to internationalization or has content that needs to be translated approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Apr 30, 2026
@cajieh
Copy link
Copy Markdown
Contributor Author

cajieh commented Apr 30, 2026

/jira refresh

@openshift-ci-robot
Copy link
Copy Markdown
Contributor

@cajieh: This pull request references Jira Issue OCPBUGS-84844, which is invalid:

  • expected the bug to target the "5.0.0" version, but no target version was set

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

Details

In response to this:

/jira refresh

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.

@cajieh
Copy link
Copy Markdown
Contributor Author

cajieh commented Apr 30, 2026

/jira refresh

@openshift-ci-robot openshift-ci-robot added jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. and removed jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Apr 30, 2026
@openshift-ci-robot
Copy link
Copy Markdown
Contributor

@cajieh: This pull request references Jira Issue OCPBUGS-84844, which is valid. The bug has been moved to the POST state.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (5.0.0) matches configured target version for branch (5.0.0)
  • bug is in the state New, which is one of the valid states (NEW, ASSIGNED, POST)
Details

In response to this:

/jira refresh

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.

@cajieh
Copy link
Copy Markdown
Contributor Author

cajieh commented May 1, 2026

/test backend

@cajieh cajieh changed the title [WIP] OCPBUGS-84844: VSphere plugin changes broke i18n translations - missing strings in locales/en/ OCPBUGS-84844: VSphere plugin changes broke i18n translations - missing strings in locales/en/ May 1, 2026
@openshift-ci openshift-ci Bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label May 1, 2026
@openshift-ci-robot
Copy link
Copy Markdown
Contributor

@cajieh: This pull request references Jira Issue OCPBUGS-84844, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (5.0.0) matches configured target version for branch (5.0.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, POST)

The bug has been updated to refer to the pull request using the external bug tracker.

Details

In response to this:

Analysis / Root cause:

Following recent updates to the vSphere plugin, a regression was identified where several localized strings were removed or omitted from the locales/en/ source directory despite remaining active in the component implementation.

This resulted in:
Broken Translations: Missing keys caused the UI to fallback to raw key names or empty strings in non-English locales.

Sync Mismatch: The Phrase (Memsource) portal lacked these keys, preventing the localization team from providing translations for upcoming releases.

Solution description:

Source Restoration: Re-introduced the missing string keys into frontend/public/locales/en/vsphere-plugin.json to align the locale source with the current code implementation.

Phrase Portal Sync: Will be uploaded to portal later on.

Test setup:
Clean the local environment: rm -rf node_modules && yarn install && yarn i18n

Ensure the vSphere plugin is enabled in your local development environment.

Test cases:
Key Verification: Verify that the "Error loading" and other vSphere-specific messages no longer show raw translation keys in the console or UI.

Locale Switching: Switch the console language to a supported secondary language (e.g., French) and verify that the keys now appear (either as the restored English string or the translated version if already available in the portal).

Build Integrity: Run yarn build to ensure that the i18n asset compilation completes without errors.

Reviewers and assignees:

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.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 4, 2026

📝 Walkthrough

Walkthrough

This pull request refactors vSphere plugin error messaging by migrating error-related locale entries from the global public.json files to plugin-scoped locale files (vsphere-plugin.json) across six languages. Corresponding code changes in persist.ts and utils.ts update all PersistError throws to reference vsphere-plugin~ namespaced translation keys. The localization consolidation covers failure scenarios for kube-controller-manager operations, cloud provider configuration parsing and patching, secret persistence, node tainting, and infrastructure spec patching, plus a generic Unexpected error message.

🚥 Pre-merge checks | ✅ 12
✅ Passed checks (12 passed)
Check name Status Explanation
Title check ✅ Passed Title clearly identifies the bug (OCPBUGS-84844) and the main issue: missing i18n translation strings in vSphere plugin locale files that broke translations in non-English locales.
Description check ✅ Passed Description covers root cause (missing locale keys), solution (restoration of keys), and comprehensive test setup/cases. All template sections are filled with substantive content.
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 PR modifies JSON localization files and TypeScript error handling code with no Ginkgo tests, making the 'Stable and Deterministic Test Names' check inapplicable.
Test Structure And Quality ✅ Passed This check is not applicable to the provided pull request. The custom check specifically instructs to review Ginkgo test code for quality requirements related to Go testing patterns. This PR contains only locale translation JSON files and TypeScript component utility files with no test code.
Microshift Test Compatibility ✅ Passed This PR modifies only i18n locale JSON files and TypeScript components for error message localization in the vSphere plugin. No new Ginkgo e2e tests are introduced, so the MicroShift Test Compatibility check does not apply.
Single Node Openshift (Sno) Test Compatibility ✅ Passed PR contains only JSON localization files and TypeScript component updates; no Ginkgo e2e tests present to evaluate for SNO compatibility.
Topology-Aware Scheduling Compatibility ✅ Passed PR modifies only i18n translation JSON files and error handling references; no deployment manifests, operator code, or scheduling configurations affected.
Ote Binary Stdout Contract ✅ Passed OTE Binary Stdout Contract not applicable; PR contains only frontend changes (locale files and TypeScript utilities) with no Go test code or process-level stdout communication.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed PR contains only localization JSON and TypeScript error-handling updates with no Ginkgo e2e tests introduced.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Review rate limit: 9/10 reviews remaining, refill in 6 minutes.

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

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@frontend/packages/vsphere-plugin/locales/es/vsphere-plugin.json`:
- Line 16: The Spanish translation for the key "Failed to persist {{secret}}" is
incorrect (it reads “No se pudo analizar {{secret}}” meaning "analyze"); update
the value in vsphere-plugin.json to accurately convey persistence failure, e.g.
"No se pudo guardar {{secret}}" or "No se pudo persistir {{secret}}", ensuring
the placeholder {{secret}} remains 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 YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: 24a73580-dece-4bb7-8c96-21489617bfd6

📥 Commits

Reviewing files that changed from the base of the PR and between 667b7cb and 1ac234a.

📒 Files selected for processing (14)
  • frontend/packages/vsphere-plugin/locales/en/vsphere-plugin.json
  • frontend/packages/vsphere-plugin/locales/es/vsphere-plugin.json
  • frontend/packages/vsphere-plugin/locales/fr/vsphere-plugin.json
  • frontend/packages/vsphere-plugin/locales/ja/vsphere-plugin.json
  • frontend/packages/vsphere-plugin/locales/ko/vsphere-plugin.json
  • frontend/packages/vsphere-plugin/locales/zh/vsphere-plugin.json
  • frontend/packages/vsphere-plugin/src/components/persist.ts
  • frontend/packages/vsphere-plugin/src/components/utils.ts
  • frontend/public/locales/en/public.json
  • frontend/public/locales/es/public.json
  • frontend/public/locales/fr/public.json
  • frontend/public/locales/ja/public.json
  • frontend/public/locales/ko/public.json
  • frontend/public/locales/zh/public.json
📜 Review details
🔇 Additional comments (13)
frontend/packages/vsphere-plugin/locales/zh/vsphere-plugin.json (1)

13-21: Plugin-scoped zh locale keys are restored correctly

The added keys align with the vSphere error paths and keep interpolation placeholders intact.

frontend/packages/vsphere-plugin/locales/ko/vsphere-plugin.json (1)

13-21: Korean locale additions are consistent with plugin error key coverage

Nice update restoring the missing plugin-owned error strings and preserving placeholders.

frontend/packages/vsphere-plugin/locales/en/vsphere-plugin.json (1)

13-21: English source locale now has the missing plugin error strings

This restores the expected key set (including Unexpected error) for the vSphere plugin namespace.

frontend/packages/vsphere-plugin/locales/ja/vsphere-plugin.json (1)

13-21: Japanese plugin error key set is now complete

The added keys match the expected vSphere plugin failures and keep interpolation tokens correctly.

frontend/packages/vsphere-plugin/locales/fr/vsphere-plugin.json (1)

10-10: French locale updates look consistent with plugin error handling

Good to see the missing plugin keys restored with placeholders preserved.

Also applies to: 13-21

frontend/public/locales/es/public.json (1)

1809-1809: Public Spanish locale tail update is clean

This keeps public.json consistent with the plugin-key migration.

frontend/public/locales/en/public.json (1)

1811-1811: Public English locale update is consistent with namespace cleanup

No issues in this segment.

frontend/public/locales/fr/public.json (1)

1809-1809: Looks good — locale file remains consistent after cleanup.

Keeping "Enabled": "Activé" as the final entry is valid and aligns with the locale-key consolidation pattern in this PR.

frontend/public/locales/ko/public.json (1)

1809-1809: LGTM — Korean locale end-of-file key is correct.

"Enabled": "활성화됨" is correctly retained and the JSON ending is clean.

frontend/public/locales/ja/public.json (1)

1809-1810: Scoped locale cleanup looks correct.

Ending public.json with "Enabled" after removing vSphere-specific error keys is consistent with the plugin-scoped i18n migration.

frontend/packages/vsphere-plugin/src/components/utils.ts (1)

36-36: Fallback i18n key now correctly namespaced.

Using vsphere-plugin~Unexpected error here aligns runtime fallback messaging with plugin locale ownership.

frontend/packages/vsphere-plugin/src/components/persist.ts (1)

101-104: Error key migration is consistent across all PersistError paths.

These updates correctly align vSphere persistence failures with plugin-scoped i18n keys while preserving detailed error propagation.

Also applies to: 141-143, 305-313, 575-575, 583-586, 592-595, 602-602, 610-613

frontend/public/locales/zh/public.json (1)

1809-1809: Global locale cleanup is aligned with plugin scoping.

Keeping this file’s terminal key as "Enabled" after removing vSphere-specific errors matches the intended i18n split.

Comment thread frontend/packages/vsphere-plugin/locales/es/vsphere-plugin.json Outdated
Copy link
Copy Markdown
Member

@logonoff logonoff left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label May 4, 2026
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 4, 2026

[APPROVALNOTIFIER] This PR is APPROVED

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

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

logonoff commented May 4, 2026

verified that the locales are moved from public to vsphere

/verified by @logonoff

@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label May 4, 2026
@openshift-ci-robot
Copy link
Copy Markdown
Contributor

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

Details

In response to this:

verified that the locales are moved from public to vsphere

/verified by @logonoff

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-merge-bot
Copy link
Copy Markdown
Contributor

/retest-required

Remaining retests: 0 against base HEAD d329d31 and 2 for PR HEAD b5bfc4f in total

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 4, 2026

@cajieh: all tests passed!

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.

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 jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. 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. 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