diff --git a/data/i18n/en/en.toml b/data/i18n/en/en.toml index f6373cdfc0..53467e42de 100644 --- a/data/i18n/en/en.toml +++ b/data/i18n/en/en.toml @@ -217,6 +217,11 @@ other = ")" [release_date_before] other = "(released: " +# See https://gohugo.io/functions/format/#gos-layout-string +# Use a suitable format for your locale +[release_date_format] +other = "2006-01-02" + [seealso_heading] other = "See Also" diff --git a/layouts/shortcodes/release-data.html b/layouts/shortcodes/release-data.html index 418f229a9a..0dbafc7acf 100644 --- a/layouts/shortcodes/release-data.html +++ b/layouts/shortcodes/release-data.html @@ -7,20 +7,20 @@ {{ if not $data.previousPatches }}
- {{ T "latest_release" }}{{ printf "%s.0" $dataVersion }}{{ if isset $data "releaseDate" }} {{ T "release_date_before" }}{{ printf "%s" $data.releaseDate }}{{ T "release_date_after" }}{{- end -}} + {{ T "latest_release" }}{{ printf "%s.0" $dataVersion }}{{ if isset $data "releaseDate" }} {{ T "release_date_before" }}{{ T "release_date_after" }}{{- end -}}
- {{ T "end_of_life" }}{{ printf "%s" $data.endOfLifeDate }} + {{ T "end_of_life" }}
{{ T "previous_patches" }} {{ T "not_applicable" }}
{{- else -}}
- {{ T "latest_release" }}{{ index $data.previousPatches 0 "release" }} {{ T "release_date_before" }}{{ printf "%s" ( index $data.previousPatches 0 "targetDate" ) }}{{ T "release_date_after" }} + {{ T "latest_release" }}{{ index $data.previousPatches 0 "release" }} {{ T "release_date_before" }}{{ T "release_date_after" }}
- {{ T "end_of_life" }}{{ printf "%s" $data.endOfLifeDate }} + {{ T "end_of_life" }}
{{ T "previous_patches" }}