Skip to content

i18n: use existing translations in VMware/ESXi dashboard - #752

Open
mdobprv-lab wants to merge 1 commit into
PegaProx:Testingfrom
mdobprv-lab:i18n-vmware-vm-view
Open

i18n: use existing translations in VMware/ESXi dashboard#752
mdobprv-lab wants to merge 1 commit into
PegaProx:Testingfrom
mdobprv-lab:i18n-vmware-vm-view

Conversation

@mdobprv-lab

@mdobprv-lab mdobprv-lab commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

User description

What & why

The VMware/ESXi dashboard still contains a number of hardcoded English UI labels even where matching translation keys already exist in the global i18n catalogs.

This PR wires those existing keys into the VMware/ESXi UI.

It is intentionally limited to reusing translations that already exist upstream. It does not add translation keys, modify translation catalogs, change VMware/ESXi behavior, or refactor the i18n architecture.

This is a focused follow-up to the i18n scope discussed around #737.

Scope

  • This PR does one thing: use existing translation keys in the VMware/ESXi dashboard.

The changes cover existing labels in:

  • VMware VM navigation, filters and tables
  • VM detail tabs and selected VM information
  • VM settings and actions
  • snapshot controls
  • migration wizard tabs and fields
  • host, datastore, network and cluster views
  • selected migration status/log labels
  • Add/Edit ESXi server modal fields where an appropriate key already exists

Examples include:

  • Virtual Machines
  • Datastores
  • Overview
  • Settings
  • Hardware
  • Snapshots
  • Status
  • Name
  • IP Address
  • Actions
  • CPU
  • Uptime
  • SCSI Controller
  • Network Adapter
  • Rename, Clone, Delete
  • Migrate to Proxmox
  • Target Cluster, Target Node, Target Storage
  • OS Type
  • CPU Sockets, CPU Type
  • Disk Options, Format, Cache
  • Requirements
  • Network Interfaces
  • Start VM after migration
  • Start Migration
  • Notes
  • Boot Order
  • Hard Disk
  • Create Snapshot
  • ESXi Username / Password
  • Test Connection
  • Cancel / Update

The source change adds 87 t(...) references using 67 unique existing translation keys.

Files changed:

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

web/src/translations.js is intentionally unchanged.

Known remaining ESXi i18n gaps

There are still hardcoded English strings in the VMware/ESXi UI.

They are intentionally left unchanged where no exact, semantically appropriate translation key currently exists.

Frontend strings that still need proper i18n keys

Main VMware / VM UI

  • Hosts
  • Networks
  • Clusters
  • Tasks & Events
  • Search VMs...
  • Guest OS
  • CPUs
  • Back to VM List
  • VM Information
  • VM ID
  • Guest Tools
  • Power State
  • Hardware Version
  • Compute Resources
  • CPU Hot-Add
  • Memory Hot-Add
  • Network (PXE)
  • Current Configuration
  • Hardware Details
  • Firmware
  • Disk Bus

Snapshots

  • Snapshot name:
  • No snapshots. Create one to save the current VM state.

Migration UI

  • Migration
  • Migrate to Proxmox VE
  • Total Disk
  • Est. Downtime
  • Disks to Transfer
  • Loading Migration Plan...
  • Start Migration Wizard
  • Active Migrations
  • Select cluster...
  • Select node...
  • Select storage...
  • ESXi SSH User
  • ESXi Password (for SSH access)
  • Network Bridge
  • VLAN Tag
  • Preserve MAC addresses
  • Remove source VM
  • BIOS / Firmware
  • VGA Display
  • Network Model
  • Cores per Socket
  • Memory (MB)
  • Security
  • Runtime
  • Metadata
  • Migrations
  • Recent ESXi Events
  • No migrations yet. Start one from a VM's Migration tab.
  • Migration Log
  • Completed!

ESXi server modal

  • Edit ESXi Server
  • Verify SSL certificate
  • Testing...
  • Add Server
  • Connection failed
  • Connection successful

Adding support for these strings would require new translation keys and corresponding updates to the supported language catalogs, so that work is intentionally left for a separate focused i18n change.

Ambiguous existing keys

Some English values already occur under multiple translation keys with different semantic contexts, for example:

  • Stop
  • Memory
  • Storage
  • Network

This PR does not choose a key solely because its English value matches. If the semantic mapping was not clear, the existing hardcoded string was preserved.

Backend-provided text

Some migration requirement messages are supplied dynamically through vmwareMigrationPlan.requirements.

Those messages cannot be localized by simply replacing a frontend literal with t(...), so backend/dynamic-message localization is also outside this PR.

