diff options
author | Alexandre Flament <alex@al-f.net> | 2021-03-21 12:39:26 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-21 12:39:26 +0100 |
commit | 30c950a2c7c805debfa5e32efed5eb3ff4e86b64 (patch) | |
tree | ccda6a40722393bc41e87e447e241f924a5338f7 /searx/templates | |
parent | 12fa524cf7ceb6bb7c85307420551a13e95a1ada (diff) | |
parent | 6553c7902925809fd1cbc904dd08db035466a6b2 (diff) | |
download | searxng-30c950a2c7c805debfa5e32efed5eb3ff4e86b64.tar.gz searxng-30c950a2c7c805debfa5e32efed5eb3ff4e86b64.zip |
Merge pull request #2660 from dalf/upd-translations
[mod] replace /translations.js with an embedded JSON
Diffstat (limited to 'searx/templates')
-rw-r--r-- | searx/templates/__common__/translations.js.tpl | 1 | ||||
-rw-r--r-- | searx/templates/oscar/base.html | 4 | ||||
-rw-r--r-- | searx/templates/simple/base.html | 3 |
3 files changed, 3 insertions, 5 deletions
diff --git a/searx/templates/__common__/translations.js.tpl b/searx/templates/__common__/translations.js.tpl deleted file mode 100644 index 8453aba69..000000000 --- a/searx/templates/__common__/translations.js.tpl +++ /dev/null @@ -1 +0,0 @@ -var could_not_load = '{{ _('could not load data') }}!'; diff --git a/searx/templates/oscar/base.html b/searx/templates/oscar/base.html index f8345d9a7..b5c6ed258 100644 --- a/searx/templates/oscar/base.html +++ b/searx/templates/oscar/base.html @@ -9,7 +9,6 @@ <meta name="referrer" content="no-referrer"> <meta name="viewport" content="width=device-width, initial-scale=1 , maximum-scale=2.0, user-scalable=1" /> {% block meta %}{% endblock %} - <script src="{{ url_for('js_translations') }}"></script> <title>{% block title %}{% endblock %}{{ instance_name }}</title> <link rel="stylesheet" href="{{ url_for('static', filename='css/bootstrap.min.css') }}" type="text/css" /> {% if preferences.get_value('oscar-style') -%} @@ -99,7 +98,8 @@ <script src="{{ url_for('static', filename='js/searx.min.js') }}" data-method="{{ method or 'POST' }}" - data-autocompleter="{% if autocomplete %}true{% else %}false{% endif %}"></script> + data-autocompleter="{% if autocomplete %}true{% else %}false{% endif %}" + data-translations="{{ translations }}"></script> {% for script in scripts %} {{""}}<script src="{{ url_for('static', filename=script) }}"></script> {% endfor %} diff --git a/searx/templates/simple/base.html b/searx/templates/simple/base.html index a7255e672..17c9785e7 100644 --- a/searx/templates/simple/base.html +++ b/searx/templates/simple/base.html @@ -12,7 +12,6 @@ <meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1"> <title>{% block title %}{% endblock %}{{ instance_name }}</title> {% block meta %}{% endblock %} - <script src="{{ url_for('js_translations') }}"></script> {% if rtl %} <link rel="stylesheet" href="{{ url_for('static', filename='css/searx-rtl.min.css') }}" type="text/css" media="screen" /> {% else %} @@ -26,7 +25,7 @@ data-search-on-category-select="{{ 'true' if 'plugins/js/search_on_category_select.js' in scripts else 'false'}}" data-infinite-scroll="{{ 'true' if 'plugins/js/infinite_scroll.js' in scripts else 'false' }}" data-static-path="{{ url_for('static', filename='themes/simple') }}/" - data-no-item-found="{{ _('No item found') }}"></script> + data-translations="{{ translations }}"></script> <!--<![endif]--> {% block head %} <link title="{{ instance_name }}" type="application/opensearchdescription+xml" rel="search" href="{{ opensearch_url }}"/> |