From d6f8c9d95af329ecfc44ea37f26c8186a0c18774 Mon Sep 17 00:00:00 2001 From: Mohammad Foroughi Date: Mon, 31 Oct 2022 13:29:07 +0330 Subject: [PATCH] update :translate base cotroller --- web/controller/base.go | 2 +- web/translation/translate.en_US.toml | 1 + web/translation/translate.zh_Hans.toml | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) 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" = "数据格式错误"