Skip to content

i18n: localize ESXi infrastructure UI - #776

Open
mdobprv-lab wants to merge 1 commit into
PegaProx:Testingfrom
mdobprv-lab:feat/esxi-infrastructure-i18n
Open

mdobprv-lab wants to merge 1 commit into
PegaProx:Testingfrom
mdobprv-lab:feat/esxi-infrastructure-i18n

Conversation

@mdobprv-lab

@mdobprv-lab mdobprv-lab commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

User description

What & why

This is a focused follow-up to #754 and the reuse-first VMware/ESXi i18n work from #752. It complements the separate ESXi server-management change in #775.

The ESXi infrastructure views still contain hardcoded English UI labels. This PR reuses existing translation keys where they are semantically appropriate and adds the missing English and Polish keys required by the inventory summary and infrastructure tabs.

It intentionally covers only the ESXi infrastructure UI. Tasks & Events, migration content, backend-provided messages, and ESXi server configuration remain outside this change.

Related: #752, #754, #775, #737

Scope

  • This PR does one thing: localizes the ESXi infrastructure UI.

The change covers:

  • ESXi inventory summary counts
  • Hosts table and empty state
  • Datastores list
  • datastore capacity and usage details
  • connected-host and datastore-VM sections
  • datastore detail navigation
  • Networks empty state
  • Clusters list and empty state
  • static DRS and HA labels, statuses, modes, and controls
  • cluster host labels

It:

  • reuses existing translation keys where their meaning matches the ESXi UI
  • adds 15 missing translation keys
  • provides new values for English and Polish only
  • relies on the existing locale -> en -> key fallback for other locales
  • preserves the existing presentation fallback for unknown DRS automation values
  • regenerates web/index.html through web/Dev/build.sh

Files changed:

  • web/src/dashboard.js
  • web/src/translations.js
  • web/index.html — regenerated production frontend

Intentionally out of scope

  • Tasks & Events content
  • migration phases, logs, controls, and status messages
  • backend-provided dynamic messages
  • Add/Edit ESXi server and Add Cluster → ESXi forms covered separately by i18n: localize ESXi server management UI #775
  • global sidebar labels outside the selected ESXi server view
  • backend VMware API behavior
  • DRS or HA execution behavior
  • CSS/layout changes
  • i18n architecture changes
  • unrelated frontend cleanup

How it was tested

Tested locally using a dedicated Docker runtime connected to ESXi.

  • git diff --check passes
  • production frontend built successfully with web/Dev/build.sh
  • repeated frontend build produced the identical web/index.html SHA:
    • f42689bbc2e2e4998bd66a70c73154dace4fa18d0eac153416511f4a3d48a486
  • final Docker image built successfully:
    • sha256:47aeebbc0486108e2955bda60f36788cc7f1e604dfd3021a70ceba5ce5562920
  • dedicated final runtime reached healthy
  • verified all 15 new keys occur exactly once in English and once in Polish
  • verified the changed dashboard hunks stop before the Tasks & Events content boundary
  • visually tested in Polish:
    • ESXi inventory summary
    • Hosts
    • Datastores list
    • datastore detail
    • translated datastore template values
    • datastore back navigation
    • Networks
    • Clusters empty state
  • verified datastore detail and back navigation remained functional after localization
  • no raw translation-key names, undefined labels, or layout regressions were observed
  • populated DRS/HA cluster cards were source-reviewed and build-validated; the available runtime had no compute clusters to exercise those populated states visually

The previous runtime containers were retained in stopped state as rollback points during testing.

Checklist


CodeAnt-AI Description

Localize the remaining ESXi infrastructure labels and messages

What Changed

  • ESXi host, datastore, network, cluster, and VM summary labels now use translations instead of fixed English text
  • Empty states, navigation text, capacity details, and connected-resource counts are localized
  • DRS and HA names, statuses, modes, and enable/disable controls now support English and Polish translations
  • Added the missing English and Polish translations for these infrastructure views

Impact

✅ Polish-language ESXi infrastructure screens
✅ Localized empty-state and capacity messages
✅ Consistent translated DRS and HA controls

💡 Usage Guide

Checking Your Pull Request

Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.

Talking to CodeAnt AI

Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:

@codeant-ai ask: Your question here

This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.

Example

@codeant-ai ask: Can you suggest a safer alternative to storing this secret?

Preserve Org Learnings with CodeAnt

You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:

@codeant-ai: Your feedback here

This helps CodeAnt AI learn and adapt to your team's coding style and standards.

Example

@codeant-ai: Do not flag unused imports.

Retrigger review

Ask CodeAnt AI to review the PR again, by typing:

