Add i18n for german and english

Translations are in i18n/*.toml.
This commit is contained in:
Niki Hansche 2018-08-08 20:30:24 +02:00
parent 6b71b94a49
commit e49028e3c4
7 changed files with 54 additions and 14 deletions

20
i18n/de.toml Normal file
View File

@ -0,0 +1,20 @@
[Recent]
other = "Letzte"
[All]
other = "Alle"
[More]
other = "Mehr"
[Whatsinthis]
other = "Was ist in diesem"
[readmore]
other = "mehr lesen"
[page]
other = "Seite"
[Belowyouwillfindpagesthatutilizethetaxonomyterm]
other = "Seiten zur Taxonomy „{{ .Title }}“"

20
i18n/en.toml Normal file
View File

@ -0,0 +1,20 @@
[Recent]
other = "Recent"
[All]
other = "All"
[More]
other = "More"
[Whatsinthis]
other = "Whats in this"
[readmore]
other = "read more"
[page]
other = "page"
[Belowyouwillfindpagesthatutilizethetaxonomyterm]
other = "Below you will find pages that utilize the taxonomy term „{{ .Title }}“"

View File

@ -1,7 +1,7 @@
{{ define "main" }} {{ define "main" }}
<article class="cf pa3 pa4-m pa4-l"> <article class="cf pa3 pa4-m pa4-l">
<div class="measure-wide-l center f4 lh-copy nested-copy-line-height nested-links nested-img mid-gray"> <div class="measure-wide-l center f4 lh-copy nested-copy-line-height nested-links nested-img mid-gray">
<p>Below you will find pages that utilize the taxonomy term “{{ .Title }}”</p> <p>{{ T "Belowyouwillfindpagesthatutilizethetaxonomyterm" . }}”</p>
</div> </div>
</article> </article>
<div class="mw8 center"> <div class="mw8 center">

View File

@ -16,7 +16,7 @@
{{/* Use $section_name to get the section title. Use "with" to only show it if it exists */}} {{/* Use $section_name to get the section title. Use "with" to only show it if it exists */}}
{{ with .Site.GetPage "section" $section_name }} {{ with .Site.GetPage "section" $section_name }}
<h1 class="flex-none"> <h1 class="flex-none">
Recent {{ .Title }} {{ T "Recent" }} {{ .Title }}
</h1> </h1>
{{ end }} {{ end }}
@ -33,7 +33,7 @@
{{ if ge $section_count (add $n_posts 1) }} {{ if ge $section_count (add $n_posts 1) }}
<section class="w-100"> <section class="w-100">
<h1 class="f3">More</h1> <h1 class="f3">{{ T "More" }}</h1>
{{/* Now, range through the next four after the initial $n_posts items. Nest the requirements, "after" then "first" on the outside */}} {{/* Now, range through the next four after the initial $n_posts items. Nest the requirements, "after" then "first" on the outside */}}
{{ range (first 4 (after $n_posts $section)) }} {{ range (first 4 (after $n_posts $section)) }}
<h2 class="f5 fw4 mb4 dib mr3"> <h2 class="f5 fw4 mb4 dib mr3">
@ -45,7 +45,7 @@
{{/* As above, Use $section_name to get the section title, and URL. Use "with" to only show it if it exists */}} {{/* As above, Use $section_name to get the section title, and URL. Use "with" to only show it if it exists */}}
{{ with .Site.GetPage "section" $section_name }} {{ with .Site.GetPage "section" $section_name }}
<a href="{{ .URL }}" class="link db f6 pa2 br3 bg-mid-gray white dim w4 tc">All {{.Title }}</a> <a href="{{ .URL }}" class="link db f6 pa2 br3 bg-mid-gray white dim w4 tc">{{T "All" }} {{.Title }}</a>
{{ end }} {{ end }}
</section> </section>
{{ end }} {{ end }}

View File

@ -5,7 +5,7 @@
{{- if .Params.toc -}} {{- if .Params.toc -}}
<div class="bg-light-gray pa3 nested-list-reset nested-copy-line-height nested-links"> <div class="bg-light-gray pa3 nested-list-reset nested-copy-line-height nested-links">
<p class="f5 b mb3">What's in this {{ humanize .Type }}</p> <p class="f5 b mb3">{{ T "Whatsinthis" }} {{ humanize .Type }}</p>
{{ .TableOfContents }} {{ .TableOfContents }}
</div> </div>
{{- end -}} {{- end -}}
@ -21,13 +21,13 @@
<div class="bg-light-gray pa3 nested-list-reset nested-copy-line-height nested-links"> <div class="bg-light-gray pa3 nested-list-reset nested-copy-line-height nested-links">
<p class="f5 b mb3">Related</p> <p class="f5 b mb3">Related</p>
<ul class="pa0 list"> <ul class="pa0 list">
{{ range . }} {{ range . }}
<li class="mb2"> <li class="mb2">
<a href="{{ .RelPermalink }}"> <a href="{{ .RelPermalink }}">
{{- .Title -}} {{- .Title -}}
</a> </a>
</li> </li>
{{ end }} {{ end }}
</ul> </ul>
</div> </div>
{{ end }} {{ end }}

View File

@ -8,7 +8,7 @@
<ul class="pl0 mr3"> <ul class="pl0 mr3">
{{ range .Site.Menus.main }} {{ range .Site.Menus.main }}
<li class="list f5 f4-ns fw4 dib pr3"> <li class="list f5 f4-ns fw4 dib pr3">
<a class="hover-white no-underline white-90" href="{{ .URL }}" title="{{ .Name }} page"> <a class="hover-white no-underline white-90" href="{{ .URL }}" title="{{ .Name }}-{{ T "page" }}">
{{ .Name }} {{ .Name }}
</a> </a>
</li> </li>

View File

@ -20,7 +20,7 @@
<div class="f6 f5-l lh-copy nested-copy-line-height nested-links"> <div class="f6 f5-l lh-copy nested-copy-line-height nested-links">
{{ .Summary }} {{ .Summary }}
</div> </div>
<a href="{{.URL}}" class="ba b--moon-gray bg-light-gray br2 color-inherit dib f7 hover-bg-moon-gray link mt2 ph2 pv1">{{$.Param "read_more_copy" | default "read more" }}</a> <a href="{{.URL}}" class="ba b--moon-gray bg-light-gray br2 color-inherit dib f7 hover-bg-moon-gray link mt2 ph2 pv1">{{$.Param "read_more_copy" | default (T "readmore") }}</a>
{{/* TODO: add author {{/* TODO: add author
<p class="f6 lh-copy mv0">By {{ .Author }}</p> */}} <p class="f6 lh-copy mv0">By {{ .Author }}</p> */}}
</div> </div>