From 343a9428b3d1a7cfec685e81bfc2fb7ff8be3606 Mon Sep 17 00:00:00 2001 From: Elio Bischof Date: Wed, 9 Aug 2023 07:49:12 +0200 Subject: [PATCH] feat: SMS and email OTP texts (#6281) * manage 2 custom texts proto * implement methods * default texts * console * improve translations * lint * test: fix e2e timeout * fix translations * add missing console translations * remove unused text parts --------- Co-authored-by: Livio Spring --- .../message-texts.component.html | 6 +- .../message-texts/message-texts.component.ts | 285 +++++++++++----- console/src/app/services/admin.service.ts | 140 ++++++++ console/src/app/services/mgmt.service.ts | 116 +++++-- console/src/assets/i18n/bg.json | 6 +- console/src/assets/i18n/de.json | 6 +- console/src/assets/i18n/en.json | 6 +- console/src/assets/i18n/es.json | 6 +- console/src/assets/i18n/fr.json | 6 +- console/src/assets/i18n/it.json | 6 +- console/src/assets/i18n/ja.json | 6 +- console/src/assets/i18n/mk.json | 6 +- console/src/assets/i18n/pl.json | 6 +- console/src/assets/i18n/pt.json | 6 +- console/src/assets/i18n/zh.json | 6 +- e2e/cypress/e2e/quotas/quotas.cy.ts | 76 +++-- internal/api/grpc/admin/custom_text.go | 96 ++++++ .../api/grpc/admin/custom_text_converter.go | 24 ++ internal/api/grpc/admin/export.go | 54 +++ internal/api/grpc/management/custom_text.go | 96 ++++++ .../grpc/management/custom_text_converter.go | 24 ++ internal/domain/custom_message_text.go | 24 +- internal/notification/static/i18n/bg.yaml | 9 + internal/notification/static/i18n/de.yaml | 9 + internal/notification/static/i18n/en.yaml | 9 + internal/notification/static/i18n/es.yaml | 9 + internal/notification/static/i18n/fr.yaml | 9 + internal/notification/static/i18n/it.yaml | 9 + internal/notification/static/i18n/ja.yaml | 9 + internal/notification/static/i18n/mk.yaml | 9 + internal/notification/static/i18n/pl.yaml | 9 + internal/notification/static/i18n/pt.yaml | 9 + internal/notification/static/i18n/zh.yaml | 9 + internal/query/message_text.go | 6 + internal/query/projection/custom_text_test.go | 1 - internal/query/projection/message_texts.go | 2 + internal/static/i18n/de.yaml | 2 +- proto/zitadel/admin.proto | 261 ++++++++++++++ proto/zitadel/management.proto | 318 ++++++++++++++++++ 39 files changed, 1508 insertions(+), 188 deletions(-) diff --git a/console/src/app/modules/policies/message-texts/message-texts.component.html b/console/src/app/modules/policies/message-texts/message-texts.component.html index 105371fcf3..d5b71f2884 100644 --- a/console/src/app/modules/policies/message-texts/message-texts.component.html +++ b/console/src/app/modules/policies/message-texts/message-texts.component.html @@ -37,8 +37,8 @@ [chips]="chips[currentType]" [disabled]="(canWrite$ | async) === false" label="one" - [default$]="getDefaultInitMessageTextMap$" - [current$]="getCustomInitMessageTextMap$" + [default$]="getDefaultMessageTextMap$" + [current$]="getCustomMessageTextMap$" (changedValues)="updateCurrentValues($event)" > @@ -46,7 +46,7 @@