Skip to content

kyverno: release ships no i18n catalog — UI renders raw '{{pct}}% compliant' / '{{count}}' placeholders #1239

Description

@productiondown

TL;DR: the kyverno plugin ships no i18n catalog and no headlamp.i18n declaration, so every interpolated string renders its raw placeholders. The complete fix is the output of the repo's own tooling: npm run i18n en in kyverno/ — two files. Fix PR to follow.

Symptom — Headlamp v0.45.0 in-cluster, Safari (persists through a browser cache clear and restart, so not client caching). The app-bar compliance badge:

{{pct}}% compliant
Pass: {{count}}
Fail: {{count}}

Before screenshot attached below.

Cause — two missing halves, both required:

  1. The kyverno-0.1.0 release tarball contains only main.js + package.json — no locales/ (none in the source tree either), so i18next has no resources and returns keys uninterpolated.
  2. Even with a catalog present it isn't loaded: frontend/src/plugin/pluginI18n.ts only fetches locales a plugin declares via headlamp.i18n in package.json (the #4854 scoping), and kyverno declares none. The flux plugin has both halves and interpolates correctly — the working reference.

Fix — in kyverno/, npm run i18n en generates both: locales/en/translation.json (155 keys, identity mapping, _one/_other plural variants for the {{count}} keys) and the "headlamp": {"i18n": ["en"]} declaration. headlamp-plugin package already includes locales/ in the artifact — no packaging change needed.

Verified: lint / tsc / test / build green on Node 20 (matching CI); rendered on Headlamp v0.45.0 in-cluster — with the two files the badge shows numbers, without them the raw placeholders above.

Happy to PR this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions