Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix error pages #120

Merged
merged 2 commits into from
Apr 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions backend/locale/cs/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-01-26 14:31+0000\n"
"POT-Creation-Date: 2024-04-07 16:49+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
Expand Down Expand Up @@ -104,53 +104,53 @@ msgstr "Jste si jisti že chcete smazat písničku"
msgid "Confirm"
msgstr "Potvrdit"

#: backend/templates/songs/index.html:25
#: backend/templates/songs/index.html:27
msgid "Hide chords"
msgstr "Skrýt akordy"

#: backend/templates/songs/index.html:31
#: backend/templates/songs/index.html:33
msgid "Prevent sleep"
msgstr "Zabránit uspání"

#: backend/templates/songs/index.html:37
#: backend/templates/songs/index.html:39
msgid "Single page"
msgstr "Bez stránek"

#: backend/templates/songs/index.html:62
#: backend/templates/songs/index.html:64
msgid "Actions"
msgstr "Akce"

#: backend/templates/songs/index.html:67
#: backend/templates/songs/index.html:69
msgid "Edit"
msgstr "Editor"

#: backend/templates/songs/index.html:70
#: backend/templates/songs/index.html:72
msgid "Delete"
msgstr "Smazat"

#: backend/templates/songs/index.html:84
#: backend/templates/songs/index.html:86
msgid "Transpose"
msgstr "Transponovat"

#: backend/templates/songs/index.html:103
#: backend/templates/songs/index.html:105
msgid "Search"
msgstr "Vyhledávání"

#: backend/templates/songs/index.html:105
#: backend/templates/songs/index.html:107
msgid "Number, text or author"
msgstr "Číslo, text nebo autor"

#: backend/views.py:92
#: backend/views.py:101
#, python-format
msgid "Song %(name)s was successfully created"
msgstr "Písnička %(name)s byla úspěšně přidána"

#: backend/views.py:115
#: backend/views.py:124
#, python-format
msgid "Song %(name)s was successfully updated"
msgstr "Písnička %(name)s byla úspěšně upravena"

#: backend/views.py:131
#: backend/views.py:140
#, python-format
msgid "Song %s was successfully deleted"
msgstr "Písnička %s byla úspěšně odstraněna"
12 changes: 6 additions & 6 deletions category/locale/cs/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-01-26 14:31+0000\n"
"POT-Creation-Date: 2024-04-07 16:49+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
Expand Down Expand Up @@ -119,27 +119,27 @@ msgstr "Smazat"
msgid "Add Category"
msgstr "Přidat Kategorii"

#: category/views.py:36
#: category/views.py:40
#, python-format
msgid "Category with url /%(slug)s does not exist"
msgstr "Kategorie s url /%(slug)s neexistuje"

#: category/views.py:65
#: category/views.py:73
#, python-format
msgid "Category %(name)s was successfully created"
msgstr "Kategorie %(name)s byla úspěšně vytvořena"

#: category/views.py:82
#: category/views.py:90
#, python-format
msgid "Category %(name)s was successfully updated"
msgstr "Kategorie %(name)s byla úspěšně upravena"

#: category/views.py:103
#: category/views.py:111
#, python-format
msgid "Category %s was successfully staged for PDF generation"
msgstr "PDF pro Kategorii %s bylo přidáno do fronty"

#: category/views.py:114
#: category/views.py:122
#, python-format
msgid "Category %(name)s was successfully deleted"
msgstr "Kategorie %(name)s byla úspěšně smazána"
51 changes: 18 additions & 33 deletions frontend/locale/cs/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-01-26 14:35+0000\n"
"POT-Creation-Date: 2024-04-07 16:50+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
Expand All @@ -24,55 +24,40 @@ msgid "Bad Request"
msgstr "Špatný dotaz"

#: frontend/templates/400.html:9
msgid ""
"There is something wrong there, I don't think this is the way to do it? "
"Aren't some of the data missing? Or in the wrong format?"
msgstr ""
"Něco tu nesedí. Nemyslím že tohle je ten správný způsob jak tohle udělat. "
"Nechybí ti nějaká data? A neposlals je ve špatném formátu?"
#| msgid "Bad Request"
msgid "Invalid request"
msgstr "Špatný požadavek"

#: frontend/templates/403.html:4 frontend/templates/403.html:5
msgid "Permission denied"
msgstr "Přístup zamítnut"

#: frontend/templates/403.html:9
msgid ""
"Didn't your Mom tell you to not enter websites you don't have permissions "
"for? Get out of here!"
msgstr ""
"Maminka ti neříkala že nemáš lozit na zakázané stránky? Vypadni! Tohle je "
"jen pro přihlášené!"
msgid "Insufficient permissions"
msgstr "Nedostatečné oprávnění"

#: frontend/templates/404.html:13 frontend/templates/404.html:30
msgid "Not found"
#: frontend/templates/404.html:4
msgid "Not Found"
msgstr "Nenalezeno"

#: frontend/templates/404.html:34
#, python-format
msgid ""
"Welp, nothing is at %(request)s. Like, literally nothing. Not even "
"cockroaches or russians. How did you get here? Are you sure this is the "
"right URL?"
msgstr ""
"No, na adrese %(request)s není lautr nic. Jakože, doslova nic. Nežijí tu "
"švábi a rusáci. Jak ses sem sakra dostal? Jsi si jistý že je tohle správná "
"adresa?"
#: frontend/templates/404.html:4
msgid "Back to homepage"
msgstr "Zpátky domů"

