i18n: localize ESXi infrastructure UI - #776
mdobprv-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: Team Run ID: 📒 Files selected for processing (3)
Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review. 📝 WalkthroughWalkthroughThe 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. ChangesVMware dashboard internationalization
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to The VMware dashboard now displays localized English and Polish infrastructure labels. No remaining evidence indicates a merge-blocking user or production impact. Suggested reviewers: 🚥 Pre-merge checks | ✅ 9 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (9 passed)
Full details: Title checkExplanation The title accurately describes the localization changes, but it does not use an approved Conventional Commit prefix. It starts with 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. (2 skipped: 2 too large.) Full details: Secret HandlingExplanation 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 AuthorizationExplanation PASS: The pull request changes only Full details: Encryption InvariantsExplanation PASS. The commit changes only Full details: Migration SafetyExplanation PASS — the pull request localizes VMware/ESXi inventory and infrastructure labels only. The exact diff changes translation calls and English/Polish strings in Full details: Agpl AttributionExplanation The PR changes only
✨ Finishing Touches🧪 Generate unit tests (beta)
Warning Some tools did not complete. Review the errors below. 🔧 ast-grep (0.45.2)web/src/translations.jsast-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. Comment |
| <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')} |
There was a problem hiding this comment.
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")
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|
Thanks — queued for review. Heads up on the conflict: it's Your i18n work keeps landing cleanly, it's appreciated. — Marcus |
|
Coming back to this one, and I owe you an apology first: I said on 7 Sep that we'd take your Checked the state just now so it's not guesswork - all 36 of your The only thing still in the way is Marcus |
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
The change covers:
It:
locale -> en -> keyfallback for other localesweb/index.htmlthroughweb/Dev/build.shFiles changed:
web/src/dashboard.jsweb/src/translations.jsweb/index.html— regenerated production frontendIntentionally out of scope
How it was tested
Tested locally using a dedicated Docker runtime connected to ESXi.
git diff --checkpassesweb/Dev/build.shweb/index.htmlSHA:f42689bbc2e2e4998bd66a70c73154dace4fa18d0eac153416511f4a3d48a486sha256:47aeebbc0486108e2955bda60f36788cc7f1e604dfd3021a70ceba5ce5562920healthyundefinedlabels, or layout regressions were observedThe previous runtime containers were retained in stopped state as rollback points during testing.
Checklist
No automated tests were added for this frontend i18n-only change; the production build and dedicated Docker runtime were tested instead.
AI tool / model used:
ChatGPT / GPT-5.6 SolCodeAnt-AI Description
Localize the remaining ESXi infrastructure labels and messages
What Changed
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:
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.
Summary by CodeRabbit