Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gohugoio/hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/langs
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2022-04-21 11:59:13 +0300
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2022-04-28 00:53:56 +0300
commitfa80fe3c8ab523846178f94fdc65c997d8eef10c (patch)
tree4266bc03b2f594ffdb10b87d7956d2ed956f4bec /langs
parent11047534e47f2f2c710a6f8504d7415ff27d6024 (diff)
Some godoc adjustments and image struct renames
Diffstat (limited to 'langs')
-rw-r--r--langs/language.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/langs/language.go b/langs/language.go
index 244f6a743..a0294a103 100644
--- a/langs/language.go
+++ b/langs/language.go
@@ -55,21 +55,26 @@ type Language struct {
Title string
Weight int
+ // For internal use.
Disabled bool
// If set per language, this tells Hugo that all content files without any
// language indicator (e.g. my-page.en.md) is in this language.
// This is usually a path relative to the working dir, but it can be an
// absolute directory reference. It is what we get.
+ // For internal use.
ContentDir string
// Global config.
+ // For internal use.
Cfg config.Provider
// Language specific config.
+ // For internal use.
LocalCfg config.Provider
// Composite config.
+ // For internal use.
config.Provider
// These are params declared in the [params] section of the language merged with the
@@ -91,6 +96,7 @@ type Language struct {
initErr error
}
+// For internal use.
func (l *Language) String() string {
return l.Lang
}
@@ -233,6 +239,7 @@ func (l Languages) IsMultihost() bool {
// SetParam sets a param with the given key and value.
// SetParam is case-insensitive.
+// For internal use.
func (l *Language) SetParam(k string, v any) {
l.paramsMu.Lock()
defer l.paramsMu.Unlock()
@@ -245,6 +252,7 @@ func (l *Language) SetParam(k string, v any) {
// GetLocal gets a configuration value set on language level. It will
// not fall back to any global value.
// It will return nil if a value with the given key cannot be found.
+// For internal use.
func (l *Language) GetLocal(key string) any {
if l == nil {
panic("language not set")
@@ -256,6 +264,7 @@ func (l *Language) GetLocal(key string) any {
return nil
}
+// For internal use.
func (l *Language) Set(k string, v any) {
k = strings.ToLower(k)
if globalOnlySettings[k] {
@@ -265,11 +274,13 @@ func (l *Language) Set(k string, v any) {
}
// Merge is currently not supported for Language.
+// For internal use.
func (l *Language) Merge(key string, value any) {
panic("Not supported")
}
// IsSet checks whether the key is set in the language or the related config store.
+// For internal use.
func (l *Language) IsSet(key string) bool {
key = strings.ToLower(key)
if !globalOnlySettings[key] {