aboutsummaryrefslogtreecommitdiffhomepage
path: root/langs
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <[email protected]>2023-05-17 13:12:49 +0200
committerBjørn Erik Pedersen <[email protected]>2023-05-17 22:13:29 +0200
commit05542130ba0205d3d8d14575b7e49ed42a855b9a (patch)
treebb94df8ba48b349bdcb18d254af51a38722bef13 /langs
parent5251f015bfff40b49f92f8855834d5682f925860 (diff)
downloadhugo-05542130ba0205d3d8d14575b7e49ed42a855b9a.tar.gz
hugo-05542130ba0205d3d8d14575b7e49ed42a855b9a.zip
Handle transient errors in config loading etc.
As in: Get the Kubernetes site to build with the new Hugo version. Updates #10947
Diffstat (limited to 'langs')
-rw-r--r--langs/language.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/langs/language.go b/langs/language.go
index 5bf80274d..232331cae 100644
--- a/langs/language.go
+++ b/langs/language.go
@@ -87,7 +87,8 @@ var DeprecationFunc = func(item, alternative string, err bool) {}
const paramsDeprecationWarning = `.Language.Params is deprecated and will be removed in a future release. Use site.Params instead.
-Also, for all but custom parameters, you need to use the built in Hugo variables, e.g. site.Title, site.LanguageCode; site.Language.Params.Title will not work.
+- For all but custom parameters, you need to use the built in Hugo variables, e.g. site.Title, site.LanguageCode; site.Language.Params.Title will not work.
+- All custom parameters needs to be placed below params, e.g. [languages.en.params] in TOML.
See https://gohugo.io/content-management/multilingual/#changes-in-hugo-01120
@@ -111,6 +112,10 @@ func (l *Language) loadLocation(tzStr string) error {
return nil
}
+func (l *Language) String() string {
+ return l.Lang
+}
+
// Languages is a sortable list of languages.
type Languages []*Language