fix: migrate deprecated Hugo v0.158.0 language API

Replace deprecated config keys and template methods per Hugo v0.158.0:

Config (10 files):
- languageCode → locale
- languageName → label

Templates:
- site.LanguageCode → site.Language.Locale (baseof.html, head.html, schema.html x2)
- site.Language.Lang → site.Language.Name (single.html)
- .Lang → .Language.Name (likes.html, views.html)

Ref: https://discourse.gohugo.io/t/deprecations-in-v0-158-0/56869
This commit is contained in:
Eric Gusmao
2026-03-25 11:02:54 -03:00
parent b0c563bc15
commit 7c127074f9
16 changed files with 27 additions and 27 deletions
@@ -1,5 +1,5 @@
languageCode = "de"
languageName = "Deutsch"
locale = "de"
label = "Deutsch"
weight = 3
title = "Blowfish"
@@ -1,5 +1,5 @@
languageCode = "en"
languageName = "English"
locale = "en"
label = "English"
weight = 1
title = "Blowfish"
@@ -1,5 +1,5 @@
languageCode = "es"
languageName = "Español"
locale = "es"
label = "Español"
weight = 6
title = "Blowfish"
@@ -1,5 +1,5 @@
languageCode = "fr"
languageName = "Français"
locale = "fr"
label = "Français"
weight = 2
title = "Blowfish"
@@ -1,5 +1,5 @@
languageCode = "it"
languageName = "Italiano"
locale = "it"
label = "Italiano"
weight = 4
title = "Blowfish"
@@ -1,5 +1,5 @@
languageCode = "ja"
languageName = "日本語"
locale = "ja"
label = "日本語"
weight = 8
title = "Blowfish"
@@ -1,5 +1,5 @@
languageCode = "pt-br"
languageName = "Português (Brasil)"
locale = "pt-br"
label = "Português (Brasil)"
weight = 6
title = "Blowfish"
@@ -1,5 +1,5 @@
languageCode = "pt-pt"
languageName = "Português (Portugal)"
locale = "pt-pt"
label = "Português (Portugal)"
weight = 5
title = "Blowfish"
@@ -1,5 +1,5 @@
languageCode = "zh-cn"
languageName = "简体中文"
locale = "zh-cn"
label = "简体中文"
weight = 9
title = "Blowfish"