Make release-data time format localizable
parent
270bc93258
commit
3fcc2c812f
|
@ -217,6 +217,11 @@ other = ")"
|
||||||
[release_date_before]
|
[release_date_before]
|
||||||
other = "(released: "
|
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]
|
[seealso_heading]
|
||||||
other = "See Also"
|
other = "See Also"
|
||||||
|
|
||||||
|
|
|
@ -7,20 +7,20 @@
|
||||||
{{ if not $data.previousPatches }}
|
{{ if not $data.previousPatches }}
|
||||||
<!-- initial minor release -->
|
<!-- initial minor release -->
|
||||||
<div>
|
<div>
|
||||||
<b class="release-inline-heading">{{ T "latest_release" }}</b><span class="release-inline-value">{{ printf "%s.0" $dataVersion }}{{ if isset $data "releaseDate" }} {{ T "release_date_before" }}{{ printf "%s" $data.releaseDate }}{{ T "release_date_after" }}{{- end -}}</span>
|
<b class="release-inline-heading">{{ T "latest_release" }}</b><span class="release-inline-value">{{ printf "%s.0" $dataVersion }}{{ if isset $data "releaseDate" }} {{ T "release_date_before" }}<time datetime="{{ time.Format "2006-01-02" $data.releaseDate }}">{{ time.Format ( T "release_date_format") $data.releaseDate }}</time>{{ T "release_date_after" }}{{- end -}}</span>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<b class="release-inline-heading">{{ T "end_of_life" }}</b><span class="release-eoldate release-inline-value">{{ printf "%s" $data.endOfLifeDate }}</span>
|
<b class="release-inline-heading">{{ T "end_of_life" }}</b><span class="release-eoldate release-inline-value"><time datetime="{{ time.Format "2006-01-02" $data.endOfLifeDate }}">{{ time.Format ( T "release_date_format") $data.endOfLifeDate }}</time></span>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<b class="release-inline-heading">{{ T "previous_patches" }}</b> <span class="notapplicable release-inline-value">{{ T "not_applicable" }}</span>
|
<b class="release-inline-heading">{{ T "previous_patches" }}</b> <span class="notapplicable release-inline-value">{{ T "not_applicable" }}</span>
|
||||||
</div>
|
</div>
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
<div>
|
<div>
|
||||||
<b class="release-inline-heading">{{ T "latest_release" }}</b><span class="release-inline-value">{{ index $data.previousPatches 0 "release" }} {{ T "release_date_before" }}{{ printf "%s" ( index $data.previousPatches 0 "targetDate" ) }}{{ T "release_date_after" }}</span>
|
<b class="release-inline-heading">{{ T "latest_release" }}</b><span class="release-inline-value">{{ index $data.previousPatches 0 "release" }} {{ T "release_date_before" }}<time datetime="{{ time.Format "2006-01-02" ( index $data.previousPatches 0 "targetDate" ) }}">{{ time.Format ( T "release_date_format") ( index $data.previousPatches 0 "targetDate" ) }}</time>{{ T "release_date_after" }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<b class="release-inline-heading">{{ T "end_of_life" }}</b><span class="release-eoldate release-inline-value">{{ printf "%s" $data.endOfLifeDate }}</span>
|
<b class="release-inline-heading">{{ T "end_of_life" }}</b><span class="release-eoldate release-inline-value"><time datetime="{{ time.Format "2006-01-02" $data.endOfLifeDate }}">{{ time.Format ( T "release_date_format") $data.endOfLifeDate }}</time></span>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<b>{{ T "previous_patches" }}</b>
|
<b>{{ T "previous_patches" }}</b>
|
||||||
|
|
Loading…
Reference in New Issue