From e8498e6bc7a489f912f027f5dba9cab9d8d0120e Mon Sep 17 00:00:00 2001 From: Benjamin Bach Date: Tue, 11 Oct 2022 15:56:21 +0200 Subject: [PATCH 1/4] Adds more basic info to the default 404 page --- readthedocs/templates/404.html | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/readthedocs/templates/404.html b/readthedocs/templates/404.html index a364ec864c5..456d5043d6c 100644 --- a/readthedocs/templates/404.html +++ b/readthedocs/templates/404.html @@ -15,7 +15,11 @@ {# Hide the language select form so we don't set a CSRF cookie #} {% block language-select-form %}{% endblock %} +

{% blocktrans context "404 page" %}This is a 404 page. The link you have followed or the URL that you entered did not work. It might be that the documentation has been updated.{% endblocktrans %}

+ {% block content %} +{% blocktrans context "404 page" %}Back to the main page{% endblocktrans %} +
 
         \          SORRY            /

From cedc1e7582fe5af4d2fb47c04d9e5afda41004fc Mon Sep 17 00:00:00 2001
From: Benjamin Bach 
Date: Tue, 11 Oct 2022 16:26:26 +0200
Subject: [PATCH 2/4] tweak text: "404 error page"

---
 readthedocs/templates/404.html | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/readthedocs/templates/404.html b/readthedocs/templates/404.html
index 456d5043d6c..64e23809d99 100644
--- a/readthedocs/templates/404.html
+++ b/readthedocs/templates/404.html
@@ -15,7 +15,7 @@
 {# Hide the language select form so we don't set a CSRF cookie #}
 {% block language-select-form %}{% endblock %}
 
-

{% blocktrans context "404 page" %}This is a 404 page. The link you have followed or the URL that you entered did not work. It might be that the documentation has been updated.{% endblocktrans %}

+

{% blocktrans context "404 page" %}This is a 404 error page. The link you have followed or the URL that you entered did not work. It might be that the documentation has been updated.{% endblocktrans %}

{% block content %} {% blocktrans context "404 page" %}Back to the main page{% endblocktrans %} From 30966182acbb031b7fbde3df389d19b21a536f78 Mon Sep 17 00:00:00 2001 From: Benjamin Bach Date: Wed, 12 Oct 2022 16:21:57 +0200 Subject: [PATCH 3/4] Use request.get_host to contextualize the 404 message slightly --- readthedocs/templates/404.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/readthedocs/templates/404.html b/readthedocs/templates/404.html index 64e23809d99..528624b38b8 100644 --- a/readthedocs/templates/404.html +++ b/readthedocs/templates/404.html @@ -15,10 +15,10 @@ {# Hide the language select form so we don't set a CSRF cookie #} {% block language-select-form %}{% endblock %} +{% block content %}

{% blocktrans context "404 page" %}This is a 404 error page. The link you have followed or the URL that you entered did not work. It might be that the documentation has been updated.{% endblocktrans %}

-{% block content %} -{% blocktrans context "404 page" %}Back to the main page{% endblocktrans %} +{% blocktrans with site_name=request.get_host|default:_("this site") context "404 page" %}Back to the front page of {{ site_name }}{% endblocktrans %}
 

From 5f8a0ca3fccbc597f68d823c495b6dff805eb331 Mon Sep 17 00:00:00 2001
From: Benjamin Balder Bach 
Date: Thu, 13 Oct 2022 00:27:14 +0200
Subject: [PATCH 4/4] Update readthedocs/templates/404.html

Co-authored-by: Eric Holscher <25510+ericholscher@users.noreply.github.com>
---
 readthedocs/templates/404.html | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/readthedocs/templates/404.html b/readthedocs/templates/404.html
index 528624b38b8..3dfa2fd6268 100644
--- a/readthedocs/templates/404.html
+++ b/readthedocs/templates/404.html
@@ -16,7 +16,7 @@
 {% block language-select-form %}{% endblock %}
 
 {% block content %}
-

{% blocktrans context "404 page" %}This is a 404 error page. The link you have followed or the URL that you entered did not work. It might be that the documentation has been updated.{% endblocktrans %}

+

{% blocktrans context "404 page" %}This is a 404 error page. The link you have followed or the URL that you entered does not exist. It might be that the documentation has been updated, or this page has been removed.{% endblocktrans %}

{% blocktrans with site_name=request.get_host|default:_("this site") context "404 page" %}Back to the front page of {{ site_name }}{% endblocktrans %}