Skip to content

Commit

Permalink
Translate some remnant partials for localization (kubernetes#12239)
Browse files Browse the repository at this point in the history
  • Loading branch information
tengqm authored and k8s-ci-robot committed Jan 29, 2019
1 parent 087a288 commit bef1909
Show file tree
Hide file tree
Showing 7 changed files with 74 additions and 13 deletions.
30 changes: 30 additions & 0 deletions i18n/en.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,35 @@
# i18n strings for the English (main) site.

[deprecation_warning]
other = " documentation is no longer actively maintained. The version you are currently viewing is a static snapshot. For up-to-date documentation, see "

[objectives_heading]
other = "Objectives"

[cleanup_heading]
other = "Cleaning up"

[prerequisites_heading]
other = "Before you begin"

[whatsnext_heading]
other = "What's next"

[feedback_heading]
other = "Feedback"

[feedback_question]
other = "Was this page helpful?"

[feedback_yes]
other = "Yes"

[feedback_no]
other = "No"

[latest_version]
other = "latest version."

[main_read_about]
other = "Read about"

Expand Down
30 changes: 30 additions & 0 deletions i18n/zh.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,35 @@
# i18n strings for the Chinese version of the site (https://kubernetes.io/zh/)

[deprecation_warning]
other = " 版本的文档已不再维护。您现在看到的版本来自于一份静态的快照。如需查阅最新文档,请点击"

[objectives_heading]
other = "教程目标"

[cleanup_heading]
other = "清理现场"

[prerequisites_heading]
other = "准备开始"

[whatsnext_heading]
other = "接下来"

[feedback_heading]
other = "反馈"

[feedback_question]
other = "此页是否对您有帮助?"

[feedback_yes]
other = ""

[feedback_no]
other = ""

[latest_version]
other = "最新版本。"

[main_read_about]
other = "Read about"

Expand Down
5 changes: 3 additions & 2 deletions layouts/partials/deprecation-warning.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
<main>
<div class="content deprecation-warning">
<h3>
Documentation for Kubernetes {{ .Param "version" }} is no longer actively maintained. The version you are currently viewing is a static snapshot.
For up-to-date documentation, see the <a href="{{ .Site.Params.currentUrl }}">latest</a> version.
Kubernetes {{ .Param "version" }}
{{ T "deprecation_warning" }}
<a href="{{ .Site.Params.currentUrl }}">{{ T "latest_version" }}</a>
</h3>
</div>
</main>
Expand Down
8 changes: 4 additions & 4 deletions layouts/partials/feedback.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{{ if not .Params.hide_feedback }}
<h2>Feedback</h2>
<p class="feedback--prompt">Was this page helpful?</p>
<button class="button feedback--yes">Yes</button>
<button class="button feedback--no">No</button>
<h2>{{ T "feedback_heading" }}</h2>
<p class="feedback--prompt">{{ T "feedback_question" }} </p>
<button class="button feedback--yes">{{ T "feedback_yes" }}</button>
<button class="button feedback--no">{{ T "feedback_no" }}</button>
<p class="feedback--response feedback--response__hidden">
Thanks for the feedback. If you have a specific, answerable question about how to use Kubernetes,
ask it on <a target="_blank" rel="noopener"
Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/templates/concept.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
{{ .ctx.Scratch.Set "blocks" slice }}
{{ .ctx.Scratch.Add "blocks" (dict "page" .page "block" "body" "purpose" "supplies the body of the page content.") }}
{{ .ctx.Scratch.Add "blocks" (dict "content" .page.Content) }}
{{ .ctx.Scratch.Add "blocks" (dict "page" .page "block" "whatsnext" "heading" "What's next" "optional" true ) }}
{{ .ctx.Scratch.Add "blocks" (dict "page" .page "block" "whatsnext" "heading" (i18n "whatsnext_heading") "optional" true ) }}

{{ partial "templates/blocks" . }}
4 changes: 2 additions & 2 deletions layouts/partials/templates/task.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
{{ partial "templates/block" (dict "page" .page "block" "overview" "purpose" "states, in one or two sentences, the purpose of this document") }}

{{ .ctx.Scratch.Set "blocks" slice }}
{{ .ctx.Scratch.Add "blocks" (dict "page" .page "block" "prerequisites" "heading" "Before you begin" "purpose" "lists action prerequisites and knowledge prerequisites.") }}
{{ .ctx.Scratch.Add "blocks" (dict "page" .page "block" "prerequisites" "heading" (i18n "prerequisites_heading") "purpose" "lists action prerequisites and knowledge prerequisites.") }}
{{ .ctx.Scratch.Add "blocks" (dict "page" .page "block" "steps" "purpose" "lists a sequence of numbered steps that accomplish the task.'") }}
{{ .ctx.Scratch.Add "blocks" (dict "page" .page "block" "discussion" "optional" true ) }}
{{ .ctx.Scratch.Add "blocks" (dict "content" .page.Content) }}
{{ .ctx.Scratch.Add "blocks" (dict "page" .page "block" "whatsnext" "heading" "What's next" "optional" true ) }}
{{ .ctx.Scratch.Add "blocks" (dict "page" .page "block" "whatsnext" "heading" (i18n "whatsnext_heading") "optional" true ) }}

{{ partial "templates/blocks" . }}
8 changes: 4 additions & 4 deletions layouts/partials/templates/tutorial.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{{ partial "templates/block" (dict "page" .page "block" "overview" "purpose" "states, in one or two sentences, the purpose of this document") }}

{{ .ctx.Scratch.Set "blocks" slice }}
{{ .ctx.Scratch.Add "blocks" (dict "page" .page "block" "objectives" "heading" "Objectives" "purpose" "lists the objectives for this tutorial.") }}
{{ .ctx.Scratch.Add "blocks" (dict "page" .page "block" "prerequisites" "heading" "Before you begin" "purpose" "lists action prerequisites and knowledge prerequisites.") }}
{{ .ctx.Scratch.Add "blocks" (dict "page" .page "block" "objectives" "heading" (i18n "objectives_heading") "purpose" "lists the objectives for this tutorial.") }}
{{ .ctx.Scratch.Add "blocks" (dict "page" .page "block" "prerequisites" "heading" (i18n "prerequisites_heading") "purpose" "lists action prerequisites and knowledge prerequisites.") }}
{{ .ctx.Scratch.Add "blocks" (dict "page" .page "block" "lessoncontent" "purpose" "provides the lesson content for this tutorial.") }}
{{ .ctx.Scratch.Add "blocks" (dict "content" .page.Content) }}
{{ .ctx.Scratch.Add "blocks" (dict "page" .page "block" "cleanup" "heading" "Cleaning up" "optional" true ) }}
{{ .ctx.Scratch.Add "blocks" (dict "page" .page "block" "whatsnext" "heading" "What's next" "optional" true ) }}
{{ .ctx.Scratch.Add "blocks" (dict "page" .page "block" "cleanup" "heading" (i18n "cleanup_heading") "optional" true ) }}
{{ .ctx.Scratch.Add "blocks" (dict "page" .page "block" "whatsnext" "heading" (i18n "whatsnext_heading") "optional" true ) }}

{{ partial "templates/blocks" . }}

0 comments on commit bef1909

Please sign in to comment.