1
0
mirror of https://github.com/osmarks/mycorrhiza.git synced 2025-01-05 17:40:26 +00:00
This commit is contained in:
Timur Ismagilov 2022-05-18 20:18:30 +03:00
parent a0cd3bd621
commit fe7c1c482f

View File

@ -72,10 +72,9 @@ func Init() {
BaseRu = m(m(BaseEn.Clone()).Parse(ruText))
}
// TODO: get rid of this
func localizedBaseWithWeirdBody(meta Meta) *template.Template {
t := func() *template.Template {
if meta.Locale() == "_ru" {
if meta.Locale() == "ru" {
return BaseRu
}
return BaseEn
@ -103,6 +102,7 @@ func (bd *BaseData) withBaseValues(meta Meta, headerLinks []cfg.HeaderLink, comm
}
// Base is a temporary wrapper around BaseEn and BaseRu, meant to facilitate the migration from qtpl.
// TODO: get rid of this
func Base(meta Meta, title, body string, headElements ...string) string {
var w strings.Builder
meta.W = &w