diff options
| author | Hamidreza Ghavami <70919649+hamid-gh98@users.noreply.github.com> | 2023-05-21 01:59:27 +0300 |
|---|---|---|
| committer | Hamidreza Ghavami <70919649+hamid-gh98@users.noreply.github.com> | 2023-05-21 01:59:27 +0300 |
| commit | d9b1b200cebb82087037d505f13151dd425577a6 (patch) | |
| tree | d9c631ac7491d7216300455fcae9867a6395dae4 /web/controller/base.go | |
| parent | 786a3ac992043e1e1ca398d4b408e34d9ae46973 (diff) | |
rename I18n to I18nWeb
Diffstat (limited to 'web/controller/base.go')
| -rw-r--r-- | web/controller/base.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/web/controller/base.go b/web/controller/base.go index 53c80f07..674a195d 100644 --- a/web/controller/base.go +++ b/web/controller/base.go @@ -15,7 +15,7 @@ type BaseController struct { func (a *BaseController) checkLogin(c *gin.Context) { if !session.IsLogin(c) { if isAjax(c) { - pureJsonMsg(c, false, WebI18n(c, "pages.login.loginAgain")) + pureJsonMsg(c, false, I18nWeb(c, "pages.login.loginAgain")) } else { c.Redirect(http.StatusTemporaryRedirect, c.GetString("base_path")) } @@ -25,7 +25,7 @@ func (a *BaseController) checkLogin(c *gin.Context) { } } -func WebI18n(c *gin.Context, name string, params ...string) string { +func I18nWeb(c *gin.Context, name string, params ...string) string { anyfunc, funcExists := c.Get("I18n") if !funcExists { logger.Warning("I18n function not exists in gin context!") |
