Skip to content

Commit

Permalink
fix(i18n): translate metrics UI items (#509)
Browse files Browse the repository at this point in the history
  • Loading branch information
razonyang committed Dec 3, 2023
1 parent c103d0a commit c5cb9a2
Show file tree
Hide file tree
Showing 11 changed files with 88 additions and 7 deletions.
9 changes: 9 additions & 0 deletions i18n/en.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
[metrics_page_sections]
other = "Sections"

[metrics_page_types]
other = "Types"

[metrics_posts]
other = "Posts"

[on_this_page]
other = "On this page"

Expand Down
9 changes: 9 additions & 0 deletions i18n/es.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
[metrics_page_sections]
other = "Sections"

[metrics_page_types]
other = "Types"

[metrics_posts]
other = "Posts"

[on_this_page]
other = "En esta página"

Expand Down
9 changes: 9 additions & 0 deletions i18n/fr.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
[metrics_page_sections]
other = "Sections"

[metrics_page_types]
other = "Types"

[metrics_posts]
other = "Posts"

[on_this_page]
other = "Sommaire"

Expand Down
9 changes: 9 additions & 0 deletions i18n/ko.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
[metrics_page_sections]
other = "Sections"

[metrics_page_types]
other = "Types"

[metrics_posts]
other = "Posts"

[on_this_page]
other = "목차"

Expand Down
9 changes: 9 additions & 0 deletions i18n/ms.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
[metrics_page_sections]
other = "Sections"

[metrics_page_types]
other = "Types"

[metrics_posts]
other = "Posts"

[on_this_page]
other = "Dalam halaman ini"

Expand Down
9 changes: 9 additions & 0 deletions i18n/pt-br.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
[metrics_page_sections]
other = "Sections"

[metrics_page_types]
other = "Types"

[metrics_posts]
other = "Posts"

[on_this_page]
other = "Nesta página"

Expand Down
9 changes: 9 additions & 0 deletions i18n/ru.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
[metrics_page_sections]
other = "Sections"

[metrics_page_types]
other = "Types"

[metrics_posts]
other = "Posts"

[on_this_page]
other = "На этой странице"

Expand Down
9 changes: 9 additions & 0 deletions i18n/zh-hans.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
[metrics_page_sections]
other = "板块"

[metrics_page_types]
other = "类型"

[metrics_posts]
other = "文章"

[on_this_page]
other = "本页内容"

Expand Down
9 changes: 9 additions & 0 deletions i18n/zh-hant.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
[metrics_page_sections]
other = "板塊"

[metrics_page_types]
other = "類型"

[metrics_posts]
other = "文章"

[on_this_page]
other = "本頁內容"

Expand Down
8 changes: 4 additions & 4 deletions layouts/partials/hb/modules/blog/home/taxonomies.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
}}
{{- $size := "2.25em" }}
<nav class="nav nav-fill hb-module">
<a
class="nav-link d-flex flex-column disabled"
<span
class="nav-link d-flex flex-column"
href="{{ site.Home.RelPermalink }}"
title="Pages">
title="{{ i18n `metrics_posts` }}">
<span class="mb-3 text-body fw-bold">{{ len site.RegularPages }}</span>
<span class="text-body">
{{- partial "icons/icon" (dict "vendor" "bs" "name" "file-richtext" "width" $size "height" $size "className" "text-primary") -}}
</span>
</a>
</span>
{{- range $kind, $taxonomy := site.Taxonomies }}
{{- with site.GetPage $kind }}
<a
Expand Down
6 changes: 3 additions & 3 deletions layouts/partials/hb/modules/blog/term/metrics.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{{- $metrics := slice (dict "title" "Pages" "count" (len .RegularPages)) }}
{{- $metrics := slice (dict "title" (i18n "metrics_posts") "count" (len .RegularPages)) }}
{{- $metrics = $metrics | append (dict
"title" "Sections"
"title" (i18n "metrics_page_sections")
"count" (len (.RegularPages.GroupBy "Section")))
}}
{{- $metrics = $metrics | append (dict
"title" "Types"
"title" (i18n "metrics_page_types")
"count" (len (.RegularPages.GroupBy "Type")))
}}
<ul class="nav justify-content-center mt-auto mb-0">
Expand Down

0 comments on commit c5cb9a2

Please sign in to comment.