mirror of
https://github.com/zitadel/zitadel.git
synced 2025-10-28 07:06:25 +00:00
feat: Notification translation (#192)
* feat: translate emails * feat: translate emails * fix: add notification statik to build * fix: add codes to templates
This commit is contained in:
@@ -7,6 +7,7 @@ import (
|
||||
"github.com/caos/zitadel/internal/crypto"
|
||||
"github.com/caos/zitadel/internal/eventstore"
|
||||
"github.com/caos/zitadel/internal/eventstore/spooler"
|
||||
"github.com/caos/zitadel/internal/i18n"
|
||||
"github.com/caos/zitadel/internal/notification/repository/eventsourcing/view"
|
||||
usr_event "github.com/caos/zitadel/internal/user/repository/eventsourcing"
|
||||
"time"
|
||||
@@ -29,14 +30,21 @@ type EventstoreRepos struct {
|
||||
UserEvents *usr_event.UserEventstore
|
||||
}
|
||||
|
||||
func Register(configs Configs, bulkLimit, errorCount uint64, view *view.View, eventstore eventstore.Eventstore, repos EventstoreRepos, systemDefaults sd.SystemDefaults) []spooler.Handler {
|
||||
func Register(configs Configs, bulkLimit, errorCount uint64, view *view.View, eventstore eventstore.Eventstore, repos EventstoreRepos, systemDefaults sd.SystemDefaults, i18n *i18n.Translator) []spooler.Handler {
|
||||
aesCrypto, err := crypto.NewAESCrypto(systemDefaults.UserVerificationKey)
|
||||
if err != nil {
|
||||
logging.Log("HANDL-s90ew").WithError(err).Debug("error create new aes crypto")
|
||||
}
|
||||
return []spooler.Handler{
|
||||
&NotifyUser{handler: handler{view, bulkLimit, configs.cycleDuration("User"), errorCount}},
|
||||
&Notification{handler: handler{view, bulkLimit, configs.cycleDuration("Notification"), errorCount}, eventstore: eventstore, userEvents: repos.UserEvents, systemDefaults: systemDefaults, AesCrypto: aesCrypto},
|
||||
&Notification{
|
||||
handler: handler{view, bulkLimit, configs.cycleDuration("Notification"), errorCount},
|
||||
eventstore: eventstore,
|
||||
userEvents: repos.UserEvents,
|
||||
systemDefaults: systemDefaults,
|
||||
AesCrypto: aesCrypto,
|
||||
i18n: i18n,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user