add german translated password reset email template

This commit is contained in:
Moritz 2022-10-25 17:55:42 +02:00
parent d5caa67384
commit eee62d6be8
4 changed files with 62 additions and 2 deletions

View File

@ -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" ]

View File

@ -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

View File

@ -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

53
password_reset_de.html Normal file
View File

@ -0,0 +1,53 @@
{% extends "email/base.html" %}
{% load i18n %}
{% load humanize %}
{% block content %}
<tr>
<td class="alert alert-success">
{% blocktrans with username=user.username %}
Herzlich Willkommen {{ username }},
{% endblocktrans %}
</td>
</tr>
<tr>
<td class="content-wrap">
<table width="100%" cellpadding="0" cellspacing="0">
<tr>
<td class="content-block">
{% blocktrans %}
Klicke auf folgenden Link um ein Passwort für deinen Account zu erstellen:
{% endblocktrans %}
</td>
</tr>
<tr>
<td class="content-block">
<table role="presentation" border="0" cellpadding="0" cellspacing="0" class="btn btn-primary">
<tbody>
<tr>
<td align="center">
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td> <a id="confirm" href="{{ url }}" rel="noopener noreferrer" target="_blank">Passwort Erstellen</a> </td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td class="content-block">
{% 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 %}
</td>
</tr>
</table>
</td>
</tr>
{% endblock %}