diff --git a/searx/engines/__init__.py b/searx/engines/__init__.py index bc7b3b3bc..96b074ae9 100644 --- a/searx/engines/__init__.py +++ b/searx/engines/__init__.py @@ -26,6 +26,7 @@ from searx import settings from searx.utils import gen_useragent import sys from datetime import datetime +from flask.ext.babel import gettext engine_dir = dirname(realpath(__file__)) @@ -269,15 +270,24 @@ def get_engines_stats(): engine['percentage'] = 0 return [ - ('Page loads (sec)', sorted(pageloads, key=itemgetter('avg'))), ( - 'Number of results', + gettext('Page loads (sec)'), + sorted(pageloads, key=itemgetter('avg')) + ), + ( + gettext('Number of results'), sorted(results, key=itemgetter('avg'), reverse=True) ), - ('Scores', sorted(scores, key=itemgetter('avg'), reverse=True)), ( - 'Scores per result', + gettext('Scores'), + sorted(scores, key=itemgetter('avg'), reverse=True) + ), + ( + gettext('Scores per result'), sorted(scores_per_result, key=itemgetter('avg'), reverse=True) ), - ('Errors', sorted(errors, key=itemgetter('avg'), reverse=True)), + ( + gettext('Errors'), + sorted(errors, key=itemgetter('avg'), reverse=True) + ), ] diff --git a/searx/templates/engines.html b/searx/templates/engines.html index 1f52dc09f..008e860f1 100644 --- a/searx/templates/engines.html +++ b/searx/templates/engines.html @@ -1,12 +1,12 @@ {% extends 'base.html' %} {% block content %}
-

Currently used search engines

+

{{ _('Currently used search engines') }}

- - + + {% for (categ,search_engines) in categs %} {% for search_engine in search_engines %} @@ -20,7 +20,6 @@ {% endfor %} {% endfor %}
Engine nameCategory{{ _('Engine name') }}{{ _('Category') }}
-

Please add more engines to this list, pull requests are welcome!

-

back

+

{{ _('back') }}

{% endblock %} diff --git a/searx/templates/index.html b/searx/templates/index.html index d9fa3b502..18320ae09 100644 --- a/searx/templates/index.html +++ b/searx/templates/index.html @@ -4,8 +4,8 @@

searx

{% include 'search.html' %}

- about - preferences + {{ _('about') }} + {{ _('preferences') }}

{% endblock %} diff --git a/searx/templates/preferences.html b/searx/templates/preferences.html index 705139e58..d47dd4834 100644 --- a/searx/templates/preferences.html +++ b/searx/templates/preferences.html @@ -2,18 +2,18 @@ {% block head %} {% endblock %} {% block content %}
-

Preferences

+

{{ _('Preferences') }}

- Default categories + {{ _('Default categories') }}

{% include 'categories.html' %}

- +
-
back
+
{{ _('back') }}
{% endblock %} diff --git a/searx/templates/results.html b/searx/templates/results.html index 0fb9250ca..238671878 100644 --- a/searx/templates/results.html +++ b/searx/templates/results.html @@ -7,12 +7,12 @@
{% if suggestions %} -
Suggestions: {% for suggestion in suggestions %}
{% endfor %}
+
{{ _('Suggestions') }}:{% for suggestion in suggestions %}
{% endfor %}
{% endif %}
- Number of results: {{ number_of_results }} + {{ _('Number of results') }}: {{ number_of_results }}
{% for result in results %} @@ -23,7 +23,7 @@ {% endif %} {% endfor %}
- Download results + {{ _('Download results') }}
diff --git a/searx/templates/stats.html b/searx/templates/stats.html index 933616e32..cb5757b31 100644 --- a/searx/templates/stats.html +++ b/searx/templates/stats.html @@ -1,7 +1,7 @@ {% extends "base.html" %} {% block head %} {% endblock %} {% block content %} -

Engine stats

+

{{ _('Engine stats') }}

{% for stat_name,stat_category in stats %}