summaryrefslogtreecommitdiff
path: root/searx/webapp.py
diff options
context:
space:
mode:
Diffstat (limited to 'searx/webapp.py')
-rwxr-xr-xsearx/webapp.py39
1 files changed, 5 insertions, 34 deletions
diff --git a/searx/webapp.py b/searx/webapp.py
index 8c3e78deb..2f27d0f64 100755
--- a/searx/webapp.py
+++ b/searx/webapp.py
@@ -80,7 +80,6 @@ from searx.webutils import (
new_hmac,
is_hmac_of,
is_flask_run_cmdline,
- DEFAULT_GROUP_NAME,
group_engines_in_tab,
)
from searx.webadapter import (
@@ -167,35 +166,6 @@ app.secret_key = settings['server']['secret_key']
babel = Babel(app)
-# used when translating category names
-_category_names = (
- gettext('files'),
- gettext('general'),
- gettext('music'),
- gettext('social media'),
- gettext('images'),
- gettext('videos'),
- gettext('it'),
- gettext('news'),
- gettext('map'),
- gettext('onions'),
- gettext('science'),
- # non-tab categories
- gettext('apps'),
- gettext('dictionaries'),
- gettext('lyrics'),
- gettext('packages'),
- gettext('q&a'),
- gettext('repos'),
- gettext('software wikis'),
- gettext('web'),
- gettext(DEFAULT_GROUP_NAME),
- gettext(OTHER_CATEGORY),
-)
-
-_simple_style = (gettext('auto'), gettext('light'), gettext('dark'))
-
-#
timeout_text = gettext('timeout')
parsing_error_text = gettext('parsing error')
http_protocol_error_text = gettext('HTTP protocol error')
@@ -380,10 +350,11 @@ def custom_url_for(endpoint: str, override_theme: Optional[str] = None, **values
if endpoint == 'static' and values.get('filename'):
theme_name = get_current_theme_name(override=override_theme)
filename_with_theme = "themes/{}/{}".format(theme_name, values['filename'])
- file_hash = static_files.get(filename_with_theme)
- if file_hash:
- values['filename'] = filename_with_theme
- suffix = "?" + file_hash
+ values['filename'] = filename_with_theme
+ if get_setting('ui.static_use_hash', False):
+ file_hash = static_files.get(filename_with_theme)
+ if file_hash:
+ suffix = "?" + file_hash
if endpoint == 'info' and 'locale' not in values:
locale = request.preferences.get_value('locale')
if _INFO_PAGES.get_page(values['pagename'], locale) is None: