🌐 i18n(i18n): add multilingual support with translations
- create i18n.py for managing translations and resolving locale - add German and English translations for various UI components - integrate translation functions into templates for dynamic language support
This commit is contained in:
parent
1aafd6d5a3
commit
cc7c75ba33
11 changed files with 548 additions and 157 deletions
|
|
@ -1,9 +1,9 @@
|
|||
{% extends "base.html" %}
|
||||
{% block content %}
|
||||
<div class="max-w-sm mx-auto mt-8">
|
||||
<h1 class="text-lg font-semibold tracking-tight mb-1">Registrieren</h1>
|
||||
<h1 class="text-lg font-semibold tracking-tight mb-1">{{ t("register.title") }}</h1>
|
||||
<p class="text-xs text-slate-400 mb-4">
|
||||
Erstelle einen neuen Account. Der erste Benutzer wird automatisch Admin.
|
||||
{{ t("register.subtitle") }}
|
||||
</p>
|
||||
|
||||
{% if error %}
|
||||
|
|
@ -15,7 +15,7 @@
|
|||
<form method="post" class="space-y-4">
|
||||
<input type="hidden" name="csrf_token" value="{{ csrf_token }}" />
|
||||
<div class="space-y-1">
|
||||
<label class="text-xs text-slate-300">Benutzername</label>
|
||||
<label class="text-xs text-slate-300">{{ t("register.username") }}</label>
|
||||
<input
|
||||
type="text"
|
||||
name="username"
|
||||
|
|
@ -24,7 +24,7 @@
|
|||
/>
|
||||
</div>
|
||||
<div class="space-y-1">
|
||||
<label class="text-xs text-slate-300">E-Mail (optional)</label>
|
||||
<label class="text-xs text-slate-300">{{ t("register.email") }}</label>
|
||||
<input
|
||||
type="email"
|
||||
name="email"
|
||||
|
|
@ -32,7 +32,7 @@
|
|||
/>
|
||||
</div>
|
||||
<div class="space-y-1">
|
||||
<label class="text-xs text-slate-300">Passwort</label>
|
||||
<label class="text-xs text-slate-300">{{ t("register.password") }}</label>
|
||||
<input
|
||||
type="password"
|
||||
name="password"
|
||||
|
|
@ -42,7 +42,7 @@
|
|||
/>
|
||||
</div>
|
||||
<div class="space-y-1">
|
||||
<label class="text-xs text-slate-300">Passwort bestätigen</label>
|
||||
<label class="text-xs text-slate-300">{{ t("register.password_confirm") }}</label>
|
||||
<input
|
||||
type="password"
|
||||
name="password_confirm"
|
||||
|
|
@ -55,7 +55,7 @@
|
|||
type="submit"
|
||||
class="w-full rounded-lg bg-indigo-500 px-4 py-2 text-sm font-medium text-white hover:bg-indigo-400 focus:outline-none focus:ring focus:ring-indigo-500/40"
|
||||
>
|
||||
Account anlegen
|
||||
{{ t("register.submit") }}
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue