mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-29 15:38:52 +00:00
feat: localized messages (#328)
* fix: project by id loads project from view and from eventstore * fix: correct search key for role * feat(auth): my user changes * fix: improve error handling in change converters * fix: log-id * feat(translations): event type translations * feat: localized translations * fix(translations): correct yaml format * chore: example * fix: remove unused code * correct checkSSL in sql * chore(modules): update * chore: refactor interceptors * fix: improvments * Update internal/static/i18n/de.yaml Co-authored-by: Florian Forster <[email protected]> * Update internal/static/i18n/de.yaml Co-authored-by: Florian Forster <[email protected]> * Update internal/static/i18n/de.yaml Co-authored-by: Florian Forster <[email protected]> * Update internal/static/i18n/de.yaml Co-authored-by: Florian Forster <[email protected]> * Update internal/static/i18n/de.yaml Co-authored-by: Florian Forster <[email protected]> * Update internal/static/i18n/de.yaml Co-authored-by: Florian Forster <[email protected]> * Update internal/static/i18n/en.yaml Co-authored-by: Florian Forster <[email protected]> * Update internal/static/i18n/en.yaml Co-authored-by: Florian Forster <[email protected]> * Update internal/static/i18n/en.yaml Co-authored-by: Florian Forster <[email protected]> * Update internal/static/i18n/en.yaml Co-authored-by: Florian Forster <[email protected]> * Update internal/static/i18n/en.yaml Co-authored-by: Florian Forster <[email protected]> * Update internal/static/i18n/de.yaml Co-authored-by: Florian Forster <[email protected]> * Update internal/static/i18n/de.yaml Co-authored-by: Florian Forster <[email protected]> * Update internal/static/i18n/de.yaml Co-authored-by: Florian Forster <[email protected]> * Update internal/static/i18n/de.yaml Co-authored-by: Florian Forster <[email protected]> * Update internal/static/i18n/de.yaml Co-authored-by: Florian Forster <[email protected]> * Update internal/static/i18n/de.yaml Co-authored-by: Florian Forster <[email protected]> * Update internal/static/i18n/de.yaml Co-authored-by: Florian Forster <[email protected]> * Update internal/static/i18n/de.yaml Co-authored-by: Florian Forster <[email protected]> * Update internal/static/i18n/en.yaml Co-authored-by: Florian Forster <[email protected]> * chore(translations): start with upper case on Code * chore(middleware): move funcs * add message to grpc web generation * translation in mgmt and fixes * fix authoptions * fix console statik Co-authored-by: Florian Forster <[email protected]> Co-authored-by: Livio Amstutz <[email protected]>
This commit is contained in:
co-authored by
Florian Forster
Livio Amstutz
parent
b863e7c407
commit
c0f85c2733
@@ -8,6 +8,7 @@ import (
|
||||
"github.com/caos/zitadel/internal/api/auth"
|
||||
"github.com/caos/zitadel/internal/eventstore/models"
|
||||
usr_model "github.com/caos/zitadel/internal/user/model"
|
||||
message "github.com/caos/zitadel/pkg/message"
|
||||
"github.com/golang/protobuf/ptypes"
|
||||
"golang.org/x/text/language"
|
||||
"google.golang.org/protobuf/encoding/protojson"
|
||||
@@ -343,11 +344,11 @@ func userChangesToResponse(response *usr_model.UserChanges, offset uint64, limit
|
||||
return &Changes{
|
||||
Limit: limit,
|
||||
Offset: offset,
|
||||
Changes: userChangesToMgtAPI(response),
|
||||
Changes: userChangesToAPI(response),
|
||||
}
|
||||
}
|
||||
|
||||
func userChangesToMgtAPI(changes *usr_model.UserChanges) (_ []*Change) {
|
||||
func userChangesToAPI(changes *usr_model.UserChanges) (_ []*Change) {
|
||||
result := make([]*Change, len(changes.Changes))
|
||||
|
||||
for i, change := range changes.Changes {
|
||||
@@ -358,10 +359,9 @@ func userChangesToMgtAPI(changes *usr_model.UserChanges) (_ []*Change) {
|
||||
err = protojson.Unmarshal(changedData, data)
|
||||
logging.Log("GRPC-0kRsY").OnError(err).Debug("unable to marshal changed data to struct")
|
||||
}
|
||||
|
||||
result[i] = &Change{
|
||||
ChangeDate: change.ChangeDate,
|
||||
EventType: change.EventType,
|
||||
EventType: message.NewLocalizedEventType(change.EventType),
|
||||
Sequence: change.Sequence,
|
||||
Data: data,
|
||||
EditorId: change.ModifierId,
|
||||
|
||||
Reference in New Issue
Block a user