Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion i18n/en/en.toml
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,10 @@ other = "Error"
other = "Examples"

[feature_gate_enabled]
other = "(enabled by default: {{ .enabled }})"
other = "(enabled by default)"
Copy link
Contributor

Choose a reason for hiding this comment

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

Caution: this might break localizations that still rely on the old text.

If we're OK with that, we can proceed.


[feature_gate_disabled]
other = "(disabled by default)"

[feature_gate_stage_alpha]
other = "Alpha"
Expand Down
7 changes: 6 additions & 1 deletion layouts/shortcodes/feature-state.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,12 @@

<div class="feature-state-notice feature-{{ .stage }}" title="{{ printf "%s %s" (T "feature_state_feature_gate_tooltip") $feature_gate_name }}">
<span class="feature-state-name">{{ T "feature_state" }}</span>
<code>{{ T "feature_state_kubernetes_label" }} v{{ .fromVersion }} [{{ .stage }}]</code> {{ T "feature_gate_enabled" (dict "enabled" .defaultValue) }}
<code>{{ T "feature_state_kubernetes_label" }} v{{ .fromVersion }} [{{ .stage }}]</code>
{{- if eq .defaultValue true -}}
{{ T "feature_gate_enabled" }}
{{- else -}}
{{ T "feature_gate_disabled" }}
{{- end -}}
</div>

{{- $featureGateFound = true -}}
Expand Down