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_r1116992896
pull/39727/head
mtardy 2023-02-28 11:08:32 +01:00
parent 7a8170224f
commit 3d850f6b9a
2 changed files with 3 additions and 6 deletions

View File

@ -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:"

View File

@ -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>