#: frontend/templates/404.html:38
#: frontend/templates/404.html:7
#, python-format
msgid ""
"It seems you turned wrong somewhere, there is nothing here but small midget "
"wizard with long beard telling you reason what you did wrong:<br> "
"<b>%(exception)s</b>"
msgstr ""
"Vypadá to že si někde špatně uhl, není tu nic vyjma trpasličího čaroděje s "
"dlouhými vousy který se ti snaží říct co pokazilo:<br> <b>%(exception)s</b>"
msgid "URL %(request_path)s does not exist."
msgstr "URL %(request_path)s neexistuje."

#: frontend/templates/admin/base/migrate.html:29
#: frontend/templates/base/form.html:9
msgid "Submit"
msgstr "Odeslat"

#: frontend/templates/base/error.html:8
msgid "Not found"
msgstr "Nenalezeno"

#: frontend/templates/base/index.html:35
msgid "Logo"
msgstr ""
Expand Down
2 changes: 1 addition & 1 deletion frontend/templates/400.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@

{% block framed_body %}
<p>
{% trans "There is something wrong there, I don't think this is the way to do it? Aren't some of the data missing? Or in the wrong format?" %}
{% trans "Invalid request" %}
</p>
{% endblock %}
4 changes: 2 additions & 2 deletions frontend/templates/403.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@

{% block framed_body %}
<p>
{% trans "Didn't your Mom tell you to not enter websites you don't have permissions for? Get out of here!" %}
{% trans "Insufficient permissions" %}: {{ exception }}
</p>
{% endblock %}
{% endblock %}
62 changes: 11 additions & 51 deletions frontend/templates/404.html
Original file line number Diff line number Diff line change
@@ -1,53 +1,13 @@
{% load static %}
{% load sass_tags %}
{% extends "base/error.html" %}
{% load i18n %}
{% load menu %}

{% get_current_language as LANGUAGE_CODE %}
{% get_available_languages as LANGUAGES %}
{% get_language_info_list for LANGUAGES as languages %}

<!DOCTYPE html>
<html lang="en">
<head>
<title>{% trans "Not found" %}</title>
<link rel="shortcut icon" type="image/png" href="{% static 'favicon.ico' %}"/>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-C6RzsynM9kWDrMNeT87bh95OGNyZPhcTNXj1NW7RuBCsyN/o0jlpcV8Qyq46cDfL" crossorigin="anonymous" defer></script>
<script src="{% static "jquery-3.7.1.min.js" %}"
type="text/javascript"
defer></script>
<link rel="stylesheet" type="text/css" href="{% static 'icons/css/songs.css' %}">
<link rel="stylesheet" type="text/css" href="{% sass_src 'styles.sass' %}">
<link rel="stylesheet" type="text/css" href="{% sass_src 'navbar4.sass' %}">
{% block extra_head %} {% endblock %}
</head>
<body>
<div class="wrap">
<div class="main-div container mt-3 mb-3 pb-3">
<h1 class="mt-2">{% trans "Not found" %}</h1>
<hr>
<p>
{% if exception == "Resolver404" %}
{% blocktranslate with request=request_path trimmed%}
Welp, nothing is at {{ request }}. Like, literally nothing. Not even cockroaches or russians. How did you get here? Are you sure this is the right URL?
{% endblocktranslate %}
{% else %}
{% blocktranslate with exception=exception trimmed%}
It seems you turned wrong somewhere, there is nothing here but small midget wizard with long beard telling you reason what you did wrong:<br> <b>{{ exception }}</b>
{% endblocktranslate %}
{% endif %}
</p>
</div>
</div>
</body>
<script type="module">
$('#options').on('click', function(event){
// The event won't be propagated up to the document NODE and
// therefore delegated events won't be fired
event.stopPropagation();
});
</script>
</html>
{% block header %} {% trans "Not Found" %} (404)<a class="btn btn-primary float-end" href="{{ request.tenant.index_redirect }}">{% trans "Back to homepage" %}</a>{% endblock %}
{% block body %}
{% if exception == "Resolver404" %}
<b>{% blocktranslate with request=request_path trimmed %}
URL {{ request_path }} does not exist.
{% endblocktranslate %}</b>
{% else %}
<b>{{ exception }}</b>
{% endif %}
{% endblock %}
30 changes: 30 additions & 0 deletions frontend/templates/base/error.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{% load static %}
{% load sass_tags %}
{% load i18n %}

<!DOCTYPE html>
<html lang="en">
<head>
<title>{% trans "Not found" %}</title>
<link rel="shortcut icon" type="image/png" href="{{ request.tenant.icon.url }}"/>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-C6RzsynM9kWDrMNeT87bh95OGNyZPhcTNXj1NW7RuBCsyN/o0jlpcV8Qyq46cDfL" crossorigin="anonymous" defer></script>
<script src="{% static "js/jquery-3.7.1.min.js" %}"
type="text/javascript"
defer></script>
<link rel="stylesheet" type="text/css" href="{% static 'icons/css/songs.css' %}">
<link rel="stylesheet" type="text/css" href="{% sass_src 'styles.sass' %}">
{% block extra_head %} {% endblock %}
</head>
<body>
<div class="container mt-3 mb-3 pb-3">
<h1 class="mt-2">{% block header %}{% endblock %}</h1>
<hr>
<p>
{% block body %}{% endblock %}
</p>
</div>
</body>
</html>
Loading