How it was tested

  • git diff --check
  • production frontend build with web/Dev/build.sh
  • Docker image rebuilt from the final source
  • dedicated runtime container reached healthy
  • verified all 67 used translation keys exist in all 9 current locales:
    • de
    • en
    • zh
    • pl
    • fr
    • es
    • pt
    • ko
    • it
  • runtime-tested the VMware/ESXi UI with Polish
  • cross-locale runtime spot checks with German and Italian
  • checked:
    • VMware server view
    • VM list
    • VM details
    • VM settings
    • VM actions
    • snapshots
    • migration wizard
    • Hosts
    • Datastores
    • Networks
    • Clusters
    • Tasks & Events
    • Add/Edit ESXi server modal

No missing keys, raw translation-key names, undefined labels, layout regressions, or cross-locale rendering issues were observed.

The remaining English labels appeared consistently across the tested locales and correspond to the known i18n gaps documented above.

Out of scope

  • no new translation keys
  • no translation catalog changes
  • no Polish-specific code
  • no VMware/ESXi behavior changes
  • no layout changes
  • no i18n architecture changes
  • no unrelated frontend cleanup

Checklist

  • There's a linked discussion/context (feat(i18n): add Polish language support #737), and this is a small focused follow-up.
  • The full test suite passes locally / tests were added.
    Not applicable to this frontend label-only change; production build and runtime were tested instead.
  • It's scoped to the title and doesn't touch unrelated files.
  • If I used an AI assistant, I have read, understood and tested every line myself. This is not unreviewed generated output.

Summary by CodeRabbit

  • New Features

    • Added internationalized text throughout the VMware/ESXi management dashboard.
    • Dashboard navigation, VM details, hardware, snapshots, migration workflows, host information, and server management screens now support localized display.
    • Updated filters, tables, menus, dialogs, and form labels for translation.
  • Bug Fixes

    • Prevented accidental horizontal movement of the dashboard during text-selection scrolling in Firefox while preserving vertical scrolling.

CodeAnt-AI Description

Translate VMware and ESXi dashboard labels

What Changed

  • Replaced hardcoded VMware and ESXi dashboard labels with existing translations across VM lists, details, snapshots, migration, host views, and server forms
  • Localized action buttons, tabs, table headings, filters, form fields, status messages, and migration options
  • Kept counts, migration controls, VM actions, and server management behavior unchanged

Impact

✅ Localized VMware dashboard navigation
✅ Localized VM migration and server setup workflows
✅ Consistent translated labels across VMware views

💡 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.

@coderabbitai

coderabbitai Bot commented Aug 31, 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: Pro Plus

Run ID: e171986a-9da3-41e6-ba91-c7da2f0e82cb

📥 Commits

Reviewing files that changed from the base of the PR and between 4b24dd6 and 177e827.

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

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


📝 Walkthrough

Walkthrough

The VMware and ESXi management dashboard replaces hardcoded English labels with i18n translation calls across VM views, migration forms, infrastructure tables, logs, and server management forms. The root shell now clips horizontal overflow.

Changes

Dashboard internationalization

Layer / File(s) Summary
VM navigation and details
web/src/dashboard.js
VM navigation, filters, tables, actions, detail tabs, hardware labels, and snapshot controls now use translation keys.
VM action modals and migration wizard
web/src/dashboard.js
Clone, rename, delete, and migration modal labels and controls now use translation keys.
Infrastructure views and ESXi server form
web/src/dashboard.js
Infrastructure and ESXi server form labels now use translation keys. The root shell clips horizontal overflow.

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

Merge Risk: ⚪ Minimal · up to 177e8

The PR replaces selected hardcoded VMware/ESXi labels with existing translations without changing product behavior; no actionable merge-blocking risk remains beyond normal checks and review.

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 i18n change, but it does not use an approved Conventional Commit prefix. Change the prefix to an approved value, such as feat: reuse existing translations in VMware/ESXi dashboard or refactor: reuse existing translations in VMware/ESXi dashboard.
✅ 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 parent-to-HEAD diff changes only web/src/dashboard.js and generated web/index.html. Added-line scans found no hardcoded credential, API key, token, private key, secret assignment, or sec…
Server-Side Authorization ✅ Passed PASS: The pull-request diff changes only web/src/dashboard.js and generated web/index.html. No Flask/Python route, query, tenant scope, ACL check, or authentication code changed. The source diff c…
Encryption Invariants ✅ Passed PASS: The PR changes only web/src/dashboard.js and the regenerated web/index.html. The source diff replaces UI literals with t(...) calls. It does not change database schema, encryption format, …
Migration Safety ✅ Passed The PR touches the ESXi migration UI, so the check applies. The exact source diff has 83 replacement pairs, all limited to t(...) label substitutions. The ESXi/XHM migration handlers, including `sta…
Agpl Attribution ✅ Passed PASS. The PR changes only web/src/dashboard.js and regenerated web/index.html. The client portal attribution is unchanged in plugins/client_portal/portal.html, and the exact `Powered by PegaProx…
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. (1 skipped: 1 too large.)

Full details: Secret Handling

Explanation

