Use plural translation keys for taxonomies (#620)

This commit is contained in:
Alphonse Mariya
2021-12-26 19:18:00 +01:00
committed by GitHub
parent 0b430ece67
commit d14dd837ec
33 changed files with 229 additions and 263 deletions

View File

@@ -1,10 +1,9 @@
{{ define "title" }}
{{- if eq .Kind "term" -}}
{{- i18n .Data.Singular | title -}}
{{- i18n .Data.Plural 1 | title -}}
{{- print ": " -}}
{{- end -}}
{{- .Title }} · {{ .Site.Title -}}
{{- i18n (lower .Title) | default .Title | title }} · {{ .Site.Title -}}
{{ end }}
{{ define "content" }}
{{ partial "list.html" . }}

View File

@@ -1,10 +1,9 @@
{{ define "title" }}
{{- if eq .Kind "term" -}}
{{- i18n .Data.Singular | title -}}
{{- i18n .Data.Plural | title -}}
{{- print ": " -}}
{{- end -}}
{{- .Title }} · {{ .Site.Title -}}
{{- i18n (lower .Title) | default .Title | title }} · {{ .Site.Title -}}
{{ end }}
{{ define "content" }}
{{ partial "terms.html" . }}

View File

@@ -2,10 +2,9 @@
<h1 class="title">
<a class="title-link" href="{{ .Permalink | safeURL }}">
{{- if eq .Kind "term" -}}
{{- i18n .Data.Singular | title -}}
{{- i18n .Data.Plural 1 | title -}}
{{- print ": " -}}
{{- end -}}
{{- i18n (lower .Title) | default .Title | title -}}
</a>
</h1>

View File

@@ -1,9 +1,9 @@
<div class="authors">
<i class="fa fa-user" aria-hidden="true"></i>
{{- range $index, $el := . -}}
{{- if gt $index 0 }}
<span class="separator"></span>
{{- end }}
<a href="{{ ( printf "authors/%s/" ( . | urlize ) ) | relLangURL }}">{{ . }}</a>
{{- end -}}
</div>
<i class="fa fa-user" aria-hidden="true"></i>
{{- range $index, $el := . -}}
{{- if gt $index 0 }}
<span class="separator"></span>
{{- end }}
<a href="{{ ( printf "authors/%s/" ( . | urlize ) ) | relLangURL }}">{{ . }}</a>
{{- end -}}
</div>

View File

@@ -2,10 +2,9 @@
<h1 class="title">
<a class="title-link" href="{{ .Permalink | safeURL }}">
{{- if eq .Kind "term" -}}
{{- i18n .Data.Singular | title -}}
{{- print ": " -}}
{{- i18n .Data.Plural | title -}}
{{- print ": " -}}
{{- end -}}
{{- i18n (lower .Title) | default .Title | title -}}
</a>
</h1>