A Q&A platform software for teams at any scales. Whether it's a community forum, help center, or knowledge management platform, you can always count on Apache Answer.
feat(template/i18n): backend template render synchronous with frontend
kumfoe78747c172f0
diff --git a/internal/controller/template_controller.go b/internal/controller/template_controller.goindex c986ad4e..d78f6a73 100644--- a/internal/controller/template_controller.go+++ b/internal/controller/template_controller.go@@ -3,7 +3,6 @@ package controllerimport ("encoding/json""fmt"- "github.com/segmentfault/pacman/i18n""html/template""net/http""regexp"@@ -308,7 +307,7 @@ func (tc *TemplateController) html(ctx *gin.Context, code int, tpl string, siteIdata["siteinfo"] = siteInfodata["scriptPath"] = tc.scriptPathdata["cssPath"] = tc.cssPath- data["language"] = i18n.LanguageChinese //handler.GetLang(ctx)+ data["language"] = handler.GetLang(ctx)data["timezone"] = siteInfo.Interface.TimeZonectx.HTML(code, tpl, data)