summaryrefslogtreecommitdiff
path: root/searx/webapp.py
diff options
context:
space:
mode:
authorAdam Tauber <asciimoo@gmail.com>2020-06-15 18:25:05 +0200
committerAdam Tauber <asciimoo@gmail.com>2020-06-15 18:31:14 +0200
commit4ca0d8cb0fd6c0e6b1301a6e8577aea6d928e9dc (patch)
treea95bdb8507a7fe944f59387d0fe9a30c53ac4af6 /searx/webapp.py
parent6fb5c6aad920b31599292bdffa1dd2ab2f7d1adc (diff)
downloadsearxng-4ca0d8cb0fd6c0e6b1301a6e8577aea6d928e9dc.tar.gz
searxng-4ca0d8cb0fd6c0e6b1301a6e8577aea6d928e9dc.zip
[enh] add translatable strings to javascript - closes #461
Diffstat (limited to 'searx/webapp.py')
-rwxr-xr-xsearx/webapp.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/searx/webapp.py b/searx/webapp.py
index 2ba8ccfb8..68be25584 100755
--- a/searx/webapp.py
+++ b/searx/webapp.py
@@ -1021,6 +1021,14 @@ def config():
})
+@app.route('/translations.js')
+def js_translations():
+ return render(
+ 'translations.js.tpl',
+ override_theme='__common__',
+ ), {'Content-Type': 'text/javascript; charset=UTF-8'}
+
+
@app.errorhandler(404)
def page_not_found(e):
return render('404.html'), 404