Skip to content

Commit

Permalink
fix(i18n): translate more UI items (#987)
Browse files Browse the repository at this point in the history
  • Loading branch information
razonyang committed Oct 29, 2023
1 parent 4398698 commit 2f4daff
Show file tree
Hide file tree
Showing 11 changed files with 42 additions and 6 deletions.
6 changes: 6 additions & 0 deletions i18n/en.toml
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,12 @@ other = "Light"
[tipeee]
other = "Tipeee"

[toggle_sidebar]
other = "Toggle sidebar"

[translations]
other = "Translations"

[try_again]
other = "Try again"

Expand Down
6 changes: 6 additions & 0 deletions i18n/zh-cn.toml
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,12 @@ other = "深色"
[theme_light]
other = "浅色"

[toggle_sidebar]
other = "切换侧边栏"

[translations]
other = "译文"

[try_again]
other = "再试一次"

Expand Down
6 changes: 6 additions & 0 deletions i18n/zh-hans.toml
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,12 @@ other = "深色"
[theme_light]
other = "浅色"

[toggle_sidebar]
other = "切换侧边栏"

[translations]
other = "译文"

[try_again]
other = "再试一次"

Expand Down
6 changes: 6 additions & 0 deletions i18n/zh-hant.toml
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,12 @@ other = "深色"
[theme_light]
other = "淺色"

[toggle_sidebar]
other = "切換側邊欄"

[translations]
other = "譯文"

[try_again]
other = "再試一次"

Expand Down
6 changes: 6 additions & 0 deletions i18n/zh-hk.toml
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,12 @@ other = "深色"
[theme_light]
other = "淺色"

[toggle_sidebar]
other = "切換側邊欄"

[translations]
other = "譯文"

[try_again]
other = "再試一次"

Expand Down
6 changes: 6 additions & 0 deletions i18n/zh-tw.toml
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,12 @@ other = "深色"
[theme_light]
other = "淺色"

[toggle_sidebar]
other = "切換側邊欄"

[translations]
other = "譯文"

[try_again]
other = "再試一次"

Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/post/panel/comments.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{- if and (default true .Site.Params.comment) (default true .Params.comment) -}}
<a class="action action-post-comments" href="#post-comments" role="button" aria-label="Comments" title="Comments">
<a class="action action-post-comments" href="#post-comments" role="button" aria-label="Comments" title="{{ i18n `comments` }}">
<i class="fas fa-fw fa-comments"></i>
</a>
{{- end -}}
2 changes: 1 addition & 1 deletion layouts/partials/post/panel/copyright.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{- if and (default true .Site.Params.post.copyright) (default true .Params.copyright) -}}
<a class="action action-copyright" href="#post-copyright" role="button" aria-label="Copyright" title="Copyright">
<a class="action action-copyright" href="#post-copyright" role="button" aria-label="Copyright" title="{{ i18n `copyright` }}">
<i class="fas fa-fw fa-copyright"></i>
</a>
{{- end -}}
2 changes: 1 addition & 1 deletion layouts/partials/post/panel/sidebar-toggler.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{- if default true .Params.sidebar }}
<a id="sidebarToggler" class="action action-sidebar-toggler d-none d-xxl-block" role="button" title="Sidebar toggler">
<a id="sidebarToggler" class="action action-sidebar-toggler d-none d-xxl-block" role="button" title="{{ i18n `toggle_sidebar` }}">
<i class="fas fa-fw fa-expand-alt" data-fa-transform="rotate-45"></i>
</a>
{{- end }}
4 changes: 2 additions & 2 deletions layouts/partials/post/panel/toc.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{{- if partial "functions/toc" . -}}
{{- if ne .Type "docs" }}
<a class="action action-toc d-none d-xxl-block" href="#postTOC" role="button" title="Table of contents">
<a class="action action-toc d-none d-xxl-block" href="#postTOC" role="button" title="{{ i18n `table_of_contents` }}">
<i class="fas fa-fw fa-list-alt"></i>
</a>
{{- end }}
<a class="action action-toc d-block d-xxl-none" href="#post-toc-container" role="button" title="Table of contents">
<a class="action action-toc d-block d-xxl-none" href="#post-toc-container" role="button" title="{{ i18n `table_of_contents` }}">
<i class="fas fa-fw fa-list-alt"></i>
</a>
{{- end -}}
2 changes: 1 addition & 1 deletion layouts/partials/post/panel/translations.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{{ if and .IsTranslated }}
<div class="post-translations nav-item dropup action">
<a class="nav-link p-0" data-bs-toggle="dropdown" href="#" role="button" aria-haspopup="true" aria-expanded="false" aria-label="Translations dropdown menu"
title="Translations">
title="{{ i18n `translations` }}">
<i class="fas fa-fw fa-language"></i>
</a>
<div class="dropdown-menu">
Expand Down

0 comments on commit 2f4daff

Please sign in to comment.