update :translate base cotroller

This commit is contained in:
Mohammad Foroughi
2022-10-31 13:29:07 +03:30
parent 2b5fd5cab8
commit d6f8c9d95a
3 changed files with 3 additions and 1 deletions

View File

@@ -12,7 +12,7 @@ type BaseController struct {
func (a *BaseController) checkLogin(c *gin.Context) {
if !session.IsLogin(c) {
if isAjax(c) {
pureJsonMsg(c, false, "登录时效已过,请重新登录")
pureJsonMsg(c, false, I18n(c , "pages.login.loginAgain"))
} else {
c.Redirect(http.StatusTemporaryRedirect, c.GetString("base_path"))
}

View File

@@ -51,6 +51,7 @@
[pages.login]
"title" = "Login"
"loginAgain" = "The login time limit has expired, please log in again"
[pages.login.toasts]
"invalidFormData" = "Input Data Format Is Invalid"

View File

@@ -49,6 +49,7 @@
[pages.login]
"title" = "登录"
"loginAgain" = "登录时效已过,请重新登录"
[pages.login.toasts]
"invalidFormData" = "数据格式错误"