Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CVE feed cleanup on i18n data and shortcode compliance check #39727

Merged
merged 2 commits into from
Feb 28, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
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
#38579 (comment)
  • Loading branch information
mtardy committed Feb 28, 2023
commit 3d850f6b9a79115ca5db3c5dea0a67882b17e268
7 changes: 2 additions & 5 deletions data/i18n/en/en.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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:"
Expand Down
2 changes: 1 addition & 1 deletion layouts/shortcodes/cve-feed.html
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down