Use single i18n entry for the message

This commit is contained in:
Patrice Chalin
2022-02-01 15:52:36 -05:00
parent d7b651a76d
commit 6de4f5bcf1
2 changed files with 5 additions and 9 deletions
+3 -5
View File
@@ -202,12 +202,10 @@ other = "Objectives"
[options_heading]
other = "Options"
[outdated_page_message]
other = "Kubernetes authors consider this page to be outdated because REASON. We suggest that you use more recent resources."
[outdated_page_reason]
other = "it is more than a year old"
[outdated_blog_over_one_year_old]
other = "The Kubernetes project considers this article to be outdated because it is more than one year old. Check that the information in the page has not become incorrect since its publication."
[outdated_page_title]
[outdated_blog_title]
other = "Outdated article"
[post_create_issue]
+2 -4
View File
@@ -10,10 +10,8 @@
</div>
</section>
{{ else if and (eq .Section "blog") .Date (.Date.Before (now.AddDate -1 0 0)) -}}
{{ $title := .Param "outdated_page.title" | default (T "outdated_page_title") -}}
{{ $msg := .Param "outdated_page.message" | default (T "outdated_page_message") -}}
{{ $reason := .Param "outdated_page.reason" | default (T "outdated_page_reason") -}}
{{ $msg = replaceRE "REASON" $reason $msg -}}
{{ $title := .Param "outdated_blog.title" | default (T "outdated_blog_title") -}}
{{ $msg := .Param "outdated_blog.message" | default (T "outdated_blog_over_one_year_old") -}}
<section id="deprecation-warning" class="blog-outdated-warning">
<div class="content deprecation-warning pageinfo">
<h3>{{ $title }}</h3>