@codeant-ai: review

Check Your Repository Health

To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.

Summary by CodeRabbit

  • New Features
    • Added English and Polish translations throughout the VMware dashboard.
    • Localized connection summaries, host and datastore views, network and compute-cluster sections, and DRS/HA controls.
    • Added translated labels, statuses, empty states, buttons, dropdown options, and VM, host, and datastore count messages.

@coderabbitai

coderabbitai Bot commented Sep 3, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Team

Run ID: 3caeb3f6-26de-4f40-98bb-fa1a5302ede8

📥 Commits

Reviewing files that changed from the base of the PR and between 6dac478 and 9cb98f4.

📒 Files selected for processing (3)
  • web/index.html
  • web/src/dashboard.js
  • web/src/translations.js

Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review.


📝 Walkthrough

Walkthrough

The VMware dashboard replaces hardcoded UI text with translation lookups. English and Polish entries now cover inventory, datastore, compute-cluster, DRS, HA, and VM-related labels.

Changes

VMware dashboard internationalization

Layer / File(s) Summary
Inventory translation contract and views
web/src/dashboard.js, web/src/translations.js
VMware inventory labels, counts, units, and empty states now use English and Polish translation keys.
Datastore detail localization
web/src/dashboard.js
Datastore detail views translate navigation, capacity, usage, connected hosts, VMs, and operating-system labels. Placeholder substitution supports datastore names and counts.
Cluster controls localization
web/src/dashboard.js
DRS and HA headings, statuses, automation options, action buttons, and cluster-host labels now use translation keys.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to 9cb98

The VMware dashboard now displays localized English and Polish infrastructure labels. No remaining evidence indicates a merge-blocking user or production impact.

Suggested reviewers: mrmasterbay, mkellermann97

