From 1ddfe4aba3ff16df9e5006051407d2488ffe4a59 Mon Sep 17 00:00:00 2001 From: "Shishkevich D." <135337715+shishkevichd@users.noreply.github.com> Date: Fri, 9 May 2025 10:46:29 +0700 Subject: chore: toasts translation refactoring --- web/controller/util.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'web/controller/util.go') diff --git a/web/controller/util.go b/web/controller/util.go index 40c7a8e9..a77d0e35 100644 --- a/web/controller/util.go +++ b/web/controller/util.go @@ -42,11 +42,11 @@ func jsonMsgObj(c *gin.Context, msg string, obj any, err error) { if err == nil { m.Success = true if msg != "" { - m.Msg = msg + " " + I18nWeb(c, "success") + m.Msg = msg } } else { m.Success = false - m.Msg = msg + " " + I18nWeb(c, "fail") + ": " + err.Error() + m.Msg = msg + " (" + err.Error() + ")" logger.Warning(msg+" "+I18nWeb(c, "fail")+": ", err) } c.JSON(http.StatusOK, m) -- cgit v1.2.3