mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-02 11:20:18 +08:00
feat: refactor backend i18n (#1373)
* fix: handle the dataSourceName when DB changes * reduce duplication of code * feat: refactor translation error message * feat: use json intsead of ini file * remove useless translation * fix translate problems * remove useless addition * fix pr problems * fix pr problems * fix split problem * use gofumpt to fmt code * use crowdin to execute backend translation * fix pr problems * refactor: change translation file structure same as frontend * delete useless output * update go.mod
This commit is contained in:
@ -47,7 +47,7 @@ func (c *ApiController) BatchEnforce() {
|
||||
func (c *ApiController) GetAllObjects() {
|
||||
userId := c.GetSessionUsername()
|
||||
if userId == "" {
|
||||
c.ResponseError(c.T("EnforcerErr.SignInFirst"))
|
||||
c.ResponseError(c.T("enforcer:Please sign in first"))
|
||||
return
|
||||
}
|
||||
|
||||
@ -58,7 +58,7 @@ func (c *ApiController) GetAllObjects() {
|
||||
func (c *ApiController) GetAllActions() {
|
||||
userId := c.GetSessionUsername()
|
||||
if userId == "" {
|
||||
c.ResponseError(c.T("EnforcerErr.SignInFirst"))
|
||||
c.ResponseError(c.T("enforcer:Please sign in first"))
|
||||
return
|
||||
}
|
||||
|
||||
@ -69,7 +69,7 @@ func (c *ApiController) GetAllActions() {
|
||||
func (c *ApiController) GetAllRoles() {
|
||||
userId := c.GetSessionUsername()
|
||||
if userId == "" {
|
||||
c.ResponseError(c.T("EnforcerErr.SignInFirst"))
|
||||
c.ResponseError(c.T("enforcer:Please sign in first"))
|
||||
return
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user