Skip to content

cert-manager: Add i18n#910

Open
skoeva wants to merge 1 commit into
mainfrom
cm-i18n
Open

cert-manager: Add i18n#910
skoeva wants to merge 1 commit into
mainfrom
cm-i18n

Conversation

@skoeva

@skoeva skoeva commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

These changes add i18n support for the cert manager plugin in Headlamp.

Locales supported:
en, de, es, fr, it, ja, id, ko, pt-BR, ru, zh-Hans, zh-Hant, cs, nl, hu, pt-PT, pl, sv, tr

Remaining work

Add translations for different locales

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 introduces internationalization (i18n) support to the cert-manager Headlamp plugin by wiring UI labels/messages through useTranslation() and adding locale resources/config so the plugin can ship translations.

Changes:

  • Replaced hard-coded UI strings across cert-manager list/detail views with t('...') lookups.
  • Updated shared components/helpers to support translated labels/messages (including passing t into processIssuerExtraInfo).
  • Added locale configuration in package.json and created locales/<locale>/translation.json files (with en populated).

Reviewed changes

Copilot reviewed 34 out of 34 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
cert-manager/src/components/orders/List.tsx Localize Orders list title/column labels.
cert-manager/src/components/orders/Detail.tsx Localize Order detail labels/section titles.
cert-manager/src/components/issuers/List.tsx Localize Issuers list title/Ready status strings.
cert-manager/src/components/issuers/Detail.tsx Localize Issuer detail labels/section titles; pass t to helper.
cert-manager/src/components/common/processIssuerExtraInfo.tsx Add t parameter and localize issuer extra-info labels.
cert-manager/src/components/common/CommonComponents.tsx Localize shared component labels/messages; adjust StringArray empty text handling.
cert-manager/src/components/clusterIssuers/List.tsx Localize Cluster Issuers list title/column label.
cert-manager/src/components/clusterIssuers/Detail.tsx Localize ClusterIssuer detail section title; pass t to helper.
cert-manager/src/components/challenges/List.tsx Localize Challenges list title/column labels.
cert-manager/src/components/challenges/Detail.tsx Localize Challenge detail labels/section titles.
cert-manager/src/components/certificates/List.tsx Localize Certificates list title/column labels.
cert-manager/src/components/certificates/Detail.tsx Localize Certificate detail labels/section titles.
cert-manager/src/components/certificateRequests/List.tsx Localize CertificateRequests list title/column labels.
cert-manager/src/components/certificateRequests/Detail.tsx Localize CertificateRequest detail labels (incl. interpolated “Usage {{index}}”).
cert-manager/package.json Declare supported plugin locales under headlamp.i18n.
cert-manager/locales/en/translation.json Add English translation keys/values used by cert-manager UI.
cert-manager/locales/de/translation.json Add German translation key set (placeholders).
cert-manager/locales/es/translation.json Add Spanish translation key set (placeholders).
cert-manager/locales/fr/translation.json Add French translation key set (placeholders).
cert-manager/locales/it/translation.json Add Italian translation key set (placeholders).
cert-manager/locales/ja/translation.json Add Japanese translation key set (placeholders).
cert-manager/locales/id/translation.json Add Indonesian translation key set (placeholders).
cert-manager/locales/ko/translation.json Add Korean translation key set (placeholders).
cert-manager/locales/pt-BR/translation.json Add Brazilian Portuguese translation key set (placeholders).
cert-manager/locales/ru/translation.json Add Russian translation key set (placeholders).
cert-manager/locales/zh-Hans/translation.json Add Simplified Chinese translation key set (placeholders).
cert-manager/locales/zh-Hant/translation.json Add Traditional Chinese translation key set (placeholders).
cert-manager/locales/cs/translation.json Add Czech translation key set (placeholders).
cert-manager/locales/nl/translation.json Add Dutch translation key set (placeholders).
cert-manager/locales/hu/translation.json Add Hungarian translation key set (placeholders).
cert-manager/locales/pt-PT/translation.json Add Portuguese (Portugal) translation key set (placeholders).
cert-manager/locales/pl/translation.json Add Polish translation key set (placeholders).
cert-manager/locales/sv/translation.json Add Swedish translation key set (placeholders).
cert-manager/locales/tr/translation.json Add Turkish translation key set (placeholders).

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

Comment thread cert-manager/src/components/challenges/Detail.tsx Outdated
Comment thread cert-manager/src/components/challenges/Detail.tsx Outdated
Comment thread cert-manager/src/components/orders/Detail.tsx Outdated
Comment thread cert-manager/src/components/common/processIssuerExtraInfo.tsx Outdated
Comment thread cert-manager/src/components/common/CommonComponents.tsx

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 34 out of 34 changed files in this pull request and generated 2 comments.

Comments suppressed due to low confidence (4)

cert-manager/src/components/orders/Detail.tsx:74

  • The Wildcard value is rendered via boolean.toString(), which stays as "true"/"false" (not localized). Since this view is now i18n-aware, render it as translated Yes/No for consistent localization.
    cert-manager/src/components/challenges/Detail.tsx:73
  • This fallback hard-codes the English string "false" and uses boolean.toString() for the true case, which is not localized. Prefer using translated Yes/No (and keep the existing default-to-false behavior when wildcard is undefined).
                value: item.spec?.wildcard?.toString() || 'false',

cert-manager/src/components/challenges/Detail.tsx:87

  • Presented/Processing are displayed via boolean.toString(), which produces "true"/"false" and won't be localized. Prefer translating these boolean values (e.g., Yes/No) to match the rest of the UI.
                        { name: t('Presented'), value: item.status.presented.toString() },
                        { name: t('Processing'), value: item.status.processing.toString() },

cert-manager/src/components/common/processIssuerExtraInfo.tsx:26

  • This optional boolean is displayed via toString(), yielding "true"/"false" (not localized) when set. Since this is user-facing, consider mapping booleans to translated Yes/No while keeping empty when undefined.
            { name: t('Skip TLS Verify'), value: spec.acme.skipTLSVerify?.toString() },

Comment thread cert-manager/src/components/common/processIssuerExtraInfo.tsx Outdated
Comment thread cert-manager/src/components/common/processIssuerExtraInfo.tsx Outdated
@skoeva
skoeva force-pushed the cm-i18n branch 2 times, most recently from 0ba4a07 to c0a9f18 Compare July 20, 2026 17:46
Signed-off-by: Evangelos Skopelitis <eskopelitis@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants