fix translation keys in twig templates

This commit is contained in:
Xu 2023-11-23 17:37:06 +01:00 committed by Igor Scheller
parent fec2f17bea
commit 47ad0a6133
16 changed files with 198 additions and 89 deletions

View File

@ -218,7 +218,7 @@ function admin_arrive()
'sum' => '#888',
], $planned_arrival_at_day),
table([
'day' => __('Date'),
'day' => __('title.date'),
'count' => __('general.count'),
'sum' => __('Sum'),
], $planned_arrival_at_day),
@ -233,7 +233,7 @@ function admin_arrive()
'sum' => '#888',
], $arrival_at_day),
table([
'day' => __('Date'),
'day' => __('title.date'),
'count' => __('general.count'),
'sum' => __('Sum'),
], $arrival_at_day),
@ -248,7 +248,7 @@ function admin_arrive()
'sum' => '#888',
], $planned_departure_at_day),
table([
'day' => __('Date'),
'day' => __('title.date'),
'count' => __('general.count'),
'sum' => __('Sum'),
], $planned_departure_at_day),

View File

@ -124,7 +124,7 @@ function admin_free()
]),
table([
'name' => __('general.name'),
'shift_state' => __('Next shift'),
'shift_state' => __('shift.next'),
'last_shift' => __('Last shift'),
'dect' => __('general.dect'),
'email' => __('general.email'),

View File

@ -149,7 +149,7 @@ function admin_user()
$html .= form_csrf();
$html .= '<table>' . "\n";
$html .= ' <tr><td>' . __('settings.password') . '</td><td>' . '<input type="password" size="40" name="new_pw" value="" class="form-control" autocomplete="new-password"></td></tr>' . "\n";
$html .= ' <tr><td>' . __('Confirm password') . '</td><td>' . '<input type="password" size="40" name="new_pw2" value="" class="form-control" autocomplete="new-password"></td></tr>' . "\n";
$html .= ' <tr><td>' . __('password.reset.confirm') . '</td><td>' . '<input type="password" size="40" name="new_pw2" value="" class="form-control" autocomplete="new-password"></td></tr>' . "\n";
$html .= '</table>' . "\n" . '<br />' . "\n";
$html .= '<button type="submit" class="btn btn-primary">' . __('form.save') . '</button>' . "\n";

View File

@ -18,21 +18,19 @@ msgstr ""
"X-Poedit-SearchPath-1: src\n"
"X-Poedit-SearchPath-2: includes\n"
msgid "Hi %s,"
msgid "email.greeting"
msgstr "Hallo %s,"
msgid "here is a message for you from the %s:"
msgid "email.introduction"
msgstr "hier ist eine Nachricht aus dem %s für Dich:"
msgid ""
"This e-mail is autogenerated and has not been signed. You got this e-mail "
"because you are registered in the %s."
msgid "email.footer"
msgstr ""
"Diese E-Mail wurde automatisch generiert und muss daher nicht unterschrieben "
"werden. Du hast diese E-Mail bekommen, weil Du im %s registriert bist."
msgid "Please visit %s to recover your password."
msgstr "Bitte besuche %s, um Dein Passwort zurückzusetzen"
msgid "password.email.message"
msgstr "Bitte besuche %s, um Dein Passwort zurückzusetzen."
msgid "Forbidden"
msgstr "Nicht erlaubt"
@ -58,25 +56,25 @@ msgstr "Das angegebene CSRF Token ist ungültig oder abgelaufen"
msgid "general.date"
msgstr "d.m.Y"
msgid "%1$s, from %2$s to %3$s"
msgid "footer.eventinfo.name_start_end"
msgstr "%1$s, vom %2$s bis %3$s"
msgid "%1$s, starting %2$s"
msgid "footer.eventinfo.name_start"
msgstr "%1$s, ab dem %2$s"
msgid "Event from %1$s to %2$s"
msgid "footer.eventinfo.start_end"
msgstr "Event von %1$s bis %2$s"
msgid "Bugs / Features"
msgid "footer.issues"
msgstr "Bugs / Features"
msgid "Development Platform"
msgid "footer.github"
msgstr "Entwicklerplattform"
msgid "Credits"
msgid "credits.title"
msgstr "Credits"
msgid "Register"
msgid "general.register"
msgstr "Registrieren"
msgid "general.login"
@ -88,11 +86,11 @@ msgstr "Bitte melde dich an."
msgid "form.submit"
msgstr "Absenden"
msgid "Source code"
msgid "credits.source"
msgstr "Quellcode"
msgid "Version: _%s_"
msgstr ""
msgid "credits.version"
msgstr "Version: _%s_"
msgid "credits.credit"
msgstr ""
@ -106,65 +104,60 @@ msgstr ""
"Eine vollständige Liste der Mitwirkenden findest Du [auf GitHub](https://"
"github.com/engelsystem/engelsystem/graphs/contributors)."
msgid "Welcome to the %s!"
msgid "login.welcome"
msgstr "Willkommen beim %s!"
msgid "Buildup starts"
msgid "event.buildup.start"
msgstr "Aufbau startet"
msgid "Event starts"
msgid "event.starts"
msgstr "Event startet"
msgid "Event ends"
msgid "event.ends"
msgstr "Event endet"
msgid "Teardown ends"
msgid "event.teardown.ends"
msgstr "Abbau endet"
msgid "I forgot my password"
msgid "login.password.reset"
msgstr "Passwort vergessen"
msgid "Please sign up, if you want to help us!"
msgid "login.registration"
msgstr "Bitte registriere Dich, wenn Du helfen möchtest!"
msgid "Registration is only available via external login."
msgid "login.registration.external"
msgstr "Die Registrierung ist nur über einen externen Login möglich."
msgid "Registration is disabled."
msgid "login.registration.disabled"
msgstr "Registrierung ist abgeschaltet."
msgid "What can I do?"
msgid "login.do"
msgstr "Was kann ich machen?"
msgid "Please read about the jobs you can do to help us."
msgid "login.jobs"
msgstr ""
"Bitte informiere Dich über die Tätigkeiten bei denen Du uns helfen kannst."
msgid "Please note: You have to activate cookies!"
msgid "login.cookies"
msgstr "Hinweis: Cookies müssen aktiviert sein!"
msgid "Confirm password"
msgid "password.reset.confirm"
msgstr "Passwort wiederholen"
msgid "We sent you an e-mail containing your password recovery link."
msgid "password.recovery.success"
msgstr ""
"Wir haben dir eine E-Mail mit einem Link zum Passwort-zurücksetzen geschickt."
msgid "Password saved."
msgstr "Passwort gespeichert."
msgid "Password recovery"
msgid "password.reset.title"
msgstr "Passwort wiederherstellen"
msgid ""
"We will send you an e-mail with a password recovery link. Please use the "
"e-mail address you used for registration."
msgid "password.recovery.text"
msgstr ""
"Wir werden eine E-Mail mit einem Link schicken, mit dem du das Passwort "
"zurücksetzen kannst. Bitte benutze die E-Mail-Adresse, die du bei der Anmeldung "
"verwendet hast."
msgid "Recover"
msgid "form.recover"
msgstr "Wiederherstellen"
msgid "Angeltype %s deleted."
@ -604,7 +597,7 @@ msgstr "Geplante Ankunfts-Statistik"
msgid "arrived sum"
msgstr "Summe angekommen"
msgid "Date"
msgid "title.date"
msgstr "Datum"
msgid "Arrival statistics"
@ -619,7 +612,7 @@ msgstr "Freie Engel"
msgid "Angeltype"
msgstr "Engeltyp"
msgid "Next shift"
msgid "shift.next"
msgstr "Nächste Schicht"
msgid "Last shift"
@ -862,7 +855,7 @@ msgstr "Alle"
msgid "None"
msgstr "Keine"
msgid "Logout"
msgid "general.logout"
msgstr "Abmelden"
msgid "Admin"
@ -1859,7 +1852,7 @@ msgstr "Zur Konversation"
msgid "message.message"
msgstr "Nachricht"
msgid "angel"
msgid "general.angel"
msgstr "Engel"
msgid "worklog.add"
@ -2001,3 +1994,6 @@ msgstr "Benutzer Info"
msgid "user.info.hint"
msgstr "Wird auf der Benutzer Seite für Schichtkoordinatoren und Admins angezeigt."
msgid "design.title"
msgstr "Design"

View File

@ -312,7 +312,7 @@ msgid "settings.password.password"
msgstr "Old password"
msgid "settings.password.new_password"
msgstr "New passwort"
msgstr "New password"
msgid "settings.password.new_password2"
msgstr "Password confirmation"
@ -710,3 +710,116 @@ msgstr "User info"
msgid "user.info.hint"
msgstr "Is displayed for shift coordinators and admins in the user view."
msgid "email.greeting"
msgstr "Hi %s,"
msgid "email.introduction"
msgstr "here is a message for you from the %s:"
msgid "email.footer"
msgstr ""
"This e-mail is autogenerated and has not been signed. "
"You got this e-mail because you are registered in the %s."
msgid "password.email.message"
msgstr "Please visit %s to recover your password."
msgid "footer.eventinfo.start_end"
msgstr "%1$s, from %2$s to %3$s"
msgid "footer.eventinfo.name_start"
msgstr "%1$s, ab dem %2$s"
msgid "footer.eventinfo.name_start"
msgstr "%1$s, starting %2$s"
msgid "footer.eventinfo.start_end"
msgstr "Event from %1$s to %2$s"
msgid "footer.issues"
msgstr "Bugs / Features"
msgid "footer.github"
msgstr "Development Platform"
msgid "credits.title"
msgstr "Credits"
msgid "general.register"
msgstr "Register"
msgid "shift.next"
msgstr "Next shift"
msgid "general.logout"
msgstr "Logout"
msgid "credits.source"
msgstr "Source code"
msgid "credits.version"
msgstr "Version: _%s_"
msgid "design.title"
msgstr "Design"
msgid "login.welcome"
msgstr "Welcome to the %s!"
msgid "event.buildup.start"
msgstr "Buildup starts"
msgid "event.starts"
msgstr "Event starts"
msgid "event.ends"
msgstr "Event ends"
msgid "event.teardown.ends"
msgstr "Teardown ends"
msgid "login.password.reset"
msgstr "I forgot my password"
msgid "login.registration"
msgstr "Please sign up, if you want to help us!"
msgid "login.registration.external"
msgstr "Registration is only available via external login."
msgid "login.registration.disabled"
msgstr "Registration is disabled."
msgid "login.do"
msgstr "What can I do?"
msgid "login.jobs"
msgstr ""
"Please read about the jobs you can do to help us."
msgid "login.cookies"
msgstr "Please note: You have to activate cookies!"
msgid "general.angel"
msgstr "Angel"
msgid "title.date"
msgstr "Date"
msgid "password.reset.confirm"
msgstr "Confirm password"
msgid "password.recovery.success"
msgstr "We sent you an e-mail containing your password recovery link."
msgid "password.reset.title"
msgstr "Password recovery"
msgid "password.recovery.text"
msgstr ""
"We will send you an e-mail with a password recovery link. "
"Please use the e-mail address you used for registration."
msgid "form.recover"
msgstr "Recover"

View File

@ -1,6 +1,6 @@
{% block title %}{{ __('Hi %s,', [username]) }}{% endblock %}
{% block title %}{{ __('email.greeting', [username]) }}{% endblock %}
{% block introduction %}{{ __('here is a message for you from the %s:', [config('app_name')]) }}{% endblock %}
{% block introduction %}{{ __('email.introduction', [config('app_name')]) }}{% endblock %}
{% block message %}{{ message|raw }}{% endblock %}
@ -10,5 +10,5 @@
{%- if config('enable_show_day_of_event') and day_of_event is defined %}
, {{ __('event.day', [day_of_event]) }}
{% endif %}
{{ __('This e-mail is autogenerated and has not been signed. You got this e-mail because you are registered in the %s.', [config('app_name')]) }}
{{ __('email.footer', [config('app_name')]) }}
{% endblock %}

View File

@ -1,3 +1,3 @@
{% extends "emails/mail.twig" %}
{% block message %}{{ __('Please visit %s to recover your password.', [url('/password/reset/') ~ reset.token]) }}{% endblock %}
{% block message %}{{ __('password.email.message', [url('/password/reset/') ~ reset.token]) }}{% endblock %}

View File

@ -6,7 +6,7 @@
{% block eventinfo %}
{% if config('name') %}
{% if config('event_start') and config('event_end') %}
{{ __('%1$s, from %2$s to %3$s', [
{{ __('footer.eventinfo.name_start_end', [
config('name'),
config('event_start').format(__('general.date')),
config('event_end').format(__('general.date'))
@ -15,7 +15,7 @@
, {{ __('event.day', [day_of_event]) }}
{% endif %}
{% elseif config('event_start') %}
{{ __('%1$s, starting %2$s', [
{{ __('footer.eventinfo.name_start', [
config('name'),
config('event_start').format(__('general.date'))
]) }}
@ -26,7 +26,7 @@
{{ config('name') }}
{% endif %} <br>
{% elseif config('event_start') and config('event_end') %}
{{ __('Event from %1$s to %2$s', [
{{ __('footer.eventinfo.start_end', [
config('event_start').format(__('general.date')),
config('event_end').format(__('general.date'))
]) }}
@ -42,8 +42,8 @@
{{ __(name) }}
</a> ·
{% endfor %}
<a href="https://github.com/engelsystem/engelsystem/issues">{{ __('Bugs / Features') }}</a>
· <a href="https://github.com/engelsystem/engelsystem/">{{ __('Development Platform') }}</a>
· <a href="{{ url('/credits') }}">{{ __('Credits') }}</a>
<a href="https://github.com/engelsystem/engelsystem/issues">{{ __('footer.issues') }}</a>
· <a href="https://github.com/engelsystem/engelsystem/">{{ __('footer.github') }}</a>
· <a href="{{ url('/credits') }}">{{ __('credits.title') }}</a>
</div>
</div>

View File

@ -59,7 +59,7 @@
{% include "layouts/parts/language_dropdown.twig" %}
{% if has_permission_to('register') and config('registration_enabled') %}
{{ _self.toolbar_item(__('Register'), url('/register'), 'register', 'plus') }}
{{ _self.toolbar_item(__('general.register'), url('/register'), 'register', 'plus') }}
{% endif %}
{% if has_permission_to('login') %}
@ -68,7 +68,7 @@
{% endif %}
{% if is_user() %}
{{ _self.toolbar_item(menuUserShiftState(user), url('/shifts', {'action': 'next'}), '', 'clock', __('Next shift')) }}
{{ _self.toolbar_item(menuUserShiftState(user), url('/shifts', {'action': 'next'}), '', 'clock', __('shift.next')) }}
{% if has_permission_to('user_messages') %}
{{ _self.toolbar_item(
@ -96,7 +96,7 @@
{% endif %}
{% if has_permission_to('logout') %}
{{ _self.dropdown_item(__('Logout'), url('/logout'), 'logout', m.icon('box-arrow-left')) }}
{{ _self.dropdown_item(__('general.logout'), url('/logout'), 'logout', m.icon('box-arrow-left')) }}
{% endif %}
</ul>
</li>

View File

@ -1,10 +1,10 @@
{% extends "layouts/app.twig" %}
{% block title %}{{ __('Credits') }}{% endblock %}
{% block title %}{{ __('credits.title') }}{% endblock %}
{% block content %}
<div class="container">
<h1>{{ __('Credits') }}</h1>
<h1>{{ __('credits.title') }}</h1>
<div class="row">
{% for title, credit in credits %}
<div class="col-md-4">
@ -14,8 +14,8 @@
{% endfor %}
<div class="col-md-4">
<h2>{{ __('Source code') }}</h2>
<p>{{ __('Version: _%s_', [version])|markdown }}</i></p>
<h2>{{ __('credits.source') }}</h2>
<p>{{ __('credits.version', [version])|markdown }}</i></p>
<p>
{{ __('credits.credit')|markdown }}
</p>

View File

@ -2,7 +2,7 @@
{% import 'macros/base.twig' as m %}
{% import 'macros/form.twig' as f %}
{% block title %}{{ __('Design') }}{% endblock %}
{% block title %}{{ __('design.title') }}{% endblock %}
{% set colors=['success', 'info', 'warning', 'danger'] %}
{% set types=[

View File

@ -7,16 +7,16 @@
<div class="col-md-12">
<div class="row mb-3 mt-5">
<div class="col-sm-12 text-center" id="welcome-title">
<h2>{{ __('Welcome to the %s!', [config('name') ~ m.angel() ~ (config('app_name')|upper) ])|raw }}</h2>
<h2>{{ __('login.welcome', [config('name') ~ m.angel() ~ (config('app_name')|upper) ])|raw }}</h2>
</div>
</div>
<div class="row mb-3">
{% for name,date in {
(__('Buildup starts')): config('buildup_start'),
(__('Event starts')): config('event_start'),
(__('Event ends')): config('event_end'),
(__('Teardown ends')): config('teardown_end')
(__('event.buildup.start')): config('buildup_start'),
(__('event.starts')): config('event_start'),
(__('event.ends')): config('event_end'),
(__('event.teardown.ends')): config('teardown_end')
} | filter(date => date) %}
{% if date > date() %}
<div class="col-sm-3 text-center d-none d-sm-block">
@ -91,7 +91,7 @@
<div class="text-center">
<a href="{{ url('/password/reset') }}" class="">
{{ __('I forgot my password') }}
{{ __('login.password.reset') }}
</a>
</div>
</form>
@ -102,21 +102,21 @@
<div class="row mb-5">
<div class="col-sm-6 text-center">
<h2>{{ __('Register') }}</h2>
<h2>{{ __('general.register') }}</h2>
{% if has_permission_to('register') and config('registration_enabled') %}
{% if config('enable_password') %}
<p>{{ __('Please sign up, if you want to help us!') }}</p>
<a href="{{ url('/register') }}" class="btn btn-primary">{{ __('Register') }} &raquo;</a>
<p>{{ __('login.registration') }}</p>
<a href="{{ url('/register') }}" class="btn btn-primary">{{ __('general.register') }} &raquo;</a>
{% else %}
<p>{{ __('Registration is only available via external login.') }}</p>
<p>{{ __('login.registration.external') }}</p>
{% endif %}
{% else %}
{{ m.alert(__('Registration is disabled.'), 'danger') }}
{{ m.alert(__('login.registration.disabled'), 'danger') }}
{% endif %}
</div>
<div class="col-sm-6 text-center">
<h2>{{ __('What can I do?') }}</h2>
<h2>{{ __('login.do') }}</h2>
<p>{{ __('Please read about the jobs you can do to help us.') }}</p>
<a href="{{ url('/angeltypes/about') }}" class="btn btn-primary">
{{ __('angeltypes.about') }} &raquo;
@ -124,7 +124,7 @@
</div>
<div class="col-md-12 text-center">
{{ m.icon('info-circle') }} {{ __('Please note: You have to activate cookies!') }}
{{ m.icon('info-circle') }} {{ __('login.cookies') }}
</div>
</div>
</div>

View File

@ -30,9 +30,9 @@
<table class="table table-striped data">
<thead>
<tr>
<th>{{ __('angel') }}</th>
<th>{{ __('general.angel') }}</th>
<th>{{ __('message.message') }}</th>
<th>{{ __('Date') }}</th>
<th>{{ __('title.date') }}</th>
</tr>
</thead>
<tbody>

View File

@ -12,7 +12,7 @@
'min_length': min_length,
'required': true,
}) }}
{{ f.input('password_confirmation', __('Confirm password'), {
{{ f.input('password_confirmation', __('password.reset.confirm'), {
'type': 'password',
'min_length': min_length,
'required': true,

View File

@ -4,9 +4,9 @@
{% block row_content %}
<div class="col-md-12">
{% if type == 'email' %}
{{ m.alert(__('We sent you an e-mail containing your password recovery link.'), 'info') }}
{{ m.alert(__('password.recovery.success'), 'info') }}
{% elseif type == 'reset' %}
{{ m.alert(__('Password saved.'), 'success') }}
{{ m.alert(__('settings.password.success'), 'success') }}
{% endif %}
</div>
{% endblock %}

View File

@ -2,11 +2,11 @@
{% import 'macros/base.twig' as m %}
{% import 'macros/form.twig' as f %}
{% block title %}{{ __('Password recovery') }}{% endblock %}
{% block title %}{{ __('password.reset.title') }}{% endblock %}
{% block content %}
<div class="container">
<h1>{{ __('Password recovery') }}</h1>
<h1>{{ __('password.reset.title') }}</h1>
{% include 'layouts/parts/messages.twig' %}
@ -16,13 +16,13 @@
<form action="" enctype="multipart/form-data" method="post">
{{ csrf() }}
{{ __('We will send you an e-mail with a password recovery link. Please use the e-mail address you used for registration.') }}
{{ __('password.recovery.text') }}
{{ f.input('email', __('general.email'), {
'type': 'email',
'required': true,
}) }}
{{ f.submit(__('Recover')) }}
{{ f.submit(__('form.recover')) }}
</form>
</div>
{% endblock %}