mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-02 03:00:18 +08:00
feat: support i18n in backend err messages (#1232)
* feat: support i18n in backend err messages * use gofumpt to fmt code * fix review problems * support auto generate err message * delete beego/i18n moudle * fix Github action test problems * fix review problems * use gofumpt to format code * use gofumpt to fmt code
This commit is contained in:
@ -86,7 +86,7 @@ func (c *ApiController) GetUserApplication() {
|
||||
id := c.Input().Get("id")
|
||||
user := object.GetUser(id)
|
||||
if user == nil {
|
||||
c.ResponseError(fmt.Sprintf("The user: %s doesn't exist", id))
|
||||
c.ResponseError(fmt.Sprintf(c.T("UserErr.DoNotExist"), id))
|
||||
return
|
||||
}
|
||||
|
||||
@ -107,7 +107,7 @@ func (c *ApiController) GetOrganizationApplications() {
|
||||
organization := c.Input().Get("organization")
|
||||
|
||||
if organization == "" {
|
||||
c.ResponseError("Parameter organization is missing")
|
||||
c.ResponseError(c.T("ParameterErr.OrgMissingErr"))
|
||||
return
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user