浏览代码

[fix] 404 page localization

Adam Tauber 8 年前
父节点
当前提交
c2f4d4449d

+ 3
- 1
searx/templates/courgette/404.html 查看文件

@@ -2,6 +2,8 @@
2 2
 {% block content %}
3 3
 <div class="center">
4 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 8
 </div>
7 9
 {% endblock %}

+ 3
- 1
searx/templates/default/404.html 查看文件

@@ -2,6 +2,8 @@
2 2
 {% block content %}
3 3
 <div class="center">
4 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 8
 </div>
7 9
 {% endblock %}

+ 3
- 1
searx/templates/oscar/404.html 查看文件

@@ -2,6 +2,8 @@
2 2
 {% block content %}
3 3
 <div class="text-center">
4 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 8
 </div>
7 9
 {% endblock %}

+ 3
- 1
searx/templates/pix-art/404.html 查看文件

@@ -2,6 +2,8 @@
2 2
 {% block content %}
3 3
 <div class="center">
4 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 8
 </div>
7 9
 {% endblock %}