diff options
author | Jake Wiesler <jakewiesler@gmail.com> | 2021-01-23 23:58:06 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-23 23:58:06 +0300 |
commit | 20457f89dd74bd4c9ed7abb0d20de15664c495ab (patch) | |
tree | c81fd6f37299714b767016f2da4bf16697827fea | |
parent | af8225205268ef139ed72a8dc83bbae8201db6d2 (diff) | |
parent | 77a12623dc969022143e2e78ba68331bcc61bf17 (diff) |
Merge pull request #146 from rbnis/addi18nsupport
-rw-r--r-- | i18n/de.toml | 8 | ||||
-rw-r--r-- | i18n/en.toml | 8 | ||||
-rw-r--r-- | layouts/partials/browse-by-tag.html | 4 | ||||
-rw-r--r-- | layouts/partials/post-pagination.html | 4 | ||||
-rw-r--r-- | layouts/partials/tags.html | 2 | ||||
-rw-r--r-- | layouts/taxonomy/tag.html | 8 |
6 files changed, 25 insertions, 9 deletions
diff --git a/i18n/de.toml b/i18n/de.toml new file mode 100644 index 0000000..9213bd0 --- /dev/null +++ b/i18n/de.toml @@ -0,0 +1,8 @@ +[prev_post] +other = "Vorheriger Beitrag" + +[next_post] +other = "Nächster Beitrag" + +[all_posts] +other = "Alle Beitäge"
\ No newline at end of file diff --git a/i18n/en.toml b/i18n/en.toml new file mode 100644 index 0000000..452a193 --- /dev/null +++ b/i18n/en.toml @@ -0,0 +1,8 @@ +[prev_post] +other = "Previous Post" + +[next_post] +other = "Next Post" + +[all_posts] +other = "All posts"
\ No newline at end of file diff --git a/layouts/partials/browse-by-tag.html b/layouts/partials/browse-by-tag.html index f08d539..65a3550 100644 --- a/layouts/partials/browse-by-tag.html +++ b/layouts/partials/browse-by-tag.html @@ -1,7 +1,7 @@ <ul class="tags__list"> {{ range $tag, $value := $.Site.Taxonomies.tags }} <li class="tag__item"> - <a class="tag__link" href="{{ "/tags/" | relLangURL}}{{ $tag | urlize }}/">{{ $tag | urlize }} ({{ len $value }})</a> + <a class="tag__link" href="{{ "/tags/" | relLangURL}}{{ $tag | urlize }}/">{{ $tag }} ({{ len $value }})</a> </li> - {{ end }} + {{ end }} </ul> diff --git a/layouts/partials/post-pagination.html b/layouts/partials/post-pagination.html index 792a5f8..5b44c55 100644 --- a/layouts/partials/post-pagination.html +++ b/layouts/partials/post-pagination.html @@ -1,14 +1,14 @@ <div class="pagination"> {{if .PrevInSection}} <a class="pagination__item" href="{{.PrevInSection.Permalink}}"> - <span class="pagination__label">Previous Post</span> + <span class="pagination__label">{{ i18n "prev_post" }}</span> <span class="pagination__title">{{.PrevInSection.Title}}</span> </a> {{end}} {{if .NextInSection}} <a class="pagination__item" href="{{.NextInSection.Permalink}}"> - <span class="pagination__label">Next Post</span> + <span class="pagination__label">{{ i18n "next_post" }}</span> <span class="pagination__title" >{{.NextInSection.Title}}</span> </a> {{end}} diff --git a/layouts/partials/tags.html b/layouts/partials/tags.html index 271651d..3ab8030 100644 --- a/layouts/partials/tags.html +++ b/layouts/partials/tags.html @@ -4,7 +4,7 @@ {{ range $index, $tag := . }} {{ with $.Site.GetPage (printf "/%s/%s" $taxo $tag) -}} <li class="tag__item"> - <a class="tag__link" href="{{ .Permalink }}">{{ $tag | urlize }}</a> + <a class="tag__link" href="{{ .Permalink }}">{{ $tag }}</a> </li> {{- end -}} {{- end -}} diff --git a/layouts/taxonomy/tag.html b/layouts/taxonomy/tag.html index 68aca13..b9795c9 100644 --- a/layouts/taxonomy/tag.html +++ b/layouts/taxonomy/tag.html @@ -2,12 +2,12 @@ {{ $.Scratch.Set "style_opts" (dict "src" "scss/pages/tags.scss" "dest" "css/tags.css") }} {{ end }} -{{ define "main" }} - {{ $dateFormat := .Site.Params.dateFormat | default "Jan 2 2006" }} - +{{ define "main" }} + {{ $dateFormat := .Site.Params.dateFormat | default "Jan 2 2006" }} + <div class="post-list__container"> <div class="tag__header"> - <a href="/blog">All posts</a><span class="separator">/</span> + <a href="/blog">{{ i18n "all_posts" }}</a><span class="separator">/</span> <h1 class="tag__term">{{ .Title }}</h1> </div> <ul class="post-list"> |