Skip to content

Commit

Permalink
Localization for glossary tag headers.
Browse files Browse the repository at this point in the history
  • Loading branch information
stormqueen1990 committed Nov 19, 2022
1 parent b6dfb3a commit 74b03f9
Show file tree
Hide file tree
Showing 14 changed files with 99 additions and 3 deletions.
2 changes: 2 additions & 0 deletions data/canonical-tags/architecture.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
id: architecture
name: Architecture
description: The inner components of Kubernetes.
nameKey: canonical_tag_architecture_name
descriptionKey: canonical_tag_architecture_description
2 changes: 2 additions & 0 deletions data/canonical-tags/community.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
id: community
name: Community
description: Related to Kubernetes open-source development.
nameKey: canonical_tag_community_name
descriptionKey: canonical_tag_community_description
2 changes: 2 additions & 0 deletions data/canonical-tags/core-object.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
id: core-object
name: Core Object
description: A resource type that Kubernetes supports by default.
nameKey: canonical_tag_core_object_name
descriptionKey: canonical_tag_core_object_description
2 changes: 2 additions & 0 deletions data/canonical-tags/extension.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
id: extension
name: Extension
description: Supported customizations of Kubernetes.
nameKey: canonical_tag_extension_name
descriptionKey: canonical_tag_extension_description
2 changes: 2 additions & 0 deletions data/canonical-tags/fundamental.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
id: fundamental
name: Fundamental
description: Relevant for a first-time user of Kubernetes.
nameKey: canonical_tag_fundamental_name
descriptionKey: canonical_tag_fundamental_description
2 changes: 2 additions & 0 deletions data/canonical-tags/networking.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
id: networking
name: Networking
description: How Kubernetes components talk to each other (and to programs outside the cluster).
nameKey: canonical_tag_networking_name
descriptionKey: canonical_tag_networking_description
2 changes: 2 additions & 0 deletions data/canonical-tags/operation.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
id: operation
name: Operation
description: Starting and maintaining Kubernetes.
nameKey: canonical_tag_operation_name
descriptionKey: canonical_tag_operation_description
2 changes: 2 additions & 0 deletions data/canonical-tags/security.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
id: security
name: Security
description: Keeping Kubernetes applications safe and secure.
nameKey: canonical_tag_security_name
descriptionKey: canonical_tag_security_description
2 changes: 2 additions & 0 deletions data/canonical-tags/storage.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
id: storage
name: Storage
description: How Kubernetes applications handle persistent data.
nameKey: canonical_tag_storage_name
descriptionKey: canonical_tag_storage_description
2 changes: 2 additions & 0 deletions data/canonical-tags/tool.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
id: tool
name: Tool
description: Software that makes Kubernetes easier or better to use.
nameKey: canonical_tag_tool_name
descriptionKey: canonical_tag_tool_description
2 changes: 2 additions & 0 deletions data/canonical-tags/user-type.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
id: user-type
name: User Type
description: Represents a common type of Kubernetes user.
nameKey: canonical_tag_user_type_name
descriptionKey: canonical_tag_user_type_description
2 changes: 2 additions & 0 deletions data/canonical-tags/workload.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
id: workload
name: Workload
description: Applications running on Kubernetes.
nameKey: canonical_tag_workload_name
descriptionKey: canonical_tag_workload_description
72 changes: 72 additions & 0 deletions data/i18n/en/en.toml
Original file line number Diff line number Diff line change
Expand Up @@ -372,3 +372,75 @@ other = "Warning:"

[whatsnext_heading]
other = "What's next"

[canonical_tag_architecture_name]
other = "Architecture"

[canonical_tag_architecture_description]
other = "The inner components of Kubernetes."

[canonical_tag_community_name]
other = "Community"

[canonical_tag_community_description]
other = "Related to Kubernetes open-source development."

[canonical_tag_core_object_name]
other = "Core Object"

[canonical_tag_core_object_description]
other = "A resource type that Kubernetes supports by default."

[canonical_tag_extension_name]
other = "Extension"

[canonical_tag_extension_description]
other = "Supported customizations of Kubernetes."

[canonical_tag_fundamental_name]
other = "Fundamental"

[canonical_tag_fundamental_description]
other = "Relevant for a first-time user of Kubernetes."

[canonical_tag_networking_name]
other = "Networking"

[canonical_tag_networking_description]
other = "How Kubernetes components talk to each other (and to programs outside the cluster)."

[canonical_tag_operation_name]
other = "Operation"

[canonical_tag_operation_description]
other = "Starting and maintaining Kubernetes."

[canonical_tag_security_name]
other = "Security"

[canonical_tag_security_description]
other = "Keeping Kubernetes applications safe and secure."

[canonical_tag_storage_name]
other = "Storage"

[canonical_tag_storage_description]
other = "How Kubernetes applications handle persistent data."

[canonical_tag_tool_name]
other = "Tool"

[canonical_tag_tool_description]
other = "Software that makes Kubernetes easier or better to use."

[canonical_tag_user_type_name]
other = "User Type"

[canonical_tag_user_type_description]
other = "Represents a common type of Kubernetes user."

[canonical_tag_workload_name]
other = "Workload"

[canonical_tag_workload_description]
other = "Applications running on Kubernetes."
6 changes: 3 additions & 3 deletions layouts/docs/glossary.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ <h1>{{ .Title }}</h1>
<div class="tag-description invisible" id="placeholder">.</div>
{{ range (index site.Data "canonical-tags") }}
<div class="tag-description hide" id="{{ printf "tag-%s-description" .id }}">
<i>{{ .description }}</i>
<i>{{ T .descriptionKey }}</i>
</div>
{{ end }}
{{ $sorted_tags := sort (index site.Data "canonical-tags") "name" }}
{{ $sorted_tags := sort (index site.Data "canonical-tags") "nameKey" }}
{{ range $sorted_tags }}
{{ $full_tag_name := printf "tag-%s" .id }}
<span id="{{ $full_tag_name }}" class="tag-option canonical-tag" data-target="{{ $full_tag_name }}">
<a href="javascript:void(0)">{{ .name }}</a>
<a href="javascript:void(0)">{{ T .nameKey }}</a>
</span>
{{ end }}
<span class="tag-option"><a id="select-all-tags" href="javascript:void(0)">{{ T "layouts_docs_glossary_select_all" }}</a></span>
Expand Down

0 comments on commit 74b03f9

Please sign in to comment.