🚥 Pre-merge checks | ✅ 9 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Title check ⚠️ Warning The title accurately describes the localization changes, but it does not use an approved Conventional Commit prefix. It starts with i18n: instead of feat:, fix:, docs:, refactor:, or another… Rename the pull request with an approved prefix, such as feat: localize ESXi infrastructure UI.
✅ Passed checks (9 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
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.
Secret Handling ✅ Passed PASS. The commit changes only the dashboard UI, translations, and the regenerated frontend bundle. Added source lines contain translation calls and UI text only. Scans found no hardcoded credentials, …
Server-Side Authorization ✅ Passed PASS: The pull request changes only web/src/dashboard.js, web/src/translations.js, and regenerated web/index.html. git diff HEAD^ HEAD contains no Python files, Flask route definitions, databa…
Encryption Invariants ✅ Passed PASS. The commit changes only web/src/dashboard.js, web/src/translations.js, and the generated web/index.html. The source diff contains UI translation calls and English/Polish strings only. It d…
Migration Safety ✅ Passed PASS — the pull request localizes VMware/ESXi inventory and infrastructure labels only. The exact diff changes translation calls and English/Polish strings in web/src/dashboard.js, `web/src/translat…
Agpl Attribution ✅ Passed The PR changes only web/index.html, web/src/dashboard.js, and web/src/translations.js. plugins/client_portal/portal.html remains unchanged and still displays the required “Powered by PegaProx”…
Full details: Title check

Explanation

The title accurately describes the localization changes, but it does not use an approved Conventional Commit prefix. It starts with i18n: instead of feat:, fix:, docs:, refactor:, or another allowed prefix.

Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (2 skipped: 2 too large.)

Full details: Secret Handling

Explanation

PASS. The commit changes only the dashboard UI, translations, and the regenerated frontend bundle. Added source lines contain translation calls and UI text only. Scans found no hardcoded credentials, API keys, tokens, private-key material, secret-bearing assignments, or added logging. The generated bundle's word-level additions also contain no logging calls, sensitive runtime identifiers, or key-material markers. No config-directory or backup-archive write code was introduced. Existing secret-related code and logs in dashboard.js are unchanged.

Full details: Server-Side Authorization

Explanation

PASS: The pull request changes only web/src/dashboard.js, web/src/translations.js, and regenerated web/index.html. git diff HEAD^ HEAD contains no Python files, Flask route definitions, database queries, authentication decorators, or RBAC changes. The dashboard.js diff only replaces UI literals with translation calls. The parent and current files have identical API/network call lines, so the pull request does not add or alter access to VM, cluster, or user data. The server-side authorization failure conditions are not introduced.

Full details: Encryption Invariants

Explanation

PASS. The commit changes only web/src/dashboard.js, web/src/translations.js, and the generated web/index.html. The source diff contains UI translation calls and English/Polish strings only. It does not add persistence, database schema, encryption-format, or master-key-loader behavior. pegaprox/core/db.py, pegaprox/core/dbcrypto.py, and pegaprox/core/keystore.py are unchanged from the parent commit, so this PR does not introduce any stated encryption invariant failure.

Full details: Migration Safety

Explanation

PASS — the pull request localizes VMware/ESXi inventory and infrastructure labels only. The exact diff changes translation calls and English/Polish strings in web/src/dashboard.js, web/src/translations.js, and the regenerated web/index.html; it does not change migration, import, evacuation, rolling-update, or site-recovery logic. Migration handler definitions and related source lines are identical between HEAD^ and HEAD, and no migration-specific backend file changed. The migration-safety failure condition is therefore not applicable.

Full details: Agpl Attribution

Explanation

The PR changes only web/index.html, web/src/dashboard.js, and web/src/translations.js. plugins/client_portal/portal.html remains unchanged and still displays the required “Powered by PegaProx” attribution with the website, copyright, source, and AGPL references. NOTICE remains byte-identical, including its §7b terms. No dependency manifest or dependency declaration changed.

  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Warning

Some tools did not complete. Review the errors below.

🔧 ast-grep (0.45.2)
web/src/translations.js

ast-grep timed out on this file


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@codeant-ai-for-open-source codeant-ai-for-open-source Bot added the size:M This PR changes 30-99 lines, ignoring generated files label Sep 3, 2026
Comment thread web/src/dashboard.js
<div className="text-sm text-white font-medium">{t('drsFullName')}</div>
<div className="text-xs text-gray-500">
{cl.drs_enabled ? `Active - ${(cl.drs_automation || 'MANUAL').replace(/_/g, ' ').toLowerCase()}` : 'Disabled'}
{cl.drs_enabled ? t('active') + ' - ' + (cl.drs_automation === 'FULLY_AUTOMATED' ? t('fullyAutomated') : cl.drs_automation === 'PARTIALLY_AUTOMATED' ? t('partiallyAutomated') : !cl.drs_automation || cl.drs_automation === 'MANUAL' ? t('manual') : cl.drs_automation.replace(/_/g, ' ').toLowerCase()) : t('disabled')}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggestion: Move the DRS status selection into a named helper or precomputed variable before the JSX and replace the nested ternary with a lookup map plus a clearly defined fallback. [custom_rule]

Severity Level: Major ⚠️

Why it matters? ⭐

The JSX contains multiple nested conditional expressions combined with string formatting and a fallback transformation, making the DRS status logic difficult to read and change safely. A named helper or lookup map would isolate the formatting logic and provide a clearer fallback without changing behavior.

Rule source 📖

CodeAnt dashboard (rule "agent-persona-maintainability")

Use CodeAnt Skill Fix in Cursor Fix in VSCode Claude

Prompt for AI Agent 🤖
This is a comment left during a code review.

**Path:** web/src/dashboard.js
**Line:** 21725:21725
**Comment:**
	*Custom Rule: Move the DRS status selection into a named helper or precomputed variable before the JSX and replace the nested ternary with a lookup map plus a clearly defined fallback.

Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
Once fix is implemented, also check other comments on the same PR, and ask user if the user wants to fix the rest of the comments as well. if said yes, then fetch all the comments validate the correctness and implement a minimal fix
👍 | 👎

@mkellermann97

Copy link
Copy Markdown
Contributor

Thanks — queued for review.

Heads up on the conflict: it's web/index.html, which is generated by web/Dev/build.sh from web/src/*. 1.1.1 rebuilt it several times, so any PR carrying the built bundle will collide there. Nothing wrong on your side — we land these by taking your web/src/ changes and rebuilding the bundle ourselves, so you don't need to rebase the generated file.

Your i18n work keeps landing cleanly, it's appreciated.

— Marcus

@mkellermann97

Copy link
Copy Markdown
Contributor

Coming back to this one, and I owe you an apology first: I said on 7 Sep that we'd take your web/src/ changes and rebuild the bundle ourselves. That didn't happen, and it's been sitting eleven days. Nothing to do with your work.

Checked the state just now so it's not guesswork - all 36 of your dashboard.js call sites are still outstanding, and the 15 keys they need (connectedHosts, drsFullName, noVmsOnDatastore and the rest) are only in your branch. So the PR is fully needed, not partly superseded, which is what I half expected to find.

The only thing still in the way is web/index.html, same generated-bundle collision as before. Putting it in front of @MrMasterbay with the src side verified so it can go in the way we said.

Marcus

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M This PR changes 30-99 lines, ignoring generated files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants