From 2231ff00c7f6de6285fd3c3a6f90081353bc11ac Mon Sep 17 00:00:00 2001 From: Qiming Teng Date: Mon, 6 Oct 2025 10:37:09 +0800 Subject: [PATCH] Revise the rendering of feature state --- i18n/en/en.toml | 5 ++++- layouts/shortcodes/feature-state.html | 7 ++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/i18n/en/en.toml b/i18n/en/en.toml index 74bc2c25700f9..4ec5c6a6c2ec4 100644 --- a/i18n/en/en.toml +++ b/i18n/en/en.toml @@ -174,7 +174,10 @@ other = "Error" other = "Examples" [feature_gate_enabled] -other = "(enabled by default: {{ .enabled }})" +other = "(enabled by default)" + +[feature_gate_disabled] +other = "(disabled by default)" [feature_gate_stage_alpha] other = "Alpha" diff --git a/layouts/shortcodes/feature-state.html b/layouts/shortcodes/feature-state.html index 30c39cd334214..1689d0c13aa83 100644 --- a/layouts/shortcodes/feature-state.html +++ b/layouts/shortcodes/feature-state.html @@ -34,7 +34,12 @@
{{ T "feature_state" }} - {{ T "feature_state_kubernetes_label" }} v{{ .fromVersion }} [{{ .stage }}] {{ T "feature_gate_enabled" (dict "enabled" .defaultValue) }} + {{ T "feature_state_kubernetes_label" }} v{{ .fromVersion }} [{{ .stage }}] + {{- if eq .defaultValue true -}} + {{ T "feature_gate_enabled" }} + {{- else -}} + {{ T "feature_gate_disabled" }} + {{- end -}}
{{- $featureGateFound = true -}}