diff --git a/web/controller/base.go b/web/controller/base.go index 26e7422b..f0cbd1ae 100644 --- a/web/controller/base.go +++ b/web/controller/base.go @@ -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")) } diff --git a/web/translation/translate.en_US.toml b/web/translation/translate.en_US.toml index a16d0f09..f6fbfa80 100644 --- a/web/translation/translate.en_US.toml +++ b/web/translation/translate.en_US.toml @@ -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" diff --git a/web/translation/translate.zh_Hans.toml b/web/translation/translate.zh_Hans.toml index 0bbd9f4b..8196ae4b 100644 --- a/web/translation/translate.zh_Hans.toml +++ b/web/translation/translate.zh_Hans.toml @@ -49,6 +49,7 @@ [pages.login] "title" = "登录" +"loginAgain" = "登录时效已过,请重新登录" [pages.login.toasts] "invalidFormData" = "数据格式错误"