diff options
| author | Adam Tauber <asciimoo@gmail.com> | 2016-12-28 20:09:57 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-12-28 20:09:57 +0100 |
| commit | 9743bde25ef2ce6b765b8192aafcdc0a15739b17 (patch) | |
| tree | 00fd6b0b14773c0e20425d4a6478d67f244d64ed /searx/templates/oscar/preferences.html | |
| parent | ea034fafa994227ea89662710901e73cb901e28c (diff) | |
| parent | 8bff42f049dcac77559beaf2932a47921feb1d49 (diff) | |
Merge pull request #748 from a01200356/languages
[mod] Allow users to search in most engine supported languages
Diffstat (limited to 'searx/templates/oscar/preferences.html')
| -rw-r--r-- | searx/templates/oscar/preferences.html | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/searx/templates/oscar/preferences.html b/searx/templates/oscar/preferences.html index 6ad795095..2a05ea3e3 100644 --- a/searx/templates/oscar/preferences.html +++ b/searx/templates/oscar/preferences.html @@ -40,12 +40,7 @@ {% set language_label = _('Search language') %} {% set language_info = _('What language do you prefer for search?') %} {{ preferences_item_header(language_info, language_label, rtl) }} - <select class="form-control" name='language'> - <option value="all" {% if current_language == 'all' %}selected="selected"{% endif %}>{{ _('Automatic') }}</option> - {% for lang_id,lang_name,country_name in language_codes | sort(attribute=1) %} - <option value="{{ lang_id }}" {% if lang_id == current_language %}selected="selected"{% endif %}>{{ lang_name }} ({{ country_name }}) - {{ lang_id }}</option> - {% endfor %} - </select> + {% include 'oscar/languages.html' %} {{ preferences_item_footer(language_info, language_label, rtl) }} {% set locale_label = _('Interface language') %} @@ -153,6 +148,7 @@ <th>{{ _("Allow") }}</th> <th>{{ _("Engine name") }}</th> <th>{{ _("Shortcut") }}</th> + <th>{{ _("Language support") }}</th> <th>{{ _("SafeSearch") }}</th> <th>{{ _("Time range") }}</th> <th>{{ _("Avg. time") }}</th> @@ -161,6 +157,7 @@ <th>{{ _("Max time") }}</th> <th>{{ _("Avg. time") }}</th> <th>{{ _("SafeSearch") }}</th> + <th>{{ _("Language support") }}</th> <th>{{ _("Shortcut") }}</th> <th>{{ _("Engine name") }}</th> <th>{{ _("Allow") }}</th> @@ -175,6 +172,7 @@ </td> <th>{{ search_engine.name }}</th> <td>{{ shortcuts[search_engine.name] }}</td> + <td><input type="checkbox" {{ "checked" if current_language == 'all' or current_language in search_engine.supported_languages or current_language.split('-')[0] in search_engine.supported_languages else ""}} readonly="readonly" disabled="disabled"></td> <td><input type="checkbox" {{ "checked" if search_engine.safesearch==True else ""}} readonly="readonly" disabled="disabled"></td> <td><input type="checkbox" {{ "checked" if search_engine.time_range_support==True else ""}} readonly="readonly" disabled="disabled"></td> <td class="{{ 'danger' if stats[search_engine.name]['warn_time'] else '' }}">{{ 'N/A' if stats[search_engine.name].time==None else stats[search_engine.name].time }}</td> @@ -183,6 +181,7 @@ <td class="{{ 'danger' if stats[search_engine.name]['warn_timeout'] else '' }}">{{ search_engine.timeout }}</td> <td class="{{ 'danger' if stats[search_engine.name]['warn_time'] else '' }}">{{ 'N/A' if stats[search_engine.name].time==None else stats[search_engine.name].time }}</td> <td><input type="checkbox" {{ "checked" if search_engine.safesearch==True else ""}} readonly="readonly" disabled="disabled"></td> + <td><input type="checkbox" {{ "checked" if current_language == 'all' or current_language in search_engine.supported_languages or current_language.split('-')[0] in search_engine.supported_languages else ""}} readonly="readonly" disabled="disabled"></td> <td>{{ shortcuts[search_engine.name] }}</td> <th>{{ search_engine.name }}</th> <td class="onoff-checkbox"> |