From eee62d6be8edf479f6faeb81b44b5bc7306f68fc Mon Sep 17 00:00:00 2001 From: Moritz Date: Tue, 25 Oct 2022 17:55:42 +0200 Subject: [PATCH] add german translated password reset email template --- abra.sh | 3 ++- compose.yml | 5 ++++ custom_flows.yaml.tmpl | 3 ++- password_reset_de.html | 53 ++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 62 insertions(+), 2 deletions(-) create mode 100644 password_reset_de.html diff --git a/abra.sh b/abra.sh index 5565cb8..b68a9f6 100644 --- a/abra.sh +++ b/abra.sh @@ -1,5 +1,6 @@ export CUSTOM_CSS_VERSION=v2 -export CUSTOM_FLOWS_VERSION=v1 +export CUSTOM_FLOWS_VERSION=v2 +export RECOVERY_TEMPLATE_DE_VERSION=v1 customize() { if [ -z "$1" ] diff --git a/compose.yml b/compose.yml index 29d833e..690cc68 100644 --- a/compose.yml +++ b/compose.yml @@ -41,6 +41,8 @@ services: configs: - source: custom_css target: /web/dist/custom.css + - source: recovery_template_de + target: /templates/password_reset_de.html networks: - internal - proxy @@ -157,6 +159,9 @@ configs: name: ${STACK_NAME}_custom_css_${CUSTOM_CSS_VERSION} file: custom.css.tmpl template_driver: golang + recovery_template_de: + name: ${STACK_NAME}_recovery_template_de_${RECOVERY_TEMPLATE_DE_VERSION} + file: password_reset_de.html custom_flows: name: ${STACK_NAME}_custom_flows_${CUSTOM_FLOWS_VERSION} file: custom_flows.yaml.tmpl diff --git a/custom_flows.yaml.tmpl b/custom_flows.yaml.tmpl index be4c381..03e3515 100644 --- a/custom_flows.yaml.tmpl +++ b/custom_flows.yaml.tmpl @@ -10,6 +10,7 @@ context: transl_password_repeat: {{ if eq (env "DEFAULT_LANGUAGE") "de" }} Passwort (wiederholen) {{ else }} Password (repeat) {{ end }} transl_username: {{ if eq (env "DEFAULT_LANGUAGE") "de" }} Benutzername {{ else }} Username {{ end }} transl_name: {{ if eq (env "DEFAULT_LANGUAGE") "de" }} Vor- und Nachname {{ else }} Full name {{ end }} + transl_template_recovery: {{ if eq (env "DEFAULT_LANGUAGE") "de" }} password_reset_de.html {{ else }} email/password_reset.html {{ end }} entries: ######## Email Recovery Flow ######## @@ -56,7 +57,7 @@ entries: use_global_settings: true token_expiry: 30 subject: authentik - template: email/password_reset.html + template: !Context transl_template_recovery activate_user_on_success: true - identifiers: name: default-recovery-user-write diff --git a/password_reset_de.html b/password_reset_de.html new file mode 100644 index 0000000..83d30ad --- /dev/null +++ b/password_reset_de.html @@ -0,0 +1,53 @@ +{% extends "email/base.html" %} + +{% load i18n %} +{% load humanize %} + +{% block content %} + + + {% blocktrans with username=user.username %} + Herzlich Willkommen {{ username }}, + {% endblocktrans %} + + + + + + + + + + + + + + +
+ {% blocktrans %} + Klicke auf folgenden Link um ein Passwort für deinen Account zu erstellen: + {% endblocktrans %} +
+ + + + + + + +
+ {% blocktrans with expires=expires|naturaltime %} + Falls du diese E-Mail fälschlicherweise erhalten hast, ignoriere sie bitte. Der obige Link ist gültig für: {{ expires }}. + {% endblocktrans %} +
+ + +{% endblock %}