add default text for translation keys in blog card, categories, tags, and single layouts

This commit is contained in:
Somrat 2025-12-15 16:42:04 +06:00
parent 5c246437ce
commit 951d40c11f
4 changed files with 8 additions and 6 deletions

View file

@ -32,6 +32,6 @@
{{ end }}
<p class="mb-6">{{ .Summary | plainify }}</p>
<a class="btn btn-outline-primary btn-sm" href="{{ .RelPermalink }}">
{{ T "read_more" }}
{{ T "read_more" | default "Read More" }}
</a>
</div>

View file

@ -2,7 +2,7 @@
{{ if isset site.Taxonomies "categories" }}
{{ if not (eq (len site.Taxonomies.categories) 0) }}
<div class="mb-8">
<h5 class="mb-6">{{ T "categories" }}</h5>
<h5 class="mb-6">{{ T "categories" | default "Categories" }}</h5>
<div class="bg-light dark:bg-darkmode-light rounded p-8">
<ul class="space-y-4">
{{ range $name, $items := site.Taxonomies.categories }}

View file

@ -2,7 +2,7 @@
{{ if isset site.Taxonomies "tags" }}
{{ if not (eq (len site.Taxonomies.tags) 0) }}
<div class="mb-8">
<h5 class="mb-6">{{ T "tags" }}</h5>
<h5 class="mb-6">{{ T "tags" | default "Tags" }}</h5>
<div class="bg-light dark:bg-darkmode-light rounded p-6">
<ul>
{{ range $name, $items := site.Taxonomies.tags }}

View file

@ -48,7 +48,7 @@
{{ $tags:= .Params.tags }}
{{ if $tags }}
<div class="lg:col-6 mb-10 flex items-center lg:mb-0">
<h5 class="mr-3">{{ T "tags" }} :</h5>
<h5 class="mr-3">{{ T "tags" | default "Tags" }} :</h5>
<ul>
{{ range $i,$p:= $tags }}
<li class="inline-block">
@ -63,7 +63,7 @@
</div>
{{ end }}
<div class="lg:col-6 flex items-center lg:justify-end">
<h5>{{ T "share" }} :</h5>
<h5>{{ T "share" | default "Share" }} :</h5>
{{ partial "social-share" (dict "Context" . "Class" "share-icons" "Title" .Title "Whatsapp" false "Telegram" false "Linkedin" false "Pinterest" false "Tumblr" false "Vk" false "Reddit" false) }}
</div>
</div>
@ -81,7 +81,9 @@
{{ $related = $related | shuffle | first 3 }}
{{ with $related }}
<div class="section pb-0">
<h2 class="h3 mb-12">{{ T "related_posts" }}</h2>
<h2 class="h3 mb-12">
{{ T "related_posts" | default "Related Posts" }}
</h2>
<div class="row">
{{ range . }}
<div class="lg:col-4 md:col-6 mb-14">