on master help sign in
Merge branch 'master' of https://github.com/asciimoo/searx into csp-oscar-theme
commita3431d59d381ff3b5cfb70a2b12ef0518821ed95 authorMarkus Heiser <markus.heiser@darmarit.de> dateMon 1 Jun 2020, 09:18 (6 years ago) parentc9f9e7d19e32dc
19 files changed+65−27
docs/admin/engines.rst+4 docs/admin/settings.rst+4−1 docs/dev/engine_overview.rst+1 searx/engines/__init__.py+1 searx/results.py+2−1 searx/settings.yml+1−1 searx/static/themes/oscar/js/searx.js+10 searx/static/themes/oscar/js/searx.min.js+2−2 searx/static/themes/oscar/js/searx_src/toggleall.js+10 searx/templates/courgette/search.html+1−1 searx/templates/legacy/search.html+1−1 searx/templates/oscar/preferences.html+22−14 searx/templates/oscar/search.html+1−1 searx/templates/oscar/search_full.html+1−1 searx/templates/pix-art/search.html+1−1 searx/templates/simple/search.html+1−1 searx/translations/fa_IR/LC_MESSAGES/messages.mo searx/translations/fa_IR/LC_MESSAGES/messages.po+1−1 searx/webapp.py+1−1
docs/admin/engines.rst+4
@@ -26,6 +26,8 @@ Safe search **SS**
2626Weigth **W**
2727------------- ----------- ---------------------------------
2828Disabled **D**
29+------------- ----------- ---------------------------------
30+Show errors **DE**
2931============= =========== =================================
3032
3133Configuration defaults (at built time):
@@ -51,6 +53,7 @@ Configuration defaults (at built time):
5153 - O
5254 - W
5355 - D
56+ - DE
5457
5558 {% for name, mod in engines.items() %}
5659
@@ -67,5 +70,6 @@ Configuration defaults (at built time):
6770 - {{(mod.offline and "y") or ""}}
6871 - {{mod.weight or 1 }}
6972 - {{(mod.disabled and "y") or ""}}
73+ - {{(mod.display_error_messages and "y") or ""}}
7074
7175 {% endfor %}
docs/admin/settings.rst+4−1
@@ -98,7 +98,7 @@ Global Settings
9898 specific instance of searx, a locale can be defined using an ISO language
9999 code, like ``fr``, ``en``, ``de``.
100100
101−.. _requests proxies: http://docs.python-requests.org/en/latest/user/advanced/#proxies
101+.. _requests proxies: http://requests.readthedocs.io/en/latest/user/advanced/#proxies
102102.. _PR SOCKS support: https://github.com/kennethreitz/requests/pull/478
103103
104104``outgoing_proxies`` :
@@ -175,6 +175,9 @@ Engine settings
175175``weigth`` : default ``1``
176176 Weighting of the results of this engine.
177177
178+``display_error_messages`` : default ``True``
179+ When an engine returns an error, the message is displayed on the user interface.
180+
178181.. note::
179182
180183 A few more options are possible, but they are pretty specific to some
docs/dev/engine_overview.rst+1
@@ -57,6 +57,7 @@ engine string name of searx-engine
5757 (filename without ``.py``)
5858shortcut string shortcut of search-engine
5959timeout string specific timeout for search-engine
60+display_error_messages boolean display error messages on the web UI
6061======================= =========== ===========================================
6162
6263
searx/engines/__init__.py+1
@@ -55,6 +55,7 @@ engine_default_args = {'paging': False,
5555 'continuous_errors': 0,
5656 'time_range_support': False,
5757 'offline': False,
58+ 'display_error_messages': True,
5859 'tokens': []}
5960
6061
searx/results.py+2−1
@@ -346,7 +346,8 @@ class ResultContainer(object):
346346 return resultnum_sum / len(self._number_of_results)
347347
348348 def add_unresponsive_engine(self, engine_name, error_type, error_message=None):
349− self.unresponsive_engines.add((engine_name, error_type, error_message))
349+ if engines[engine_name].display_error_messages:
350+ self.unresponsive_engines.add((engine_name, error_type, error_message))
350351
351352 def add_timing(self, engine_name, engine_time, page_load_time):
352353 self.timings.append({
searx/settings.yml+1−1
@@ -41,7 +41,7 @@ outgoing: # communication with search engines
4141 pool_maxsize : 10 # Number of simultaneous requests by host
4242# uncomment below section if you want to use a proxy
4343# see http://docs.python-requests.org/en/latest/user/advanced/#proxies
44−# SOCKS proxies are also supported: see http://docs.python-requests.org/en/master/user/advanced/#socks
44+# SOCKS proxies are also supported: see http://requests.readthedocs.io/en/master/user/advanced/#socks
4545# proxies :
4646# http : http://127.0.0.1:8080
4747# https: http://127.0.0.1:8080
searx/static/themes/oscar/js/searx.js+10
@@ -357,3 +357,13 @@ $(document).ready(function(){
357357 $( this ).off( event );
358358 });
359359});
360+;$(document).ready(function(){
361+ $("#allow-all-engines").click(function() {
362+ $(".onoffswitch-checkbox").each(function() { this.checked = false;});
363+ });
364+
365+ $("#disable-all-engines").click(function() {
366+ $(".onoffswitch-checkbox").each(function() { this.checked = true;});
367+ });
368+});
369+
searx/static/themes/oscar/js/searx.min.js+2−2
@@ -1,2 +1,2 @@
1−/*! oscar/searx.min.js | 23-03-2020 | https://github.com/asciimoo/searx */
2−requirejs.config({baseUrl:"./static/themes/oscar/js",paths:{app:"../app"}}),window.searx=function(a){"use strict";var b=a.currentScript||function(){var b=a.getElementsByTagName("script");return b[b.length-1]}();return{autocompleter:"true"===b.getAttribute("data-autocompleter"),method:b.getAttribute("data-method")}}(document),searx.autocompleter&&(searx.searchResults=new Bloodhound({datumTokenizer:Bloodhound.tokenizers.obj.whitespace("value"),queryTokenizer:Bloodhound.tokenizers.whitespace,remote:"./autocompleter?q=%QUERY"}),searx.searchResults.initialize()),$(document).ready(function(){searx.autocompleter&&($("#q").typeahead(null,{name:"search-results",displayKey:function(a){return a},source:searx.searchResults.ttAdapter()}),$("#q").bind("typeahead:selected",function(a,b){$("#search_form").submit()}))}),$(document).ready(function(){$("#q.autofocus").focus(),$(".select-all-on-click").click(function(){$(this).select()}),$(".btn-collapse").click(function(){var a=$(this).data("btn-text-collapsed"),b=$(this).data("btn-text-not-collapsed");""!==a&&""!==b&&($(this).hasClass("collapsed")?new_html=$(this).html().replace(a,b):new_html=$(this).html().replace(b,a),$(this).html(new_html))}),$(".btn-toggle .btn").click(function(){var a="btn-"+$(this).data("btn-class"),b=$(this).data("btn-label-default"),c=$(this).data("btn-label-toggled");""!==c&&($(this).hasClass("btn-default")?new_html=$(this).html().replace(b,c):new_html=$(this).html().replace(c,b),$(this).html(new_html)),$(this).toggleClass(a),$(this).toggleClass("btn-default")}),$(".media-loader").click(function(){var a=$(this).data("target"),b=$(a+" > iframe"),c=b.attr("src");void 0!==c&&c!==!1||b.attr("src",b.data("src"))}),$(".btn-sm").dblclick(function(){var a="btn-"+$(this).data("btn-class");$(this).hasClass("btn-default")?($(".btn-sm > input").attr("checked","checked"),$(".btn-sm > input").prop("checked",!0),$(".btn-sm").addClass(a),$(".btn-sm").addClass("active"),$(".btn-sm").removeClass("btn-default")):($(".btn-sm > input").attr("checked",""),$(".btn-sm > input").removeAttr("checked"),$(".btn-sm > input").checked=!1,$(".btn-sm").removeClass(a),$(".btn-sm").removeClass("active"),$(".btn-sm").addClass("btn-default"))})}),$(document).ready(function(){$(".searx_overpass_request").on("click",function(a){var b="https://overpass-api.de/api/interpreter?data=",c=b+"[out:json][timeout:25];(",d=");out meta;",e=$(this).data("osm-id"),f=$(this).data("osm-type"),g=$(this).data("result-table"),h="#"+$(this).data("result-table-loadicon"),i=["addr:city","addr:country","addr:housenumber","addr:postcode","addr:street"];if(e&&f&&g){g="#"+g;var j=null;switch(f){case"node":j=c+"node("+e+");"+d;break;case"way":j=c+"way("+e+");"+d;break;case"relation":j=c+"relation("+e+");"+d}if(j){$.ajax(j).done(function(a){if(a&&a.elements&&a.elements[0]){var b=a.elements[0],c=$(g).html();for(var d in b.tags)if(null===b.tags.name||i.indexOf(d)==-1){switch(c+="<tr><td>"+d+"</td><td>",d){case"phone":case"fax":c+='<a href="tel:'+b.tags[d].replace(/ /g,"")+'">'+b.tags[d]+"</a>";break;case"email":c+='<a href="mailto:'+b.tags[d]+'">'+b.tags[d]+"</a>";break;case"website":case"url":c+='<a href="'+b.tags[d]+'">'+b.tags[d]+"</a>";break;case"wikidata":c+='<a href="https://www.wikidata.org/wiki/'+b.tags[d]+'">'+b.tags[d]+"</a>";break;case"wikipedia":if(b.tags[d].indexOf(":")!=-1){c+='<a href="https://'+b.tags[d].substring(0,b.tags[d].indexOf(":"))+".wikipedia.org/wiki/"+b.tags[d].substring(b.tags[d].indexOf(":")+1)+'">'+b.tags[d]+"</a>";break}default:c+=b.tags[d]}c+="</td></tr>"}$(g).html(c),$(g).removeClass("hidden"),$(h).addClass("hidden")}}).fail(function(){$(h).html($(h).html()+'<p class="text-muted">could not load data!</p>')})}}$(this).off(a)}),$(".searx_init_map").on("click",function(a){var b=$(this).data("leaflet-target"),c=$(this).data("map-lon"),d=$(this).data("map-lat"),e=$(this).data("map-zoom"),f=$(this).data("map-boundingbox"),g=$(this).data("map-geojson");require(["leaflet-0.7.3.min"],function(a){f&&(southWest=L.latLng(f[0],f[2]),northEast=L.latLng(f[1],f[3]),map_bounds=L.latLngBounds(southWest,northEast)),L.Icon.Default.imagePath="./static/themes/oscar/img/map";var h=L.map(b),i="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",j='Map data © <a href="https://openstreetmap.org">OpenStreetMap</a> contributors',k=new L.TileLayer(i,{minZoom:1,maxZoom:19,attribution:j}),l="https://maps.wikimedia.org/osm-intl/{z}/{x}/{y}.png",m='Wikimedia maps beta | Maps data © <a href="https://openstreetmap.org">OpenStreetMap</a> contributors';new L.TileLayer(l,{minZoom:1,maxZoom:19,attribution:m});map_bounds?setTimeout(function(){h.fitBounds(map_bounds,{maxZoom:17})},0):c&&d&&(e?h.setView(new L.LatLng(d,c),e):h.setView(new L.LatLng(d,c),8)),h.addLayer(k);var n={"OSM Mapnik":k};L.control.layers(n).addTo(h),g&&L.geoJson(g).addTo(h)}),$(this).off(a)})});
1+/*! oscar/searx.min.js | 31-05-2020 | */
2+requirejs.config({baseUrl:"./static/themes/oscar/js",paths:{app:"../app"}}),window.searx=function(a){"use strict";var b=a.currentScript||function(){var b=a.getElementsByTagName("script");return b[b.length-1]}();return{autocompleter:"true"===b.getAttribute("data-autocompleter"),method:b.getAttribute("data-method")}}(document),searx.autocompleter&&(searx.searchResults=new Bloodhound({datumTokenizer:Bloodhound.tokenizers.obj.whitespace("value"),queryTokenizer:Bloodhound.tokenizers.whitespace,remote:"./autocompleter?q=%QUERY"}),searx.searchResults.initialize()),$(document).ready(function(){searx.autocompleter&&($("#q").typeahead(null,{name:"search-results",displayKey:function(a){return a},source:searx.searchResults.ttAdapter()}),$("#q").bind("typeahead:selected",function(a,b){$("#search_form").submit()}))}),$(document).ready(function(){$("#q.autofocus").focus(),$(".select-all-on-click").click(function(){$(this).select()}),$(".btn-collapse").click(function(){var a=$(this).data("btn-text-collapsed"),b=$(this).data("btn-text-not-collapsed");""!==a&&""!==b&&($(this).hasClass("collapsed")?new_html=$(this).html().replace(a,b):new_html=$(this).html().replace(b,a),$(this).html(new_html))}),$(".btn-toggle .btn").click(function(){var a="btn-"+$(this).data("btn-class"),b=$(this).data("btn-label-default"),c=$(this).data("btn-label-toggled");""!==c&&($(this).hasClass("btn-default")?new_html=$(this).html().replace(b,c):new_html=$(this).html().replace(c,b),$(this).html(new_html)),$(this).toggleClass(a),$(this).toggleClass("btn-default")}),$(".media-loader").click(function(){var a=$(this).data("target"),b=$(a+" > iframe"),c=b.attr("src");void 0!==c&&c!==!1||b.attr("src",b.data("src"))}),$(".btn-sm").dblclick(function(){var a="btn-"+$(this).data("btn-class");$(this).hasClass("btn-default")?($(".btn-sm > input").attr("checked","checked"),$(".btn-sm > input").prop("checked",!0),$(".btn-sm").addClass(a),$(".btn-sm").addClass("active"),$(".btn-sm").removeClass("btn-default")):($(".btn-sm > input").attr("checked",""),$(".btn-sm > input").removeAttr("checked"),$(".btn-sm > input").checked=!1,$(".btn-sm").removeClass(a),$(".btn-sm").removeClass("active"),$(".btn-sm").addClass("btn-default"))})}),$(document).ready(function(){$(".searx_overpass_request").on("click",function(a){var b="https://overpass-api.de/api/interpreter?data=",c=b+"[out:json][timeout:25];(",d=");out meta;",e=$(this).data("osm-id"),f=$(this).data("osm-type"),g=$(this).data("result-table"),h="#"+$(this).data("result-table-loadicon"),i=["addr:city","addr:country","addr:housenumber","addr:postcode","addr:street"];if(e&&f&&g){g="#"+g;var j=null;switch(f){case"node":j=c+"node("+e+");"+d;break;case"way":j=c+"way("+e+");"+d;break;case"relation":j=c+"relation("+e+");"+d}if(j){$.ajax(j).done(function(a){if(a&&a.elements&&a.elements[0]){var b=a.elements[0],c=$(g).html();for(var d in b.tags)if(null===b.tags.name||i.indexOf(d)==-1){switch(c+="<tr><td>"+d+"</td><td>",d){case"phone":case"fax":c+='<a href="tel:'+b.tags[d].replace(/ /g,"")+'">'+b.tags[d]+"</a>";break;case"email":c+='<a href="mailto:'+b.tags[d]+'">'+b.tags[d]+"</a>";break;case"website":case"url":c+='<a href="'+b.tags[d]+'">'+b.tags[d]+"</a>";break;case"wikidata":c+='<a href="https://www.wikidata.org/wiki/'+b.tags[d]+'">'+b.tags[d]+"</a>";break;case"wikipedia":if(b.tags[d].indexOf(":")!=-1){c+='<a href="https://'+b.tags[d].substring(0,b.tags[d].indexOf(":"))+".wikipedia.org/wiki/"+b.tags[d].substring(b.tags[d].indexOf(":")+1)+'">'+b.tags[d]+"</a>";break}default:c+=b.tags[d]}c+="</td></tr>"}$(g).html(c),$(g).removeClass("hidden"),$(h).addClass("hidden")}}).fail(function(){$(h).html($(h).html()+'<p class="text-muted">could not load data!</p>')})}}$(this).off(a)}),$(".searx_init_map").on("click",function(a){var b=$(this).data("leaflet-target"),c=$(this).data("map-lon"),d=$(this).data("map-lat"),e=$(this).data("map-zoom"),f=$(this).data("map-boundingbox"),g=$(this).data("map-geojson");require(["leaflet-0.7.3.min"],function(a){f&&(southWest=L.latLng(f[0],f[2]),northEast=L.latLng(f[1],f[3]),map_bounds=L.latLngBounds(southWest,northEast)),L.Icon.Default.imagePath="./static/themes/oscar/img/map";var h=L.map(b),i="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",j='Map data © <a href="https://openstreetmap.org">OpenStreetMap</a> contributors',k=new L.TileLayer(i,{minZoom:1,maxZoom:19,attribution:j}),l="https://maps.wikimedia.org/osm-intl/{z}/{x}/{y}.png",m='Wikimedia maps beta | Maps data © <a href="https://openstreetmap.org">OpenStreetMap</a> contributors';new L.TileLayer(l,{minZoom:1,maxZoom:19,attribution:m});map_bounds?setTimeout(function(){h.fitBounds(map_bounds,{maxZoom:17})},0):c&&d&&(e?h.setView(new L.LatLng(d,c),e):h.setView(new L.LatLng(d,c),8)),h.addLayer(k);var n={"OSM Mapnik":k};L.control.layers(n).addTo(h),g&&L.geoJson(g).addTo(h)}),$(this).off(a)})}),$(document).ready(function(){$("#allow-all-engines").click(function(){$(".onoffswitch-checkbox").each(function(){this.checked=!1})}),$("#disable-all-engines").click(function(){$(".onoffswitch-checkbox").each(function(){this.checked=!0})})});
searx/static/themes/oscar/js/searx_src/toggleall.jsnew file+10
@@ -0,0 +1,10 @@
1+$(document).ready(function(){
2+ $("#allow-all-engines").click(function() {
3+ $(".onoffswitch-checkbox").each(function() { this.checked = false;});
4+ });
5+
6+ $("#disable-all-engines").click(function() {
7+ $(".onoffswitch-checkbox").each(function() { this.checked = true;});
8+ });
9+});
10+
searx/templates/courgette/search.html+1−1
@@ -1,6 +1,6 @@
11<form method="{{ method or 'POST' }}" action="{{ url_for('index') }}" id="search_form">
22 <div id="search_wrapper">
3− <input type="text" placeholder="{{ _('Search for...') }}" id="q" class="q" name="q" tabindex="1" autocomplete="off" {% if q %}value="{{ q }}"{% endif %}/>
3+ <input type="text" autofocus placeholder="{{ _('Search for...') }}" id="q" class="q" name="q" tabindex="1" autocomplete="off" {% if q %}value="{{ q }}"{% endif %}/>
44 <input type="submit" value="search" id="search_submit" />
55 </div>
66 {% include 'courgette/categories.html' %}
searx/templates/legacy/search.html+1−1
@@ -1,6 +1,6 @@
11<form method="{{ method or 'POST' }}" action="{{ url_for('index') }}" id="search_form">
22 <div id="search_wrapper">
3− <input type="text" placeholder="{{ _('Search for...') }}" id="q" class="q" name="q" tabindex="1" autocomplete="off" size="100" {% if q %}value="{{ q }}"{% endif %}/>
3+ <input type="text" autofocus placeholder="{{ _('Search for...') }}" id="q" class="q" name="q" tabindex="1" autocomplete="off" size="100" {% if q %}value="{{ q }}"{% endif %}/>
44 <input type="submit" value="search" id="search_submit" />
55 </div>
66 {% set display_tooltip = true %}
searx/templates/oscar/preferences.html+22−14
@@ -155,6 +155,14 @@
155155
156156 <!-- Tab panes -->
157157 <div class="tab-content">
158+
159+ <div class="hide_if_nojs">
160+ <p class="text-{% if rtl %}left{% else %}right{% endif %}">
161+ <button type="button" class="btn btn-default btn-success" id="allow-all-engines">{{ _("Allow all") }}</button>
162+ <button type="button" class="btn btn-default btn-danger" id="disable-all-engines">{{ _("Disable all") }}</button>
163+ </p>
164+ </div>
165+
158166 {% for categ in all_categories %}
159167 <noscript><label>{{ _(categ) }}</label>
160168 </noscript>
@@ -174,14 +182,14 @@
174182 <th>{{ _("Avg. time") }}</th>
175183 <th>{{ _("Max time") }}</th>
176184 {% else %}
177− <th>{{ _("Max time") }}</th>
178− <th>{{ _("Avg. time") }}</th>
179− <th>{{ _("Time range") }}</th>
180− <th>{{ _("SafeSearch") }}</th>
181− <th>{{ _("Selected language") }}</th>
182− <th>{{ _("Shortcut") }}</th>
183− <th>{{ _("Engine name") }}</th>
184− <th>{{ _("Allow") }}</th>
185+ <th class="text-right">{{ _("Max time") }}</th>
186+ <th class="text-right">{{ _("Avg. time") }}</th>
187+ <th class="text-right">{{ _("Time range") }}</th>
188+ <th class="text-right">{{ _("SafeSearch") }}</th>
189+ <th class="text-right">{{ _("Selected language") }}</th>
190+ <th class="text-right">{{ _("Shortcut") }}</th>
191+ <th class="text-right">{{ _("Engine name") }}</th>
192+ <th class="text-right">{{ _("Allow") }}</th>
185193 {% endif %}
186194 </tr>
187195 {% for search_engine in engines_by_category[categ] %}
@@ -256,10 +264,10 @@
256264 </p>
257265 <table class="table table-striped">
258266 <tr>
259− <th class="text-muted">{{ _('Name') }}</th>
260− <th class="text-muted">{{ _('Keywords') }}</th>
261− <th class="text-muted">{{ _('Description') }}</th>
262− <th class="text-muted">{{ _('Examples') }}</th>
267+ <th class="text-muted{% if rtl %} text-right{% endif %}">{{ _('Name') }}</th>
268+ <th class="text-muted{% if rtl %} text-right{% endif %}">{{ _('Keywords') }}</th>
269+ <th class="text-muted{% if rtl %} text-right{% endif %}">{{ _('Description') }}</th>
270+ <th class="text-muted{% if rtl %} text-right{% endif %}">{{ _('Examples') }}</th>
263271 </tr>
264272
265273 {% for answerer in answerers %}
@@ -285,8 +293,8 @@
285293 {% if cookies %}
286294 <table class="table table-striped">
287295 <tr>
288− <th class="text-muted">{{ _('Cookie name') }}</th>
289− <th class="text-muted">{{ _('Value') }}</th>
296+ <th class="text-muted{% if rtl %} text-right{% endif %}">{{ _('Cookie name') }}</th>
297+ <th class="text-muted{% if rtl %} text-right{% endif %}">{{ _('Value') }}</th>
290298 </tr>
291299
292300 {% for cookie in cookies %}
searx/templates/oscar/search.html+1−1
@@ -3,7 +3,7 @@
33 <div class="row">
44 <div class="col-xs-12 col-md-8">
55 <div class="input-group search-margin">
6− <input type="search" name="q" class="form-control" id="q" placeholder="{{ _('Search for...') }}" aria-label="{{ _('Search for...') }}" autocomplete="off" value="{{ q }}" accesskey="s">
6+ <input type="search" autofocus name="q" class="form-control" id="q" placeholder="{{ _('Search for...') }}" aria-label="{{ _('Search for...') }}" autocomplete="off" value="{{ q }}" accesskey="s">
77 <span class="input-group-btn">
88 <button type="submit" class="btn btn-default" aria-label="{{ _('Start search') }}"><span class="hide_if_nojs">{{ icon('search') }}</span><span class="hidden active_if_nojs">{{ _('Start search') }}</span></button>
99 <button type="reset" class="btn btn-default" aria-label="{{ _('Clear search') }}"><span class="hide_if_nojs">{{ icon('remove') }}</span><span class="hidden active_if_nojs">{{ _('Clear') }}</span></button>
searx/templates/oscar/search_full.html+1−1
@@ -6,7 +6,7 @@
66 {% else %}
77 <div class="input-group col-md-8 col-md-offset-2">
88 {% endif %}
9− <input type="search" name="q" class="form-control input-lg autofocus" id="q" placeholder="{{ _('Search for...') }}" aria-label="{{ _('Search for...') }}" autocomplete="off" value="{{ q }}" accesskey="s">
9+ <input type="search" autofocus name="q" class="form-control input-lg autofocus" id="q" placeholder="{{ _('Search for...') }}" aria-label="{{ _('Search for...') }}" autocomplete="off" value="{{ q }}" accesskey="s">
1010 <span class="input-group-btn">
1111 <button type="submit" class="btn btn-default input-lg" aria-label="{{ _('Start search') }}"><span class="hide_if_nojs">{{ icon('search') }}</span><span class="hidden active_if_nojs">{{ _('Start search') }}</span></button>
1212 <button type="reset" class="btn btn-default input-lg" aria-label="{{ _('Clear search') }}"><span class="hide_if_nojs">{{ icon('remove') }}</span><span class="hidden active_if_nojs">{{ _('Clear') }}</span></button>
searx/templates/pix-art/search.html+1−1
@@ -1,6 +1,6 @@
11<form method="{{ method or 'POST' }}" action="{{ url_for('index') }}" id="search_form">
22 <div id="search_wrapper">
3− <input type="text" placeholder="{{ _('Search for...') }}" id="q" class="q" name="q" tabindex="1" size="100" {% if q %}value="{{ q }}"{% endif %}/>
3+ <input type="text" autofocus placeholder="{{ _('Search for...') }}" id="q" class="q" name="q" tabindex="1" size="100" {% if q %}value="{{ q }}"{% endif %}/>
44 <input type="submit" value="" id="search_submit" />
55 {% for category in categories %}
66 <input type="hidden" name="category_{{ category }}" value="1"/>
searx/templates/simple/search.html+1−1
@@ -1,7 +1,7 @@
11<form id="search" method="{{ method or 'POST' }}" action="{{ url_for('index') }}">
22 <div id="search_wrapper">
33 <div class="search_box">
4− <input id="q" name="q" type="text" placeholder="{{ _('Search for...') }}" tabindex="1" autocomplete="off" spellcheck="false" dir="auto" {% if q %}value="{{ q }}"{% endif %} >
4+ <input id="q" autofocus name="q" type="text" placeholder="{{ _('Search for...') }}" tabindex="1" autocomplete="off" spellcheck="false" dir="auto" {% if q %}value="{{ q }}"{% endif %} >
55 <button id="clear_search" type="button" tabindex="-1"><span class="hide_if_nojs">{{ icon('close') }}</span><span class="show_if_nojs">{{ _('Clear search') }}</span></button>
66 <button id="send_search" type="submit" tabindex="-1"><span class="hide_if_nojs">{{ icon('search') }}</span><span class="show_if_nojs">{{ _('Start search') }}</span></button>
77 </div>
searx/translations/fa_IR/LC_MESSAGES/messages.mo

Binary file not shown.

searx/translations/fa_IR/LC_MESSAGES/messages.po+1−1
@@ -109,7 +109,7 @@ msgstr "توابع آماری"
109109
110110#: searx/answerers/statistics/answerer.py:54
111111msgid "Compute {functions} of the arguments"
112−msgstr "پردازش {عملکرد های} نشانوند ها<br>"
112+msgstr "پردازش {functions} نشانوند ها<br>"
113113
114114#: searx/engines/__init__.py:194
115115msgid "Engine time (sec)"
searx/webapp.py+1−1
@@ -144,7 +144,7 @@ if not searx_debug \
144144
145145babel = Babel(app)
146146
147−rtl_locales = ['ar', 'arc', 'bcc', 'bqi', 'ckb', 'dv', 'fa', 'glk', 'he',
147+rtl_locales = ['ar', 'arc', 'bcc', 'bqi', 'ckb', 'dv', 'fa', 'fa_IR', 'glk', 'he',
148148 'ku', 'mzn', 'pnb', 'ps', 'sd', 'ug', 'ur', 'yi']
149149
150150# used when translating category names