diff options
| author | Alexandre Flament <alex@al-f.net> | 2021-03-16 11:07:04 +0100 |
|---|---|---|
| committer | Alexandre Flament <alex@al-f.net> | 2021-03-16 11:22:21 +0100 |
| commit | 6553c7902925809fd1cbc904dd08db035466a6b2 (patch) | |
| tree | b19fa74d6027dd64bd9f3b04b3b71f627940d20b /searx/static/themes/oscar/js/searx.js | |
| parent | cb3b379161e3351d4829b2e37478125582b9fc08 (diff) | |
[mod] replace /translations.js by embedded JSON
In webapp.py, there is a new function "get_translations" lists available translations
Close #2064
Diffstat (limited to 'searx/static/themes/oscar/js/searx.js')
| -rw-r--r-- | searx/static/themes/oscar/js/searx.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/searx/static/themes/oscar/js/searx.js b/searx/static/themes/oscar/js/searx.js index 159344b28..163009481 100644 --- a/searx/static/themes/oscar/js/searx.js +++ b/searx/static/themes/oscar/js/searx.js @@ -25,7 +25,8 @@ window.searx = (function(d) { return { autocompleter: script.getAttribute('data-autocompleter') === 'true', - method: script.getAttribute('data-method') + method: script.getAttribute('data-method'), + translations: JSON.parse(script.getAttribute('data-translations')) }; })(document); ;/** @@ -302,7 +303,7 @@ $(document).ready(function(){ } }) .fail(function() { - $(result_table_loadicon).html($(result_table_loadicon).html() + "<p class=\"text-muted\">"+could_not_load+"</p>"); + $(result_table_loadicon).html($(result_table_loadicon).html() + "<p class=\"text-muted\">"+searx.translations.could_not_load+"</p>"); }); } } |