PASS: The parent-to-HEAD diff changes only web/src/dashboard.js and generated web/index.html. Added-line scans found no hardcoded credential, API key, token, private key, secret assignment, or secret-bearing log statement. The only secret-related source addition is the translation label t('esxiPassword'); it does not contain a password. No changed path writes to config/ or a backup archive.

Full details: Server-Side Authorization

Explanation

PASS: The pull-request diff changes only web/src/dashboard.js and generated web/index.html. No Flask/Python route, query, tenant scope, ACL check, or authentication code changed. The source diff contains translation-label substitutions only; the overflowX: 'clip' declaration already exists in the parent revision. The server-side authorization failure conditions are therefore not introduced.

Full details: Encryption Invariants

Explanation

PASS: The PR changes only web/src/dashboard.js and the regenerated web/index.html. The source diff replaces UI literals with t(...) calls. It does not change database schema, encryption format, Fernet handling, or the master-key loader. The ESXi password label changed, but the existing form state and POST/PUT submission handlers are identical to the parent revision. No encryption-invariant failure is introduced.

Full details: Migration Safety

Explanation

The PR touches the ESXi migration UI, so the check applies. The exact source diff has 83 replacement pairs, all limited to t(...) label substitutions. The ESXi/XHM migration handlers, including startVmwareMigration, are byte-for-byte unchanged from the parent. Existing start-migration failure paths still call addToast; the PR adds no failure branch, rollback, cleanup, or alert behavior. The generated web/index.html preserves the same migration endpoints and handler markers. Therefore, the PR does not introduce the stated migration-safety failure condition.

Full details: Agpl Attribution

Explanation

PASS. The PR changes only web/src/dashboard.js and regenerated web/index.html. The client portal attribution is unchanged in plugins/client_portal/portal.html, and the exact Powered by PegaProx text is present in both HEAD^ and HEAD. NOTICE is unchanged, including its Section 7(b) terms. No dependency manifest is changed, so the PR adds no dependency under an incompatible licence.

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

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 Aug 31, 2026
Comment thread web/src/dashboard.js
{ id: 'config', label: 'Hardware' },
{ id: 'snapshots', label: `Snapshots (${snapsList.length})` },
{ id: 'overview', label: t('overview') },
{ id: 'settings', label: t('settings') },

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: Making Settings accessible exposes shared vmwareConfigEdit state, so edits from one VM remain selected and can be saved to another VM. [stale reference]

Assessment: 🟠 Major · 🔁 Occurrence: Sometimes

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:** 20337:20337
**Comment:**
	*Stale Reference: Making Settings accessible exposes shared `vmwareConfigEdit` state, so edits from one VM remain selected and can be saved to another VM.

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
👍 | 👎

Comment thread web/src/dashboard.js
</div>
</div>
<button onClick={() => vmwareSnapshotAction(vmwareSelectedVm, 'delete', { snapshot_id: snap.id || snap.snapshot })} className="p-2 text-red-400 hover:bg-red-500/10 rounded-lg" title="Delete snapshot">
<button onClick={() => vmwareSnapshotAction(vmwareSelectedVm, 'delete', { snapshot_id: snap.id || snap.snapshot })} className="p-2 text-red-400 hover:bg-red-500/10 rounded-lg" title={t('deleteSnapshot')}>

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: The new trash button deletes a VMware snapshot immediately, so a single misclick permanently removes it without any confirmation. [possible bug]

Assessment: 🟠 Major · 🔁 Occurrence: Sometimes

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:** 20795:20795
**Comment:**
	*Possible Bug: The new trash button deletes a VMware snapshot immediately, so a single misclick permanently removes it without any confirmation.

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
👍 | 👎

@codeant-ai-for-open-source

Copy link
Copy Markdown

CodeAnt Nitpicks

1 code suggestion

1. The stopped filter remains hardcoded in English while adjacent labels are translated, leaving this filter untranslated in non-English locales.

Incomplete implementation · web/src/dashboard.js:20140

@mkellermann97

Copy link
Copy Markdown
Contributor

Nice one, thanks — tidying up the leftover hardcoded labels on the ESXi/VMware side is welcome. I checked the keys you're reusing (protected/stale/unprotected/unprotectedVms and friends) and they all already exist across the catalogs, so nothing falls back to raw text.

One heads-up: web/index.html is a generated bundle on our end (build.sh emits it from web/src), so we'll regenerate that through the build rather than take the hand-edited one — the web/src/dashboard.js changes are the part that matters. Noted it for review.

We're a small volunteer crew — if you feel like chipping in: https://opencollective.com/pegaprox. — MK

@mdobprv-lab

Copy link
Copy Markdown
Contributor Author

Thanks! Just to clarify, web/index.html was regenerated with web/Dev/build.sh from the final web/src state, not edited manually. Understood that web/src/dashboard.js is the source of truth.

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.

2 participants