Browse Source

[fix] 404 page localization

Adam Tauber 8 years ago
parent
commit
c2f4d4449d

+ 3
- 1
searx/templates/courgette/404.html View File

2
 {% block content %}
2
 {% block content %}
3
 <div class="center">
3
 <div class="center">
4
     <h1>{{ _('Page not found') }}</h1>
4
     <h1>{{ _('Page not found') }}</h1>
5
-    <p>{{ _('Go to <a href="/">search page</a>.') }}</p>
5
+    {% autoescape false %}
6
+    <p>{{ _('Go to %(search_page)s.', search_page='<a href="{}">{}</a>'.format(url_for('index'), _('search page'))) }}</p>
7
+    {% endautoescape %}
6
 </div>
8
 </div>
7
 {% endblock %}
9
 {% endblock %}

+ 3
- 1
searx/templates/default/404.html View File

2
 {% block content %}
2
 {% block content %}
3
 <div class="center">
3
 <div class="center">
4
     <h1>{{ _('Page not found') }}</h1>
4
     <h1>{{ _('Page not found') }}</h1>
5
-    <p>{{ _('Go to <a href="/">search page</a>.') }}</p>
5
+    {% autoescape false %}
6
+    <p>{{ _('Go to %(search_page)s.', search_page='<a href="{}">{}</a>'.format(url_for('index'), _('search page'))) }}</p>
7
+    {% endautoescape %}
6
 </div>
8
 </div>
7
 {% endblock %}
9
 {% endblock %}

+ 3
- 1
searx/templates/oscar/404.html View File

2
 {% block content %}
2
 {% block content %}
3
 <div class="text-center">
3
 <div class="text-center">
4
     <h1>{{ _('Page not found') }}</h1>
4
     <h1>{{ _('Page not found') }}</h1>
5
-    <p>{{ _('Go to <a href="/">search page</a>.') }}</p>
5
+    {% autoescape false %}
6
+    <p>{{ _('Go to %(search_page)s.', search_page='<a href="{}">{}</a>'.format(url_for('index'), _('search page'))) }}</p>
7
+    {% endautoescape %}
6
 </div>
8
 </div>
7
 {% endblock %}
9
 {% endblock %}

+ 3
- 1
searx/templates/pix-art/404.html View File

2
 {% block content %}
2
 {% block content %}
3
 <div class="center">
3
 <div class="center">
4
     <h1>{{ _('Page not found') }}</h1>
4
     <h1>{{ _('Page not found') }}</h1>
5
-    <p>{{ _('Go to <a href="/">search page</a>.') }}</p>
5
+    {% autoescape false %}
6
+    <p>{{ _('Go to %(search_page)s.', search_page='<a href="{}">{}</a>'.format(url_for('index'), _('search page'))) }}</p>
7
+    {% endautoescape %}
6
 </div>
8
 </div>
7
 {% endblock %}
9
 {% endblock %}