Skip to content

Commit

Permalink
Use single i18n entry for the message
Browse files Browse the repository at this point in the history
  • Loading branch information
chalin committed Feb 1, 2022
1 parent d7b651a commit 6de4f5b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
8 changes: 3 additions & 5 deletions data/i18n/en/en.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
6 changes: 2 additions & 4 deletions layouts/partials/deprecation-warning.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,8 @@ <h3>
</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>
Expand Down

0 comments on commit 6de4f5b

Please sign in to comment.