summaryrefslogtreecommitdiff
path: root/searx/templates/simple/preferences.html
diff options
context:
space:
mode:
authorMarkus Heiser <markus.heiser@darmarit.de>2022-07-24 12:06:49 +0200
committerMarkus Heiser <markus.heiser@darmarit.de>2023-04-08 11:10:14 +0200
commitf117f969d85566c4a9df6c8a41ec441756b1bfa8 (patch)
treee69ebf3ed7a48672a202e35521908a715b2ae77e /searx/templates/simple/preferences.html
parentbbb2af7d94cf1e1ea61e5984c7f63cd5de643861 (diff)
downloadsearxng-f117f969d85566c4a9df6c8a41ec441756b1bfa8.tar.gz
searxng-f117f969d85566c4a9df6c8a41ec441756b1bfa8.zip
[mod] in the preference page, show !bang of subgrouping categories
The names of the subgrouping categories in the preference page are translated, to use this categories the user needs to know by which !bang the category can be selected. Related to "Make 'non tab category' bangs discoverable" in [#690]. Related: - [#690] https://github.com/searxng/searxng/issues/690 - https://github.com/searxng/searxng/issues/1604 - https://github.com/searxng/searxng/pull/1545 Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Diffstat (limited to 'searx/templates/simple/preferences.html')
-rw-r--r--searx/templates/simple/preferences.html16
1 files changed, 10 insertions, 6 deletions
diff --git a/searx/templates/simple/preferences.html b/searx/templates/simple/preferences.html
index 70c150581..170dffa39 100644
--- a/searx/templates/simple/preferences.html
+++ b/searx/templates/simple/preferences.html
@@ -32,7 +32,8 @@
{{ _('View error logs and submit a bug report') -}}
</a>
{%- endif -%}
-
+ <p><span class="right">{{ _("!bang for this engine") }}</span>{% for bang in [search_engine.name] + [search_engine.shortcut] %}<span class="bang"> {{ '!' + bang.replace(' ', '_') }}</span>{% endfor %}</p>
+ <p><span class="right">{{ _("!bang for its categories") }}</span>{% for bang in search_engine.categories %}<span class="bang"> {{ '!' + bang.replace(' ', '_') }}</span>{% endfor %}</p>
</div>
{%- endif -%}
{%- endmacro %}
@@ -309,7 +310,7 @@
<tr>{{- "" -}}
<th class="engine_checkbox">{{ _("Allow") }}</th>{{- "" -}}
<th class="name">{{ _("Engine name") }}</th>{{- "" -}}
- <th class="shortcut">{{ _("!bang") }}</th>{{- "" -}}
+ <th class="shortcut">{{ _("Bang") }}</th>{{- "" -}}
<th>{{ _("Supports selected language") }}</th>{{- "" -}}
<th>{{ _("SafeSearch") }}</th>{{- "" -}}
<th>{{ _("Time range") }}</th>{{- "" -}}
@@ -317,9 +318,12 @@
<th>{{ _("Max time") }}</th>{{- "" -}}
{%- if enable_metrics %}<th>{{ _("Reliability") }}</th>{% endif -%}
</tr>
- {% for group, engines in engines_by_category[categ] | group_engines_in_tab %}
+ {% for group, group_bang, engines in engines_by_category[categ] | group_engines_in_tab %}
{% if loop.length > 1 %}
- <tr><th colspan="9" class="engine-group">{{_(group)}}</th></tr>
+ <tr>
+ <th class="engine-group" colspan="2">{{_(group)}}</th>
+ <th class="engine-group" colspan="7">{% if group_bang %}<span class="bang">{{group_bang}}</span>{% endif %}</th>
+ </tr>{{- "" -}}
{% endif %}
{% for search_engine in engines %}
{% if not search_engine.private %}
@@ -329,13 +333,13 @@
<th class="name" data-engine-name="{{ search_engine.name }}">{% if search_engine.enable_http %}{{ icon_big('warning', 'No HTTPS') }}{% endif -%}
<label for="{{ engine_id }}">
{{- search_engine.name -}}
- {%- if search_engine.about and search_engine.about.language -%}
+ {%- if search_engine.about and search_engine.about.language %}
({{search_engine.about.language | upper}})
{%- endif -%}
</label>
{{- engine_about(search_engine) -}}
</th>{{- "" -}}
- <td class="shortcut">{{ shortcuts[search_engine.name] }}</td>{{- "" -}}
+ <td class="shortcut"><span class="bang">{{ '!' + shortcuts[search_engine.name] }}</span></td>{{- "" -}}
<td>{{ checkbox(None, supports[search_engine.name]['supports_selected_language'], true) }}</td>{{- "" -}}
<td>{{ checkbox(None, supports[search_engine.name]['safesearch'], true) }}</td>{{- "" -}}
<td>{{ checkbox(None, supports[search_engine.name]['time_range_support'], true) }}</td>{{- "" -}}