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 <[email protected]>
This commit is contained in:
Fabi
2020-06-22 13:51:44 +02:00
committed by GitHub
co-authored by Livio Amstutz
parent f68a5e63b5
commit 6556d053b2
52 changed files with 570 additions and 389 deletions
+6 -4
View File
@@ -17,10 +17,11 @@ const (
)
type CtxData struct {
UserID string
OrgID string
ProjectID string
AgentID string
UserID string
OrgID string
ProjectID string
AgentID string
PreferredLanguage string
}
func (ctxData CtxData) IsZero() bool {
@@ -48,6 +49,7 @@ func VerifyTokenAndWriteCtxData(ctx context.Context, token, orgID string, t Toke
clientID = grpc_util.GetHeader(ctx, api.ZitadelClientID)
projectID, err = t.GetProjectIDByClientID(ctx, clientID)
agentID = grpc_util.GetHeader(ctx, api.ZitadelAgentID)
} else {
userID, clientID, agentID, err = verifyAccessToken(ctx, token, t)
if err != nil {