0.158.0 deprecations (#805)

* 0.158.0 changes - using same capitalization as huge docs

* LanguageCode -> Locale
LanguageDirection -> Direction
LanguageName -> Label

* language.lang to language.name

* all changed functions added in 0.158.0
This commit is contained in:
nick n.
2026-04-07 19:57:40 +02:00
committed by GitHub
parent 751bde097b
commit 4f0e89c4ed
13 changed files with 26 additions and 26 deletions
+5 -5
View File
@@ -2,11 +2,11 @@
{{ $translations := dict }}
{{ if (eq $bookTranslatedOnly false ) }}
{{ range .Site.Home.Translations }}
{{ $translations = merge $translations (dict .Language.Lang .) }}
{{ $translations = merge $translations (dict .Language.Name .) }}
{{ end }}
{{ end }}
{{ range .Translations }}
{{ $translations = merge $translations (dict .Language.Lang .) }}
{{ $translations = merge $translations (dict .Language.Name .) }}
{{ end }}
<ul class="book-languages">
@@ -15,16 +15,16 @@
<label for="languages" class="flex">
<a role="button">
<img src="{{ partial "docs/icon" "translate" }}" class="book-icon" alt="{{ partial "docs/text/i18n" "Languages" }}" />
{{ $.Site.Language.LanguageName }}
{{ $.Site.Language.Label }}
</a>
<img src="{{ partial "docs/icon" "chevron-right" }}" class="book-icon" alt="{{ partial "docs/text/i18n" "Expand" }}" />
</label>
<ul>
{{ range .Site.Languages }}{{ with index $translations .Lang }}
{{ range .Site.Languages }}{{ with index $translations .Name }}
<li>
<a href="{{ cond hugo.IsMultihost .Permalink .RelPermalink }}" class="flex flex-auto">
{{ .Language.LanguageName }}
{{ .Language.Label }}
</a>
</li>
{{ end }}{{ end }}