fix(i18n): translate hardcoded interface strings - #2471
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
💤 Files with no reviewable changes (1)
📝 WalkthroughWalkthroughThis PR replaces hardcoded administrative UI text with translation lookups across extension forms, server and node resources, webhooks, plugins, MFA indicators, alerts, and connectivity tooltips. English translation entries are added for the new keys, and tooltip content is JSON-encoded with HTML disabled. ChangesAdministrative UI localization
Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@app/Livewire/NodeClientConnectivity.php`:
- Around line 67-71: Update the icon tooltip construction in makeIcon and its
loadingIcon, offlineIcon, onlineIcon, warningIcon, and onlineNoWsIcon callers to
JSON/JavaScript-encode translated text before embedding it in the x-tooltip
expression. Preserve the tooltip behavior while ensuring quotes and newlines
cannot break the generated markup, and retain allowHTML: true only if the
translated content is explicitly trusted.
🪄 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 UI
Review profile: CHILL
Plan: Pro
Run ID: 971fc58a-6bd0-46a5-b106-33594608fc65
📒 Files selected for processing (24)
app/Enums/WebhookScope.phpapp/Extensions/Captcha/Schemas/BaseSchema.phpapp/Extensions/OAuth/Schemas/DiscordSchema.phpapp/Extensions/OAuth/Schemas/GithubSchema.phpapp/Extensions/OAuth/Schemas/OAuthSchema.phpapp/Extensions/OAuth/Schemas/SteamSchema.phpapp/Filament/Admin/Resources/Eggs/Pages/EditEgg.phpapp/Filament/Admin/Resources/Nodes/Pages/EditNode.phpapp/Filament/Admin/Resources/Nodes/Pages/ListNodes.phpapp/Filament/Admin/Resources/Nodes/RelationManagers/AllocationsRelationManager.phpapp/Filament/Admin/Resources/Plugins/PluginResource.phpapp/Filament/Admin/Resources/Servers/Pages/CreateServer.phpapp/Filament/Admin/Resources/Servers/Pages/EditServer.phpapp/Filament/Admin/Resources/Servers/Pages/ListServers.phpapp/Filament/Admin/Resources/Users/UserResource.phpapp/Filament/Admin/Resources/Webhooks/Pages/ListWebhookConfigurations.phpapp/Filament/Admin/Resources/Webhooks/WebhookResource.phpapp/Filament/Server/Pages/Console.phpapp/Livewire/NodeClientConnectivity.phplang/en/admin/node.phplang/en/admin/plugin.phplang/en/admin/server.phplang/en/admin/webhook.phplang/en/profile.php
|
CodeRabbit review follow-up: addressed the one actionable inline finding in c09ec3f. Node connectivity tooltip text is now JSON-encoded before interpolation into the x-tooltip expression, and allowHTML is disabled because translation strings are plain text. Validation: php -l app/Livewire/NodeClientConnectivity.php and git diff --check passed. No other actionable inline or top-level review comments were present. |
|
@coderabbitai review |
✅ Action performedReview finished.
|
Summary
This fixes a structural i18n gap where user-facing Filament and Livewire strings were passed directly to label(), tooltip(), Tab::make(), and related presentation methods instead of translation helpers.
Root cause
Several components bypassed the trans() convention even though their strings are rendered directly in the user interface. This left non-English locales with English-only labels, tooltips, and tab titles.
Validation