Fix toasts (#2571)

* Add space to toast status messages

* Removed opening space from translations
This commit is contained in:
Vyacheslav Scherbinin 2024-09-30 22:06:38 +07:00 committed by GitHub
parent cdb6eac0e6
commit 27434f3235
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 26 additions and 26 deletions

View file

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