From 6b71b94a490aa84ae00809c438eda1b75052e530 Mon Sep 17 00:00:00 2001 From: Niki Hansche Date: Wed, 8 Aug 2018 20:19:23 +0200 Subject: [PATCH 1/2] Add ".Site.Params.Dateformat" configuration MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use ".Site.Params.Dateformat" for formatiing of dates. If it isn’t configured stay with the default ""January 2, 2006". --- layouts/_default/single.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 89b61b2..7f5df62 100755 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -19,7 +19,7 @@ {{/* Hugo uses Go's date formatting is set by example. Here are two formats */}} From e49028e3c4a3da3be8d8a3c27b657ca83e7e6893 Mon Sep 17 00:00:00 2001 From: Niki Hansche Date: Wed, 8 Aug 2018 20:30:24 +0200 Subject: [PATCH 2/2] Add i18n for german and english Translations are in i18n/*.toml. --- i18n/de.toml | 20 ++++++++++++++++++++ i18n/en.toml | 20 ++++++++++++++++++++ layouts/_default/taxonomy.html | 2 +- layouts/index.html | 6 +++--- layouts/partials/menu-contextual.html | 16 ++++++++-------- layouts/partials/site-navigation.html | 2 +- layouts/partials/summary-with-image.html | 2 +- 7 files changed, 54 insertions(+), 14 deletions(-) create mode 100644 i18n/de.toml create mode 100644 i18n/en.toml diff --git a/i18n/de.toml b/i18n/de.toml new file mode 100644 index 0000000..23f2540 --- /dev/null +++ b/i18n/de.toml @@ -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 }}“" diff --git a/i18n/en.toml b/i18n/en.toml new file mode 100644 index 0000000..0fd9eed --- /dev/null +++ b/i18n/en.toml @@ -0,0 +1,20 @@ +[Recent] +other = "Recent" + +[All] +other = "All" + +[More] +other = "More" + +[Whatsinthis] +other = "What’s in this" + +[readmore] +other = "read more" + +[page] +other = "page" + +[Belowyouwillfindpagesthatutilizethetaxonomyterm] +other = "Below you will find pages that utilize the taxonomy term „{{ .Title }}“" diff --git a/layouts/_default/taxonomy.html b/layouts/_default/taxonomy.html index e2d1505..724a4ae 100644 --- a/layouts/_default/taxonomy.html +++ b/layouts/_default/taxonomy.html @@ -1,7 +1,7 @@ {{ define "main" }}
diff --git a/layouts/index.html b/layouts/index.html index 3480c04..d15a3db 100755 --- a/layouts/index.html +++ b/layouts/index.html @@ -16,7 +16,7 @@ {{/* Use $section_name to get the section title. Use "with" to only show it if it exists */}} {{ with .Site.GetPage "section" $section_name }}

- Recent {{ .Title }} + {{ T "Recent" }} {{ .Title }}

{{ end }} @@ -33,7 +33,7 @@ {{ if ge $section_count (add $n_posts 1) }}
-

More

+

{{ T "More" }}

{{/* 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)) }}

@@ -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 */}} {{ with .Site.GetPage "section" $section_name }} - All {{.Title }} + {{T "All" }} {{.Title }} {{ end }}

{{ end }} diff --git a/layouts/partials/menu-contextual.html b/layouts/partials/menu-contextual.html index 02fa3ee..37b93ce 100644 --- a/layouts/partials/menu-contextual.html +++ b/layouts/partials/menu-contextual.html @@ -5,7 +5,7 @@ {{- if .Params.toc -}} {{- end -}} @@ -21,13 +21,13 @@ {{ end }} diff --git a/layouts/partials/site-navigation.html b/layouts/partials/site-navigation.html index 65b82de..428dd3b 100644 --- a/layouts/partials/site-navigation.html +++ b/layouts/partials/site-navigation.html @@ -8,7 +8,7 @@