Skip to content

Commit

Permalink
nicer 500 page
Browse files Browse the repository at this point in the history
  • Loading branch information
felixrindt committed Nov 25, 2024
1 parent 4e609e6 commit 4e6dd7f
Show file tree
Hide file tree
Showing 3 changed files with 88 additions and 20 deletions.
39 changes: 28 additions & 11 deletions ephios/locale/de/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-11-23 14:26+0100\n"
"PO-Revision-Date: 2024-11-23 14:26+0100\n"
"POT-Creation-Date: 2024-11-25 16:15+0100\n"
"PO-Revision-Date: 2024-11-25 16:16+0100\n"
"Last-Translator: Felix Rindt <[email protected]>\n"
"Language-Team: German <https://hosted.weblate.org/projects/ephios/ephios/de/"
">\n"
Expand Down Expand Up @@ -1169,7 +1169,7 @@ msgstr "Anlass"
#: ephios/core/templates/core/userprofile_list.html:95
#: ephios/core/templates/core/workinghours_list.html:9
#: ephios/core/templates/core/workinghours_list.html:14
#: ephios/templates/base.html:136
#: ephios/templates/base.html:133
msgid "Working hours"
msgstr "Arbeitsstunden"

Expand Down Expand Up @@ -1362,7 +1362,7 @@ msgstr ""
"Claim auftauchen, zu Qualifikations-UUIDs übersetzt. Wenn ein Key nicht "
"gefunden wird, wird versucht den Key selbst als UUID zu nutzen."

#: ephios/core/models/users.py:653
#: ephios/core/models/users.py:654
#, python-brace-format
msgid "Identity provider {label}"
msgstr "Identitätsprovider {label}"
Expand Down Expand Up @@ -1995,7 +1995,7 @@ msgstr "Weiter"

#: ephios/core/templates/core/event_list.html:11
#: ephios/core/templates/core/event_list.html:22 ephios/core/views/pwa.py:30
#: ephios/templates/base.html:96
#: ephios/templates/base.html:93
msgid "Events"
msgstr "Veranstaltungen"

Expand Down Expand Up @@ -2190,7 +2190,7 @@ msgstr "Benutzer bearbeiten"
msgid "change permissions"
msgstr "Berechtigungen ändern"

#: ephios/core/templates/core/home.html:11 ephios/templates/base.html:92
#: ephios/core/templates/core/home.html:11 ephios/templates/base.html:89
msgid "Home"
msgstr "Startseite"

Expand Down Expand Up @@ -2319,8 +2319,8 @@ msgstr "oder"
msgid "Forgot your password?"
msgstr "Passwort vergessen?"

#: ephios/core/templates/core/mails/base.html:152
#: ephios/templates/base.html:179
#: ephios/core/templates/core/mails/base.html:152 ephios/templates/500.html:53
#: ephios/templates/base.html:176
#, python-format
msgid "powered by %(brand)s"
msgstr "powered by %(brand)s"
Expand Down Expand Up @@ -2360,7 +2360,7 @@ msgstr "Andere Benachrichtigungen anzeigen"

#: ephios/core/templates/core/notification_list.html:7
#: ephios/core/templates/core/settings/settings_notifications.html:12
#: ephios/core/views/settings.py:33 ephios/templates/base.html:138
#: ephios/core/views/settings.py:33 ephios/templates/base.html:135
msgid "Notifications"
msgstr "Benachrichtigungen"

Expand Down Expand Up @@ -2391,7 +2391,7 @@ msgstr "Absenden"

#: ephios/core/templates/core/settings/settings_base.html:6
#: ephios/core/templates/core/settings/settings_base.html:11
#: ephios/templates/base.html:140
#: ephios/templates/base.html:137
msgid "Settings"
msgstr "Einstellungen"

Expand Down Expand Up @@ -4542,7 +4542,24 @@ msgstr "Seite nicht gefunden"
msgid "The page you requested could not be found."
msgstr "Die gewünschte Seite konnte nicht gefunden werden."

#: ephios/templates/base.html:142
#: ephios/templates/500.html:35
msgid "An error occurred"
msgstr "Ein Fehler ist aufgetreten"

#: ephios/templates/500.html:38
msgid ""
"The server encountered an internal error and was unable to retrieve your "
"request. Please try again later. The administrators have been notified."
msgstr ""
"Es ist ein technisches Problem aufgetreten und ihre Anfrage konnte nicht "
"beantwortet werden. Bitte versuchen Sie es später erneut. Die "
"Administratoren wurden informiert."

#: ephios/templates/500.html:45
msgid "Return home"
msgstr "Zurück zur Startseite"

#: ephios/templates/base.html:139
msgid "Logout"
msgstr "Abmelden"

Expand Down
67 changes: 60 additions & 7 deletions ephios/templates/500.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,62 @@
<html>
{% load i18n %}
{% load static %}
{% load compress %}
<!DOCTYPE html>
<html lang="{{ LANGUAGE_CODE }}">
<head>
<title>ephios - Internal Server Error</title></title>
</head>
<body>
<h1>Internal server error</h1>
<p>An error occurred while processing your request. The administrators have been informed about the error.</p>
</body>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="created" content="{% now "c" %}">
<title>ephios - {% block title %} ephios {% endblock %}</title>
<link rel="shortcut icon" type="image/x-icon" href="{% static "ephios/img/ephios-symbol-red.svg" %}">
{% compress css %}
<link type="text/css" media="screen" rel="stylesheet" href="{% static "fontawesome/css/all.css" %}">
<link type="text/x-scss" href="{% static 'ephios/scss/main.scss' %}" rel="stylesheet" media="screen">
{% block css %}{% endblock %}
{% endcompress %}
</head>

<body data-pwa-network="online">
<header>
<nav class="navbar navbar-expand-lg navbar-light bg-light shadow">
<div class="container">
<a class="navbar-brand" href="/">
<img src="{% static brand_logo_static_path|default:"ephios/img/ephios-text-black.png" %}"
alt="ephios"
class="d-inline-block" width="75">
</a>
</div>
</nav>
</header>
<div class="container container-main pt-3">
<main class="row blur-on-unload">
<div class="col-md-12">
<h1>
{% translate "An error occurred" %}
</h1>
<p>
{% blocktrans trimmed %}
The server encountered an internal error and was unable to
retrieve your request. Please try again later.
The administrators have been notified.
{% endblocktrans %}
</p>
<a href="/" class="btn btn-primary">
{% translate "Return home" %}
</a>
</div>
</main>
<footer class="row blur-on-unload mt-2">
<div class="col-md-12 text-center">
<small>
<span class="text-body-secondary">
{% blocktranslate trimmed with brand='<a href="https://ephios.de/" rel="noreferrer" target="_blank">ephios</a>' %}
powered by {{ brand }}
{% endblocktranslate %}
</span>
</small>
</div>
</footer>
</div>
</body>
</html>
2 changes: 0 additions & 2 deletions ephios/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
{% load i18n %}
{% load static %}
{% load compress %}


<!DOCTYPE html>
<html lang="{{ LANGUAGE_CODE }}">
<head>
Expand Down

0 comments on commit 4e6dd7f

Please sign in to comment.