mirror of
https://github.com/zitadel/zitadel.git
synced 2025-11-16 15:14:59 +00:00
feat: translate error messages (#254)
* feat: translate error messages in error interceptor * fix: add statik import * feat: user error msgs * feat: add translations * feat: add translations * feat: add translations * feat: add translations * feat: add translations * feat: add translations * some fixes and improved error messages Co-authored-by: Livio Amstutz <livio.a@gmail.com>
This commit is contained in:
@@ -91,18 +91,6 @@ func TestCreatePasswordComplexityPolicy(t *testing.T) {
|
||||
policy: &model.PasswordComplexityPolicy{ObjectRoot: es_models.ObjectRoot{AggregateID: "AggregateID1", Sequence: 2}, Description: "Name"},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "create policy no name",
|
||||
args: args{
|
||||
es: GetMockPasswordComplexityPolicyNoEvents(ctrl),
|
||||
ctx: auth.NewMockContext("orgID", "userID"),
|
||||
policy: &model.PasswordComplexityPolicy{ObjectRoot: es_models.ObjectRoot{AggregateID: "AggregateID", Sequence: 1}},
|
||||
},
|
||||
res: res{
|
||||
wantErr: true,
|
||||
errFunc: caos_errs.IsPreconditionFailed,
|
||||
},
|
||||
},
|
||||
}
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
@@ -149,18 +137,6 @@ func TestUpdatePasswordComplexityPolicy(t *testing.T) {
|
||||
policy: &model.PasswordComplexityPolicy{ObjectRoot: es_models.ObjectRoot{AggregateID: "AggregateID", Sequence: 1}, Description: "NameNew"},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "update policy no name",
|
||||
args: args{
|
||||
es: GetMockPasswordComplexityPolicy(ctrl),
|
||||
ctx: auth.NewMockContext("orgID", "userID"),
|
||||
new: &model.PasswordComplexityPolicy{ObjectRoot: es_models.ObjectRoot{AggregateID: "AggregateID", Sequence: 1}, Description: ""},
|
||||
},
|
||||
res: res{
|
||||
wantErr: true,
|
||||
errFunc: caos_errs.IsPreconditionFailed,
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "existing policy not found",
|
||||
args: args{
|
||||
|
||||
Reference in New Issue
Block a user