i18n: use existing translations in VMware/ESXi dashboard - #752
i18n: use existing translations in VMware/ESXi dashboard#752mdobprv-lab wants to merge 1 commit into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review. 📝 WalkthroughWalkthroughThe 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. ChangesDashboard internationalization
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to 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: 🚥 Pre-merge checks | ✅ 9 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (9 passed)
Full details: Docstring CoverageExplanation 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 HandlingExplanation PASS: The parent-to-HEAD diff changes only Full details: Server-Side AuthorizationExplanation PASS: The pull-request diff changes only Full details: Encryption InvariantsExplanation PASS: The PR changes only Full details: Migration SafetyExplanation The PR touches the ESXi migration UI, so the check applies. The exact source diff has 83 replacement pairs, all limited to Full details: Agpl AttributionExplanation PASS. The PR changes only
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
| { id: 'config', label: 'Hardware' }, | ||
| { id: 'snapshots', label: `Snapshots (${snapsList.length})` }, | ||
| { id: 'overview', label: t('overview') }, | ||
| { id: 'settings', label: t('settings') }, |
There was a problem hiding this comment.
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
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| </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')}> |
There was a problem hiding this comment.
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
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 Nitpicks1 code suggestion1. The stopped filter remains hardcoded in English while adjacent labels are translated, leaving this filter untranslated in non-English locales.Incomplete implementation · |
f9d33a4 to
4b24dd6
Compare
|
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: We're a small volunteer crew — if you feel like chipping in: https://opencollective.com/pegaprox. — MK |
|
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. |
4b24dd6 to
177e827
Compare
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
The changes cover existing labels in:
Examples include:
Virtual MachinesDatastoresOverviewSettingsHardwareSnapshotsStatusNameIP AddressActionsCPUUptimeSCSI ControllerNetwork AdapterRename,Clone,DeleteMigrate to ProxmoxTarget Cluster,Target Node,Target StorageOS TypeCPU Sockets,CPU TypeDisk Options,Format,CacheRequirementsNetwork InterfacesStart VM after migrationStart MigrationNotesBoot OrderHard DiskCreate SnapshotUsername/PasswordTest ConnectionCancel/UpdateThe source change adds 87
t(...)references using 67 unique existing translation keys.Files changed:
web/src/dashboard.jsweb/index.html— regenerated production frontendweb/src/translations.jsis 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
HostsNetworksClustersTasks & EventsSearch VMs...Guest OSCPUsBack to VM ListVM InformationVM IDGuest ToolsPower StateHardware VersionCompute ResourcesCPU Hot-AddMemory Hot-AddNetwork (PXE)Current ConfigurationHardware DetailsFirmwareDisk BusSnapshots
Snapshot name:No snapshots. Create one to save the current VM state.Migration UI
MigrationMigrate to Proxmox VETotal DiskEst. DowntimeDisks to TransferLoading Migration Plan...Start Migration WizardActive MigrationsSelect cluster...Select node...Select storage...ESXi SSH UserESXi Password (for SSH access)Network BridgeVLAN TagPreserve MAC addressesRemove source VMBIOS / FirmwareVGA DisplayNetwork ModelCores per SocketMemory (MB)SecurityRuntimeMetadataMigrationsRecent ESXi EventsNo migrations yet. Start one from a VM's Migration tab.Migration LogCompleted!ESXi server modal
Edit ESXi ServerVerify SSL certificateTesting...Add ServerConnection failedConnection successfulAdding 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:
StopMemoryStorageNetworkThis 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 --checkweb/Dev/build.shhealthydeenzhplfresptkoitNo missing keys, raw translation-key names,
undefinedlabels, 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
Checklist
Not applicable to this frontend label-only change; production build and runtime were tested instead.
Summary by CodeRabbit
New Features
Bug Fixes
CodeAnt-AI Description
Translate VMware and ESXi dashboard labels
What Changed
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:
This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.
Example
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:
This helps CodeAnt AI learn and adapt to your team's coding style and standards.
Example
Retrigger review
Ask CodeAnt AI to review the PR again, by typing:
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.