rename I18n to I18nWeb

This commit is contained in:
Hamidreza Ghavami
2023-05-21 03:29:27 +04:30
parent 786a3ac992
commit d9b1b200ce
8 changed files with 46 additions and 46 deletions

View File

@@ -38,12 +38,12 @@ func jsonMsgObj(c *gin.Context, msg string, obj interface{}, err error) {
if err == nil {
m.Success = true
if msg != "" {
m.Msg = msg + WebI18n(c, "success")
m.Msg = msg + I18nWeb(c, "success")
}
} else {
m.Success = false
m.Msg = msg + WebI18n(c, "fail") + ": " + err.Error()
logger.Warning(msg+WebI18n(c, "fail")+": ", err)
m.Msg = msg + I18nWeb(c, "fail") + ": " + err.Error()
logger.Warning(msg+I18nWeb(c, "fail")+": ", err)
}
c.JSON(http.StatusOK, m)
}