Show specific error message titles

This commit is contained in:
Igor Scheller 2023-11-10 16:20:01 +01:00
parent 93270a10fd
commit ecc3976c27
11 changed files with 52 additions and 10 deletions

View File

@ -1593,6 +1593,12 @@ msgstr "Nachricht"
msgid "news.edit.hint"
msgstr "Du kannst Markdown und den [more] Tag benutzen"
msgid "news.delete.title"
msgstr "News \"%s\" löschen"
msgid "news.comments.delete.title"
msgstr "Kommentar \"%s\" löschen"
msgid "form.search"
msgstr "Suchen"
@ -1841,6 +1847,9 @@ msgstr "Frage"
msgid "faq.message"
msgstr "Antwort"
msgid "faq.delete.title"
msgstr "FAQ \"%s\" löschen"
msgid "question.questions"
msgstr "Fragen"
@ -1859,6 +1868,9 @@ msgstr "Frage"
msgid "question.answer"
msgstr "Antwort"
msgid "question.delete.title"
msgstr "Frage \"%s\" löschen"
msgid "user.edit.shirt"
msgstr "Shirt bearbeiten"
@ -1969,6 +1981,9 @@ msgstr "Ort erstellen"
msgid "location.edit.title"
msgstr "Ort bearbeiten"
msgid "location.delete.title"
msgstr "Ort \"%s\" löschen"
msgid "event.day"
msgstr "Tag %1$d"

View File

@ -211,6 +211,12 @@ msgstr "Message"
msgid "news.edit.hint"
msgstr "You can use Markdown and the [more] tag"
msgid "news.delete.title"
msgstr "Delete news \"%s\""
msgid "news.comments.delete.title"
msgstr "Delete comment \"%s\""
msgid "form.search"
msgstr "Search"
@ -459,6 +465,9 @@ msgstr "Question"
msgid "faq.message"
msgstr "Answer"
msgid "faq.delete.title"
msgstr "Delete FAQ \"%s\""
msgid "question.questions"
msgstr "Questions"
@ -477,6 +486,9 @@ msgstr "Question"
msgid "question.answer"
msgstr "Answer"
msgid "question.delete.title"
msgstr "Delete question \"%s\""
msgid "user.edit.shirt"
msgstr "Edit shirt"
@ -604,6 +616,9 @@ msgstr "Create location"
msgid "location.edit.title"
msgstr "Edit location"
msgid "location.delete.title"
msgstr "Delete location \"%s\""
msgid "event.day"
msgstr "Day %1$d"

View File

@ -57,7 +57,7 @@
<div class="btn-group">
{{ f.submit(__('form.save'), {'icon_left': 'save'}) }}
{% if location %}
{{ f.delete(__('form.delete'), {'confirm_title': location.name|e}) }}
{{ f.delete(__('form.delete'), {'confirm_title': __('location.delete.title', [location.name|e])}) }}
{% endif %}
</div>
</div>

View File

@ -57,7 +57,11 @@
<form method="post" class="ps-1">
{{ csrf() }}
{{ f.hidden('id', location.id) }}
{{ f.delete(null, {'size': 'sm','confirm_title': location.name|e}) }}
{{ f.delete(null, {
'size': 'sm',
'confirm_title': __('location.delete.title', [location.name|e]),
'confirm_button_text': __('form.delete'),
}) }}
</form>
</div>

View File

@ -51,7 +51,7 @@
{{ f.submit(m.icon('eye'), {'name': 'preview', 'btn_type': 'info', 'title': __('form.preview')}) }}
{% if faq and faq.id %}
{{ f.delete(__('form.delete'), {'confirm_title': faq.question[:40]|e})}}
{{ f.delete(__('form.delete'), {'confirm_title': __('faq.delete.title', [faq.question[:40]|e])})}}
{% endif %}
</div>
</div>

View File

@ -66,8 +66,8 @@
{{ csrf() }}
{{ f.delete(null, {
'size': 'sm',
'confirm_title': item.question[:40]|e,
'confirm_button_text': __('form.delete')
'confirm_title': __('faq.delete.title', [item.question[:40]|e]),
'confirm_button_text': __('form.delete'),
}) }}
</form>
{% endif %}

View File

@ -75,7 +75,7 @@
{{ f.submit(m.icon('eye'), {'name': 'preview', 'btn_type': 'info', 'title': __('form.preview')}) }}
{% if news and news.id %}
{{ f.delete(__('form.delete'), {'confirm_title': news.title[:40]|e}) }}
{{ f.delete(__('form.delete'), {'confirm_title': __('news.delete.title', [news.title[:40]|e])}) }}
{% endif %}
</div>
</div>

View File

@ -33,7 +33,11 @@
action="{{ url('/news/comment/' ~ comment.id) }}" enctype="multipart/form-data"
method="post">
{{ csrf() }}
{{ f.delete(null, {'size': 'sm', 'confirm_title': comment.text[:40]|e}) }}
{{ f.delete(null, {
'size': 'sm',
'confirm_title': __('news.comments.delete.title', [comment.text[:40]|e]),
'confirm_button_text': __('form.delete'),
}) }}
</form>
</div>
{% endif %}

View File

@ -104,7 +104,7 @@
{{ csrf() }}
{{ f.delete(null, {
'size': 'sm',
'confirm_title': news.title[:40]|e,
'confirm_title': __('news.delete.title', [news.title[:40]|e]),
'confirm_button_text': __('form.delete')
}) }}
</form>

View File

@ -52,7 +52,7 @@
{% if is_admin|default(false) %}
{{ f.submit(m.icon('eye'), {'name': 'preview', 'btn_type': 'info', 'title': __('form.preview')}) }}
{% if question and question.id %}
{{ f.delete(__('form.delete'), {'confirm_title': question.text[:40]|e}) }}
{{ f.delete(__('form.delete'), {'confirm_title': __('question.delete.title', [question.text[:40]|e])}) }}
{% endif %}
{% endif %}
</div>

View File

@ -53,7 +53,11 @@
<form class="ps-1" method="post" action="">
{{ csrf() }}
{{ f.hidden('id', question.id) }}
{{ f.delete(null, {'size': 'sm', 'confirm_title': question.text[:40]|e, 'confirm_button_text': __('form.delete')}) }}
{{ f.delete(null, {
'size': 'sm',
'confirm_title': __('question.delete.title', [question.text[:40]|e]),
'confirm_button_text': __('form.delete'),
}) }}
</form>
{% endif %}
</div>