feat(template/i18n): backend template render synchronous with frontend

This commit is contained in:
kumfo 2022-12-05 15:25:29 +08:00
parent 82f1e72483
commit e78747c172
1 changed files with 1 additions and 2 deletions

View File

@ -3,7 +3,6 @@ package controller
import ( import (
"encoding/json" "encoding/json"
"fmt" "fmt"
"github.com/segmentfault/pacman/i18n"
"html/template" "html/template"
"net/http" "net/http"
"regexp" "regexp"
@ -308,7 +307,7 @@ func (tc *TemplateController) html(ctx *gin.Context, code int, tpl string, siteI
data["siteinfo"] = siteInfo data["siteinfo"] = siteInfo
data["scriptPath"] = tc.scriptPath data["scriptPath"] = tc.scriptPath
data["cssPath"] = tc.cssPath data["cssPath"] = tc.cssPath
data["language"] = i18n.LanguageChinese //handler.GetLang(ctx) data["language"] = handler.GetLang(ctx)
data["timezone"] = siteInfo.Interface.TimeZone data["timezone"] = siteInfo.Interface.TimeZone
ctx.HTML(code, tpl, data) ctx.HTML(code, tpl, data)