summaryrefslogtreecommitdiffstats
path: root/hugolib/translations.go
diff options
context:
space:
mode:
Diffstat (limited to 'hugolib/translations.go')
-rw-r--r--hugolib/translations.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/hugolib/translations.go b/hugolib/translations.go
index 724f6a594..267545f37 100644
--- a/hugolib/translations.go
+++ b/hugolib/translations.go
@@ -14,7 +14,7 @@
package hugolib
import (
- "fmt"
+ jww "github.com/spf13/jwalterweatherman"
)
// Translations represent the other translations for a given page. The
@@ -41,7 +41,10 @@ func pagesToTranslationsMap(ml *Multilingual, pages []*Page) map[string]Translat
language := ml.Language(pageLang)
if language == nil {
- panic(fmt.Sprintf("Page language not found in multilang setup: %s", pageLang))
+ // TODO(bep) ml
+ // This may or may not be serious. It can be a file named stefano.chiodino.md.
+ jww.WARN.Printf("Page language (if it is that) not found in multilang setup: %s.", pageLang)
+ language = ml.DefaultLang
}
page.language = language