From a57a8f991a2a5960fc886aa8bfcfca9719cecfda Mon Sep 17 00:00:00 2001 From: Arne Rief Date: Fri, 19 Sep 2025 19:20:39 +0200 Subject: Flat i18n tables --- layouts/404.html | 6 +++--- layouts/_default/all-posts.html | 4 ++-- layouts/_default/home.html | 2 +- layouts/_default/list.html | 6 +++--- layouts/_default/search.html | 12 ++++++------ layouts/partials/list/pagination.html | 12 ++++++------ layouts/partials/list/post-card.html | 6 +++--- layouts/partials/list/recent-posts.html | 6 +++--- layouts/partials/navmenu.html | 2 +- layouts/partials/select-theme.html | 6 +++--- layouts/partials/single/next-prev.html | 10 +++++----- layouts/partials/single/tags.html | 2 +- layouts/tags/list.html | 10 +++++----- layouts/tags/term.html | 12 ++++++------ 14 files changed, 48 insertions(+), 48 deletions(-) (limited to 'layouts') diff --git a/layouts/404.html b/layouts/404.html index 388844b..8e46d6d 100644 --- a/layouts/404.html +++ b/layouts/404.html @@ -1,10 +1,10 @@ {{- define "main" }}
-

{{ lang.Translate "404.title" | default "Page not found" }}

-

{{ lang.Translate "404.description" | default "The requested page does not exist" }}

+

{{ lang.Translate "404_title" | default "Page not found" }}

+

{{ lang.Translate "404_description" | default "The requested page does not exist" }}

- {{ lang.Translate "404.homepage" | default "Back to the homepage" }} + {{ lang.Translate "404_homepage" | default "Back to the homepage" }}

diff --git a/layouts/_default/all-posts.html b/layouts/_default/all-posts.html index 319a8d5..d2ce8ee 100644 --- a/layouts/_default/all-posts.html +++ b/layouts/_default/all-posts.html @@ -9,7 +9,7 @@ {{ . }} {{- else }} - {{- $description := or .Description (lang.Translate "posts.all_description" | default "All posts on this website, from newest to oldest.") }} + {{- $description := or .Description (lang.Translate "posts_all_description" | default "All posts on this website, from newest to oldest.") }}

{{ $description }}

@@ -29,7 +29,7 @@ {{ else }}

- {{ lang.Translate "posts.empty" | default "This site does not have any posts yet." }} + {{ lang.Translate "posts_empty" | default "This site does not have any posts yet." }}

{{- end }} diff --git a/layouts/_default/home.html b/layouts/_default/home.html index 031e3b5..880f124 100644 --- a/layouts/_default/home.html +++ b/layouts/_default/home.html @@ -16,7 +16,7 @@ {{- partial "list/recent-posts.html" (dict "count" 5 - "title" (lang.Translate "posts.recent" | default "Recent Articles") + "title" (lang.Translate "posts_recent" | default "Recent Articles") "show_view_all" true ) -}} diff --git a/layouts/_default/list.html b/layouts/_default/list.html index a8cb92a..fb53b40 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -9,14 +9,14 @@ {{ . }} {{- else }} - {{- $description := or .Description .Summary (lang.Translate "list.default_description" .Title | default (printf "All posts in %s" .Title)) }} + {{- $description := or .Description .Summary (lang.Translate "list_description" .Title | default (printf "All posts in %s" .Title)) }}

{{ $description }}

{{- end }} -
+
{{- /* 15 posts per site */ -}} {{- $paginator := .Paginate .Pages 15 }} {{- with $paginator.Pages }} @@ -29,7 +29,7 @@ {{ else }}

- {{ lang.Translate "list.empty" | default "No posts found in this section." }} + {{ lang.Translate "list_empty" | default "No posts found in this section." }}

{{- end }}
diff --git a/layouts/_default/search.html b/layouts/_default/search.html index 7ddaba2..90a6357 100644 --- a/layouts/_default/search.html +++ b/layouts/_default/search.html @@ -9,17 +9,17 @@ {{ . }} {{- else }} - {{- $description := or .Description (lang.Translate "search.description" | default "Find posts by search term.") }} + {{- $description := or .Description (lang.Translate "search_description" | default "Find posts by search term.") }}

{{ $description }}

{{- end }} -
+
diff --git a/layouts/partials/navmenu.html b/layouts/partials/navmenu.html index e833168..af0fc2e 100644 --- a/layouts/partials/navmenu.html +++ b/layouts/partials/navmenu.html @@ -11,7 +11,7 @@ Simplified version of the `hugo new template` menu.html default. Renders a menu {{- $menuID := .menuID }} {{- with index site.Menus $menuID }} -