Clean CVE feed shortcode i18n caption data
Previsouly we were using two data items: ```toml [cve_table_date_before] other = "(last updated: " [cve_table_date_after] other = ")" ``` Which was simplified, using printf, to: ```toml [cve_table_date_format_string] other = "(last updated: %s)" ``` This is related to the following discussion https://github.com/kubernetes/website/pull/38579#discussion_r1116992896pull/39727/head
parent
7a8170224f
commit
3d850f6b9a
|
@ -55,14 +55,11 @@ other = "Issue Summary"
|
|||
[cve_table]
|
||||
other = "Official Kubernetes CVE List"
|
||||
|
||||
[cve_table_date_before]
|
||||
other = "(last updated: "
|
||||
|
||||
[cve_table_date_format]
|
||||
other = "02 Jan 2006 15:04:05 MST"
|
||||
|
||||
[cve_table_date_after]
|
||||
other = ")"
|
||||
[cve_table_date_format_string]
|
||||
other = "(last updated: %s)"
|
||||
|
||||
[deprecation_title]
|
||||
other = "You are viewing documentation for Kubernetes version:"
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
{{ errorf "Build Failed. CVE feed does not comply with JSON feed v1.1" }}
|
||||
{{ end }}
|
||||
<table class="security-cves">
|
||||
<caption style="caption-side: top;">{{ T "cve_table" }} {{ T "cve_table_date_before" }}{{ $feed._kubernetes_io.updated_at | time.Format ( T "cve_table_date_format" ) }}{{ T "cve_table_date_after" }}</caption>
|
||||
<caption style="caption-side: top;">{{ T "cve_table" }} {{ printf (T "cve_table_date_format_string") ($feed._kubernetes_io.updated_at | time.Format (T "cve_table_date_format")) }}</caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ T "cve_id" }}</th>
|
||||
|
|
Loading…
Reference in New Issue