mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2025-01-18 19:00:24 +00:00
i18n: add translation for default taxonomies #528
This commit is contained in:
parent
5936477bbd
commit
02b1ed997d
30 changed files with 294 additions and 5 deletions
|
@ -1,4 +1,5 @@
|
|||
+++
|
||||
categories = ["custom", "theming"]
|
||||
title = "Customization"
|
||||
weight = 25
|
||||
+++
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
+++
|
||||
categories = ["custom", "theming"]
|
||||
title = "Customizat'n"
|
||||
weight = 25
|
||||
+++
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
+++
|
||||
categories = "theming"
|
||||
disableMermaid = false
|
||||
title = "Stylesheet generator"
|
||||
weight = 26
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
+++
|
||||
categories = "theming"
|
||||
title = "Stylesheet generrrat'r"
|
||||
weight = 26
|
||||
+++
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
+++
|
||||
categories = "basic"
|
||||
disableToc = true
|
||||
title = "Requirements"
|
||||
weight = 10
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
+++
|
||||
categories = "basic"
|
||||
disableToc = true
|
||||
title = "Requirrrements"
|
||||
weight = 10
|
||||
|
|
12
i18n/ar.toml
12
i18n/ar.toml
|
@ -93,3 +93,15 @@ other = "{{.}} القائمة الفرعية"
|
|||
|
||||
[Subsections]
|
||||
other = "{{.}} الأقسام الفرعية"
|
||||
|
||||
[tags]
|
||||
other = "الكلمات الدالة"
|
||||
|
||||
[tag]
|
||||
other = "كلمة رئيسية"
|
||||
|
||||
[categories]
|
||||
other = "فئات"
|
||||
|
||||
[category]
|
||||
other = "فئة"
|
||||
|
|
12
i18n/cs.toml
12
i18n/cs.toml
|
@ -93,3 +93,15 @@ other = "Podmenu {{.}}"
|
|||
|
||||
[Subsections]
|
||||
other = "Podsekce {{.}}"
|
||||
|
||||
[tags]
|
||||
other = "Klíčová Slova"
|
||||
|
||||
[tag]
|
||||
other = "Klíčové Slovo"
|
||||
|
||||
[categories]
|
||||
other = "Kategorie"
|
||||
|
||||
[category]
|
||||
other = "Kategorie"
|
||||
|
|
12
i18n/de.toml
12
i18n/de.toml
|
@ -93,3 +93,15 @@ other = "Untermenu {{.}}"
|
|||
|
||||
[Subsections]
|
||||
other = "Unterabschnitte von {{.}}"
|
||||
|
||||
[tags]
|
||||
other = "Stichworte"
|
||||
|
||||
[tag]
|
||||
other = "Stichwort"
|
||||
|
||||
[categories]
|
||||
other = "Kategorien"
|
||||
|
||||
[category]
|
||||
other = "Kategorie"
|
||||
|
|
12
i18n/en.toml
12
i18n/en.toml
|
@ -93,3 +93,15 @@ other = "Submenu {{.}}"
|
|||
|
||||
[Subsections]
|
||||
other = "Subsections of {{.}}"
|
||||
|
||||
[tags]
|
||||
other = "Tags"
|
||||
|
||||
[tag]
|
||||
other = "Tag"
|
||||
|
||||
[categories]
|
||||
other = "Categories"
|
||||
|
||||
[category]
|
||||
other = "Category"
|
||||
|
|
12
i18n/es.toml
12
i18n/es.toml
|
@ -93,3 +93,15 @@ other = "Submenú {{.}}"
|
|||
|
||||
[Subsections]
|
||||
other = "Subsecciones de {{.}}"
|
||||
|
||||
[tags]
|
||||
other = "Etiquetas"
|
||||
|
||||
[tag]
|
||||
other = "Etiqueta"
|
||||
|
||||
[categories]
|
||||
other = "Categorías"
|
||||
|
||||
[category]
|
||||
other = "Categoría"
|
||||
|
|
12
i18n/fi.toml
12
i18n/fi.toml
|
@ -93,3 +93,15 @@ other = "Alavalikko {{.}}"
|
|||
|
||||
[Subsections]
|
||||
other = "Osa {{.}}"
|
||||
|
||||
[tags]
|
||||
other = "Tunnisteet"
|
||||
|
||||
[tag]
|
||||
other = "Tag"
|
||||
|
||||
[categories]
|
||||
other = "Luokat"
|
||||
|
||||
[category]
|
||||
other = "Kategoria"
|
||||
|
|
12
i18n/fr.toml
12
i18n/fr.toml
|
@ -93,3 +93,15 @@ other = "Sous-menu {{.}}"
|
|||
|
||||
[Subsections]
|
||||
other = "Sous-sections de {{.}}"
|
||||
|
||||
[tags]
|
||||
other = "Mots Clés"
|
||||
|
||||
[tag]
|
||||
other = "Mot Clé"
|
||||
|
||||
[categories]
|
||||
other = "Catégories"
|
||||
|
||||
[category]
|
||||
other = "Catégorie"
|
||||
|
|
12
i18n/hi.toml
12
i18n/hi.toml
|
@ -93,3 +93,15 @@ other = "सबमेनू {{.}}"
|
|||
|
||||
[Subsections]
|
||||
other = "{{.}} के उपखंड"
|
||||
|
||||
[tags]
|
||||
other = "टैग"
|
||||
|
||||
[tag]
|
||||
other = "उपनाम"
|
||||
|
||||
[categories]
|
||||
other = "श्रेणियाँ"
|
||||
|
||||
[category]
|
||||
other = "वर्ग"
|
||||
|
|
12
i18n/id.toml
12
i18n/id.toml
|
@ -93,3 +93,15 @@ other = "Submenu {{.}}"
|
|||
|
||||
[Subsections]
|
||||
other = "Subbagian {{.}}"
|
||||
|
||||
[tags]
|
||||
other = "Tag"
|
||||
|
||||
[tag]
|
||||
other = "Tag"
|
||||
|
||||
[categories]
|
||||
other = "Kategori"
|
||||
|
||||
[category]
|
||||
other = "Kategori"
|
||||
|
|
12
i18n/it.toml
12
i18n/it.toml
|
@ -93,3 +93,15 @@ other = "Sottomenu {{.}}"
|
|||
|
||||
[Subsections]
|
||||
other = "Sottosezioni di {{.}}"
|
||||
|
||||
[tags]
|
||||
other = "Tag"
|
||||
|
||||
[tag]
|
||||
other = "Tag"
|
||||
|
||||
[categories]
|
||||
other = "Categorie"
|
||||
|
||||
[category]
|
||||
other = "Categoria"
|
||||
|
|
12
i18n/ja.toml
12
i18n/ja.toml
|
@ -93,3 +93,15 @@ other = "サブメニュー {{.}}"
|
|||
|
||||
[Subsections]
|
||||
other = "{{.}}のサブセクション"
|
||||
|
||||
[tags]
|
||||
other = "タグ"
|
||||
|
||||
[tag]
|
||||
other = "タグ"
|
||||
|
||||
[categories]
|
||||
other = "カテゴリー"
|
||||
|
||||
[category]
|
||||
other = "カテゴリー"
|
||||
|
|
12
i18n/ko.toml
12
i18n/ko.toml
|
@ -96,3 +96,15 @@ other = "하위 메뉴 {{.}}"
|
|||
|
||||
[Subsections]
|
||||
other = "{{.}}의 하위 섹션"
|
||||
|
||||
[tags]
|
||||
other = "태그"
|
||||
|
||||
[tag]
|
||||
other = "태그"
|
||||
|
||||
[categories]
|
||||
other = "카테고리"
|
||||
|
||||
[category]
|
||||
other = "카테고리"
|
||||
|
|
12
i18n/nl.toml
12
i18n/nl.toml
|
@ -93,3 +93,15 @@ other = "Submenu {{.}}"
|
|||
|
||||
[Subsections]
|
||||
other = "Subsecties van {{.}}"
|
||||
|
||||
[tags]
|
||||
other = "Tags"
|
||||
|
||||
[tag]
|
||||
other = "Tag"
|
||||
|
||||
[categories]
|
||||
other = "Categorieën"
|
||||
|
||||
[category]
|
||||
other = "Categorie"
|
||||
|
|
|
@ -93,3 +93,15 @@ other = "Submenu {{.}}"
|
|||
|
||||
[Subsections]
|
||||
other = "Subsct'ns o' {{.}}"
|
||||
|
||||
[tags]
|
||||
other = "Taks"
|
||||
|
||||
[tag]
|
||||
other = "Tak"
|
||||
|
||||
[categories]
|
||||
other = "Categorrries"
|
||||
|
||||
[category]
|
||||
other = "Categorrry"
|
||||
|
|
12
i18n/pl.toml
12
i18n/pl.toml
|
@ -93,3 +93,15 @@ other = "Podmenu {{.}}"
|
|||
|
||||
[Subsections]
|
||||
other = "Podsekcje z {{.}}"
|
||||
|
||||
[tags]
|
||||
other = "Tagi"
|
||||
|
||||
[tag]
|
||||
other = "Tag"
|
||||
|
||||
[categories]
|
||||
other = "Kategorie"
|
||||
|
||||
[category]
|
||||
other = "Kategoria"
|
||||
|
|
12
i18n/pt.toml
12
i18n/pt.toml
|
@ -93,3 +93,15 @@ other = "Submenu {{.}}"
|
|||
|
||||
[Subsections]
|
||||
other = "Subsecções de {{.}}"
|
||||
|
||||
[tags]
|
||||
other = "Etiquetas"
|
||||
|
||||
[tag]
|
||||
other = "Etiqueta"
|
||||
|
||||
[categories]
|
||||
other = "Categorias"
|
||||
|
||||
[category]
|
||||
other = "Categoria"
|
||||
|
|
12
i18n/ru.toml
12
i18n/ru.toml
|
@ -93,3 +93,15 @@ other = "Подменю {{.}}"
|
|||
|
||||
[Subsections]
|
||||
other = "Подразделы {{.}}"
|
||||
|
||||
[tags]
|
||||
other = "Теги"
|
||||
|
||||
[tag]
|
||||
other = "Tag"
|
||||
|
||||
[categories]
|
||||
other = "Категории"
|
||||
|
||||
[category]
|
||||
other = "Категория"
|
||||
|
|
12
i18n/tr.toml
12
i18n/tr.toml
|
@ -93,3 +93,15 @@ other = "Alt menü {{.}}"
|
|||
|
||||
[Subsections]
|
||||
other = "{{.}} alt bölümleri"
|
||||
|
||||
[tags]
|
||||
other = "Etiketler"
|
||||
|
||||
[tag]
|
||||
other = "Etiket"
|
||||
|
||||
[categories]
|
||||
other = "Kategoriler"
|
||||
|
||||
[category]
|
||||
other = "Kategori"
|
||||
|
|
12
i18n/vi.toml
12
i18n/vi.toml
|
@ -96,3 +96,15 @@ other = "Menu con {{.}}"
|
|||
|
||||
[Subsections]
|
||||
other = "Tiểu mục của {{.}}"
|
||||
|
||||
[tags]
|
||||
other = "Thẻ"
|
||||
|
||||
[tag]
|
||||
other = "Nhãn"
|
||||
|
||||
[categories]
|
||||
other = "Thể loại"
|
||||
|
||||
[category]
|
||||
other = "Loại"
|
||||
|
|
|
@ -93,3 +93,15 @@ other = "子菜单{{.}}"
|
|||
|
||||
[Subsections]
|
||||
other = "{{.}} 的子部分"
|
||||
|
||||
[tags]
|
||||
other = "标签"
|
||||
|
||||
[tag]
|
||||
other = "标签"
|
||||
|
||||
[categories]
|
||||
other = "类别"
|
||||
|
||||
[category]
|
||||
other = "类别"
|
||||
|
|
|
@ -93,3 +93,15 @@ other = "子功能表{{.}}"
|
|||
|
||||
[Subsections]
|
||||
other = "{{.}} 的子部分"
|
||||
|
||||
[tags]
|
||||
other = "標籤"
|
||||
|
||||
[tag]
|
||||
other = "標籤"
|
||||
|
||||
[categories]
|
||||
other = "類別"
|
||||
|
||||
[category]
|
||||
other = "類別"
|
||||
|
|
12
i18n/zh.toml
12
i18n/zh.toml
|
@ -93,3 +93,15 @@ other = "子菜单{{.}}"
|
|||
|
||||
[Subsections]
|
||||
other = "{{.}} 的子部分"
|
||||
|
||||
[tags]
|
||||
other = "标签"
|
||||
|
||||
[tag]
|
||||
other = "标签"
|
||||
|
||||
[categories]
|
||||
other = "类别"
|
||||
|
||||
[category]
|
||||
other = "类别"
|
||||
|
|
|
@ -4,15 +4,25 @@
|
|||
{{- $page := . }}
|
||||
|
||||
{{- $title := "" }}
|
||||
{{- if eq .Kind "term" }}
|
||||
{{- $title = printf "%s %s " (.Data.Singular | humanize) (default "::" .Site.Params.titleSeparator) }}
|
||||
{{- if eq .Kind "taxonomy" }}
|
||||
{{- $title = i18n .Data.Plural }}
|
||||
{{- if not $title }}
|
||||
{{- $title = .Data.Plural | humanize }}
|
||||
{{- end }}
|
||||
{{- else }}
|
||||
{{- $title = i18n .Data.Singular }}
|
||||
{{- if not $title }}
|
||||
{{- $title = .Data.Singular | humanize }}
|
||||
{{- end }}
|
||||
{{- $title = printf "%s %s %s" $title (default "::" .Site.Params.titleSeparator) (.Title | humanize) }}
|
||||
{{- end }}
|
||||
{{- $title = printf "%s%s" $title .Title }}
|
||||
<h1 id="{{ $title | anchorize }}">{{ $title }}</h1>
|
||||
<ul>
|
||||
{{- range .Data.Terms.Alphabetical }}
|
||||
{{- $c:=""}}{{/* display terms of a taxonomy */}}
|
||||
{{- $len := 0 }}
|
||||
{{- range .Pages }}
|
||||
{{- $c:=""}}{{/* count pages of term */}}
|
||||
{{- if and .Title (or (ne (.Scratch.Get "relearnIsHiddenStem") true) (ne .Site.Params.disableTagHiddenPages true) ) }}
|
||||
{{- $len = add $len 1 }}
|
||||
{{- end }}
|
||||
|
@ -22,6 +32,7 @@
|
|||
{{- end }}
|
||||
{{- else }}
|
||||
{{- range sort .Pages "Title" }}
|
||||
{{- $c:=""}}{{/* display pages of a term */}}
|
||||
{{- if and .Title (or (ne (.Scratch.Get "relearnIsHiddenStem") true) (ne .Site.Params.disableTagHiddenPages true) ) }}
|
||||
<li><a href="{{ partial "relLangPrettyUglyURL.hugo" (dict "to" .) }}">{{ .Title }}</a></li>
|
||||
{{- end }}
|
||||
|
|
|
@ -14,7 +14,11 @@
|
|||
{{- if eq $outputFormat "searchpage" }}
|
||||
{{- $title = T "Search" }}
|
||||
{{- else if eq .Kind "term" }}
|
||||
{{- $title = printf "%s %s" (.Data.Singular | humanize) $title }}
|
||||
{{- $title = i18n .Data.Singular }}
|
||||
{{- if not $title }}
|
||||
{{- $title = .Data.Singular | humanize }}
|
||||
{{- end }}
|
||||
{{- $title = printf "%s %s %s" (.Title | humanize) (default "::" .Site.Params.titleSeparator) $title }}
|
||||
{{- end }}
|
||||
{{- if and $title .Site.Title (not (eq $title .Site.Title)) }}
|
||||
{{- $title = printf "%s %s %s" $title (default "::" .Site.Params.titleSeparator) .Site.Title }}
|
||||
|
@ -179,7 +183,11 @@
|
|||
{{- $depth = add $depth 1 }}
|
||||
{{- $title := $to.Title }}
|
||||
{{- if eq .Kind "term" }}
|
||||
{{- $title = printf "%s %s" (.Data.Singular | humanize) $title }}
|
||||
{{- $title = i18n .Data.Singular }}
|
||||
{{- if not $title }}
|
||||
{{- $title = .Data.Singular | humanize }}
|
||||
{{- end }}
|
||||
{{- $title = printf "%s %s %s" $title (default "::" .Site.Params.titleSeparator) ($to.Title | humanize) }}
|
||||
{{- end }}
|
||||
{{- if not $title }}
|
||||
{{- $title = $to.Site.Title }}
|
||||
|
|
Loading…
Reference in a new issue