[PLT-6936] Translate AppError.Message automatically by default (#8063)
Этот коммит содержится в:
коммит произвёл
Joram Wilander
родитель
591ef9f352
Коммит
dd9ad10d70
@@ -230,7 +230,6 @@ func Init(a *app.App, root *mux.Router, full bool) *API {
|
||||
|
||||
func Handle404(w http.ResponseWriter, r *http.Request) {
|
||||
err := model.NewAppError("Handle404", "api.context.404.app_error", nil, "", http.StatusNotFound)
|
||||
err.Translate(utils.T)
|
||||
|
||||
l4g.Debug("%v: code=404 ip=%v", r.URL.Path, utils.GetIpAddress(r))
|
||||
|
||||
|
||||
@@ -1937,7 +1937,7 @@ func TestInviteUsersToTeam(t *testing.T) {
|
||||
if err == nil {
|
||||
t.Fatal("Adding users with non-restricted domains was allowed")
|
||||
}
|
||||
if err.Where != "InviteNewUsersToTeam" || err.Message != "api.team.invite_members.invalid_email.app_error" {
|
||||
if err.Where != "InviteNewUsersToTeam" || err.Id != "api.team.invite_members.invalid_email.app_error" {
|
||||
t.Log(err)
|
||||
t.Fatal("Got wrong error message!")
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user