Localize "By" (#530)
* Localize "By" for some languages (En/De/Es/Fr/It/Pt/No) and wrap string in a dedicated template. Fixes #528
This commit is contained in:
parent
c3f177ebd4
commit
8915e56e6e
|
@ -10,6 +10,9 @@ other = "Neuste {{.Title }}"
|
|||
[readMore]
|
||||
other = "weiterlesen"
|
||||
|
||||
[by]
|
||||
other = "Von"
|
||||
|
||||
[whatsInThis]
|
||||
other = "Was ist in dieser {{ .Type }}"
|
||||
|
||||
|
|
|
@ -10,6 +10,9 @@ other = "Recent {{.Title }}"
|
|||
[readMore]
|
||||
other = "read more"
|
||||
|
||||
[by]
|
||||
other = "By"
|
||||
|
||||
[whatsInThis]
|
||||
other = "What's in this {{ .Type }}"
|
||||
|
||||
|
|
|
@ -10,6 +10,9 @@ other = "{{.Title }} recientes"
|
|||
[readMore]
|
||||
other = "Leer más"
|
||||
|
||||
[by]
|
||||
other = "Por"
|
||||
|
||||
[whatsInThis]
|
||||
other = "Qué hay en este {{ .Type }}"
|
||||
|
||||
|
|
|
@ -10,6 +10,9 @@ other = "{{.Title }} récents"
|
|||
[readMore]
|
||||
other = "lire plus"
|
||||
|
||||
[by]
|
||||
other = "Par"
|
||||
|
||||
[whatsInThis]
|
||||
other = "Ce qui est dans {{ .Type }}"
|
||||
|
||||
|
|
|
@ -10,6 +10,9 @@ other = "Recenti {{.Title }}"
|
|||
[readMore]
|
||||
other = "leggi di più"
|
||||
|
||||
[by]
|
||||
other = "Da"
|
||||
|
||||
[whatsInThis]
|
||||
other = "Cosa c'è in {{ .Type }}"
|
||||
|
||||
|
|
|
@ -10,6 +10,9 @@ other = "Nyeste {{.Title }}"
|
|||
[readMore]
|
||||
other = "Les mer"
|
||||
|
||||
[by]
|
||||
other = "Av"
|
||||
|
||||
[whatsInThis]
|
||||
other = "Innhold av {{ .Type }}"
|
||||
|
||||
|
|
|
@ -10,6 +10,9 @@ other = "{{.Title }} Recentes"
|
|||
[readMore]
|
||||
other = "Leia mais"
|
||||
|
||||
[by]
|
||||
other = "por"
|
||||
|
||||
[whatsInThis]
|
||||
other = "O que há neste {{ .Type }}"
|
||||
|
||||
|
|
3
layouts/_default/by.html
Normal file
3
layouts/_default/by.html
Normal file
|
@ -0,0 +1,3 @@
|
|||
{{- if eq .Lang "de" "en" "es" "fr" "it" "no" "pt" -}}
|
||||
{{- i18n "by" -}}
|
||||
{{ end -}}
|
|
@ -20,12 +20,12 @@
|
|||
</h1>
|
||||
{{ with .Params.author | default .Site.Params.author }}
|
||||
<p class="tracked">
|
||||
By <strong>
|
||||
{{ if reflect.IsSlice . }}
|
||||
{{ $.Render "by" }} <strong>
|
||||
{{- if reflect.IsSlice . -}}
|
||||
{{ delimit . ", " | markdownify }}
|
||||
{{else}}
|
||||
{{- else -}}
|
||||
{{ . | markdownify }}
|
||||
{{ end }}
|
||||
{{- end -}}
|
||||
</strong>
|
||||
</p>
|
||||
{{ end }}
|
||||
|
|
Loading…
Reference in a new issue