Skip to content

radius: implement i18n#844

Open
vtushar06 wants to merge 2 commits into
headlamp-k8s:mainfrom
vtushar06:radius-i18n
Open

radius: implement i18n#844
vtushar06 wants to merge 2 commits into
headlamp-k8s:mainfrom
vtushar06:radius-i18n

Conversation

@vtushar06

Copy link
Copy Markdown

The radius plugin was the only one of its size with no i18n. This continues the plugin i18n rollout (KEDA, karpenter, flux) by wrapping radius's user-facing strings with t() and generating the English locale with headlamp-plugin i18n.

What changed:

  • Added useTranslation across the applications, environments, resources, resource-types and overview views, wrapping titles, column headers, section labels, empty states and the settings field labels.
  • Added the headlamp.i18n config to package.json and generated locales/en/translation.json.

Left out on purpose: sidebar entry labels (registered outside React, same as karpenter) and raw provisioning status values that come straight from the API.

tsc, lint and build pass locally.

Fixes #843

The radius plugin had no internationalization, so its UI strings
were hardcoded English. This wraps the user-facing strings in the
list and detail views with t(), the same setup the other plugins
use, and adds the generated English locale.

Sidebar entry labels are left as is (same as karpenter) since they
are registered outside of React. Provisioning status values come
from the API as data, so they are not translated.

tsc, lint and build all pass.

Signed-off-by: Tushar Verma <tusharmyself06@gmail.com>
@vtushar06

vtushar06 commented Jun 20, 2026

Copy link
Copy Markdown
Author

@illume @ashu8912 Can you review this whenever you have time,

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR brings the radius plugin in line with other large Headlamp plugins by introducing i18n support: it wraps user-facing UI strings with t() and adds the plugin’s English locale plus the headlamp.i18n package configuration.

Changes:

  • Added useTranslation() and wrapped UI strings with t() across overview, list, and detail views (applications, environments, resources, resource types).
  • Updated dynamic/count-based labels to use i18n interpolation/plural forms (e.g., {{count}}).
  • Added headlamp.i18n config to radius/package.json and generated radius/locales/en/translation.json.

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
radius/src/resources/ResourceDetailView.tsx Localized resource detail view labels, sections, and empty/error states.
radius/src/resources/index.tsx Localized resources list title and table column headers.
radius/src/resource-types/ResourceTypeDetailView.tsx Localized resource type detail view (tabs, headings, table labels, empty states).
radius/src/resource-types/index.tsx Localized resource types list title, description, and table headers.
radius/src/radius-overview/index.tsx Localized overview dashboard sections and status count labels.
radius/src/index.tsx Localized plugin settings field label/help text.
radius/src/environments/index.tsx Localized environments list title and table headers.
radius/src/environments/EnvironmentDetailView.tsx Localized environment detail view tabs/sections/table headers and empty/error states.
radius/src/applications/index.tsx Localized applications list title and table headers.
radius/src/applications/ApplicationDetailView.tsx Localized application detail view sections/table labels and empty/error states.
radius/package.json Added headlamp.i18n configuration for English locale generation/loading.
radius/locales/en/translation.json Added generated English translation catalog for all introduced keys.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread radius/src/resource-types/ResourceTypeDetailView.tsx
Drop toLowerCase on the translated title in the empty-state message, since
lowercasing a translated string is not locale-safe (Turkish casing, etc).
Also run prettier on EnvironmentDetailView.tsx to fix the format check.

Signed-off-by: Tushar Verma <tusharmyself06@gmail.com>
@vtushar06

Copy link
Copy Markdown
Author

Addressed the Copilot note by dropping the locale-unsafe toLowerCase on the translated title, and fixed a formatting issue so the format check passes. @illume @ashu8912 ready for review whenever.

@illume illume requested a review from Copilot June 24, 2026 09:42

@illume illume left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for the contribution.

Could you take a look at the commit messages in this PR? We follow a Linux kernel style for git commits — see the contributing guide and git log for examples.

Commits that need attention
  • radius: implement i18n — Description must start with a capital letter — e.g. frontend: HomeButton: Fix the button not frontend: HomeButton: fix the button.
  • radius: address review feedback and fix formatting — Description must start with a capital letter — e.g. frontend: HomeButton: Fix the button not frontend: HomeButton: fix the button.
Commit guidelines
  • Use atomic commits focused on a single change.
  • Use the title format <area>: <Description of changes> — description must start with a capital letter.
  • Keep the title under 72 characters (soft requirement).
  • Explain the intention and why the change is needed.
  • Make commit titles meaningful and describe what changed.
  • Do not add code that a later commit rewrites; squash or reorder commits instead.
  • Do not include Fixes #NN in commit messages.

Good examples:

  • frontend: HomeButton: Fix so it navigates to home
  • backend: config: Add enable-dynamic-clusters flag

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 12 out of 12 changed files in this pull request and generated no new comments.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

radius: do i18n

3 participants