update for init i18n

This commit is contained in:
shiqstone
2021-04-21 22:00:03 +08:00
parent 0fb6fcb114
commit f02ff935fe
6 changed files with 27 additions and 8 deletions

View File

@@ -528,7 +528,7 @@ func (c *BookController) Create() {
book.Editor = "markdown"
book.Theme = "default"
if err := book.Insert(); err != nil {
if err := book.Insert(c.Lang); err != nil {
logs.Error("Insert => ", err)
c.JsonResult(6005, i18n.Tr(c.Lang, "message.failed"))
}