Make it possible to configure Blackfroday per language

See #2309
This commit is contained in:
Bjørn Erik Pedersen
2016-08-07 14:03:03 +02:00
parent 596e0e98e4
commit 2079a23dd8
21 changed files with 324 additions and 189 deletions

View File

@@ -13,10 +13,6 @@
package hugolib
import (
jww "github.com/spf13/jwalterweatherman"
)
// Translations represent the other translations for a given page. The
// string here is the language code, as affected by the `post.LANG.md`
// filename.
@@ -38,17 +34,6 @@ func pagesToTranslationsMap(ml *Multilingual, pages []*Page) map[string]Translat
continue
}
language := ml.Language(pageLang)
if language == nil {
// 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
pageTranslation[pageLang] = page
out[base] = pageTranslation
}