fix tag translation
This commit is contained in:
parent
1a6d1ad114
commit
67b8ac5516
4 changed files with 39 additions and 4 deletions
|
|
@ -16,6 +16,12 @@ list:
|
||||||
one: Subsection
|
one: Subsection
|
||||||
other: Subsections
|
other: Subsections
|
||||||
|
|
||||||
|
categories:
|
||||||
|
other: Categories
|
||||||
|
|
||||||
|
tags:
|
||||||
|
other: Tags
|
||||||
|
|
||||||
article:
|
article:
|
||||||
back:
|
back:
|
||||||
other: Back
|
other: Back
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,12 @@ list:
|
||||||
many: Подразделы
|
many: Подразделы
|
||||||
other: Подразделы
|
other: Подразделы
|
||||||
|
|
||||||
|
categories:
|
||||||
|
other: Категории
|
||||||
|
|
||||||
|
tags:
|
||||||
|
other: Теги
|
||||||
|
|
||||||
article:
|
article:
|
||||||
back:
|
back:
|
||||||
other: Назад
|
other: Назад
|
||||||
|
|
|
||||||
|
|
@ -4,14 +4,27 @@
|
||||||
{{ if eq .Parent (.GetPage "/") }}
|
{{ if eq .Parent (.GetPage "/") }}
|
||||||
{{ T "list.section" }}
|
{{ T "list.section" }}
|
||||||
{{ else }}
|
{{ else }}
|
||||||
{{ .Parent.Title }}
|
{{ T (printf "list.%s" .Parent.Title | urlize | lower) }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
<div class="section-card">
|
<div class="section-card">
|
||||||
<div class="section-details">
|
<div class="section-details">
|
||||||
<h3 class="section-count">{{ T "list.page" (len .Pages) }}</h3>
|
<h3 class="section-count">{{ T "list.page" (len .Pages) }}</h3>
|
||||||
<h1 class="section-term">{{ .Title }}</h1>
|
|
||||||
|
{{- $title := lower .Title -}}
|
||||||
|
{{- $section := lower .Section -}}
|
||||||
|
|
||||||
|
{{- if eq $title $section -}}
|
||||||
|
{{- $title = T (printf "list.%s" .Title | urlize | lower) -}}
|
||||||
|
{{- else if eq $section "tags" -}}
|
||||||
|
{{- $title = T (printf "tags.%s" .Title | urlize | lower) -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- $title = .Title -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
<h1 class="section-term">{{ $title }}</h1>
|
||||||
|
|
||||||
{{ with .Params.description }}
|
{{ with .Params.description }}
|
||||||
<h2 class="section-description">{{ . }}</h2>
|
<h2 class="section-description">{{ . }}</h2>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,22 @@
|
||||||
<article>
|
<article>
|
||||||
<a href="{{ .RelPermalink }}">
|
<a href="{{ .RelPermalink }}">
|
||||||
<div class="article-details">
|
<div class="article-details">
|
||||||
|
|
||||||
|
{{- $title := lower .Title -}}
|
||||||
|
{{- $section := lower .Section -}}
|
||||||
|
|
||||||
|
{{- if eq $section "tags" -}}
|
||||||
|
{{- $title = T (printf "tags.%s" .Title | urlize | lower) -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- $title = .Title -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
<h2 class="article-title">
|
<h2 class="article-title">
|
||||||
{{- .Title -}}
|
{{- $title -}}
|
||||||
</h2>
|
</h2>
|
||||||
<footer class="article-time">
|
<footer class="article-time">
|
||||||
<time datetime='{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}'>
|
<time datetime='{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}'>
|
||||||
{{- .Date.Format (or .Site.Params.dateFormat.published "Jan 02, 2006") -}}
|
{{- time.Format "2 January 2006" .Date -}}
|
||||||
</time>
|
</time>
|
||||||
</footer>
|
</footer>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue