i18n: update i18n string format (#371)
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
{{- define "title" }}
|
||||
{{- .Params.Title | default (T .Section) | default .Section | string | printf (T "allSome" | string) }} - {{ .Site.Title -}}
|
||||
{{- .Params.Title | default (T .Section) | default .Section | dict "Some" | T "allSome" }} - {{ .Site.Title -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "content" -}}
|
||||
<div class="page archive">
|
||||
{{- /* Title */ -}}
|
||||
<h2 class="single-title animated pulse faster">
|
||||
{{- .Params.Title | default (T .Section) | default .Section | string | printf (T "allSome" | string) -}}
|
||||
{{- .Params.Title | default (T .Section) | default .Section | dict "Some" | T "allSome" -}}
|
||||
</h2>
|
||||
|
||||
{{- /* Paginate */ -}}
|
||||
@@ -25,7 +25,7 @@
|
||||
{{- .Title -}}
|
||||
</a>
|
||||
<span class="archive-item-date">
|
||||
{{- .Date.Format ($.Site.Params.section.dateFormat | default "01-02") -}}
|
||||
{{- $.Site.Params.section.dateFormat | default "01-02" | .Date.Format -}}
|
||||
</span>
|
||||
</article>
|
||||
{{- end -}}
|
||||
|
||||
@@ -23,22 +23,20 @@
|
||||
{{- partial "plugin/link.html" $options -}}
|
||||
</span>
|
||||
|
||||
{{- $publish_date := .PublishDate.Format (.Site.Params.dateFormat | default "2006-01-02") -}}
|
||||
<span class="post-publish">
|
||||
{{ T "publish" }} <time datetime={{ $publish_date }}>{{ $publish_date }}</time>
|
||||
</span>
|
||||
{{- with .Site.Params.dateFormat | default "2006-01-02" | .PublishDate.Format -}}
|
||||
<span class="post-publish">
|
||||
{{- printf `<time datetime="%v">%v</time>` . . | dict "Date" | T "publishedOnDate" | safeHTML -}}
|
||||
</span>
|
||||
{{- end -}}
|
||||
|
||||
{{- with .Params.categories -}}
|
||||
|
||||
<span class="post-category">
|
||||
{{- T "included" -}}
|
||||
{{- range $index, $value := . -}}
|
||||
{{- if gt $index 0 }} {{ end -}}
|
||||
{{- $category := $value | anchorize | printf "/categories/%s" | $.Site.GetPage -}}
|
||||
<a href="{{ $category.RelPermalink }}">
|
||||
<i class="far fa-folder fa-fw"></i>{{ $category.Title }}
|
||||
</a>
|
||||
{{- end -}}
|
||||
{{- $categories := slice -}}
|
||||
{{- range .Params.categories -}}
|
||||
{{- $category := . | anchorize | printf "/categories/%v" | $.Site.GetPage -}}
|
||||
{{- $categories = $categories | append (printf `<a href="%v"><i class="far fa-folder fa-fw"></i>%v</a>` $category.RelPermalink $category.Title) -}}
|
||||
{{- end -}}
|
||||
{{- with delimit $categories " " -}}
|
||||
<span class="post-category">
|
||||
{{- dict "Categories" . | T "includedInCategories" | safeHTML -}}
|
||||
</span>
|
||||
{{- end -}}
|
||||
</div>
|
||||
@@ -60,7 +58,7 @@
|
||||
<i class="fas fa-tags fa-fw"></i>
|
||||
{{- range $index, $value := . -}}
|
||||
{{- if gt $index 0 }}, {{ end -}}
|
||||
{{- $tag := $value | anchorize | printf "/tags/%s" | $.Site.GetPage -}}
|
||||
{{- $tag := $value | anchorize | printf "/tags/%v" | $.Site.GetPage -}}
|
||||
<a href="{{ $tag.RelPermalink }}">{{ $tag.Title }}</a>
|
||||
{{- end -}}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user