Browse Source

Merge remote-tracking branch 'asciimoo/master'

Thomas Pointhuber 11 years ago
parent
commit
e30f43bd81

+ 2
- 2
searx/engines/xpath.py View File

@@ -1,7 +1,7 @@
1 1
 from lxml import html
2 2
 from urllib import urlencode, unquote
3 3
 from urlparse import urlparse, urljoin
4
-from lxml.etree import _ElementStringResult
4
+from lxml.etree import _ElementStringResult, _ElementUnicodeResult
5 5
 from searx.utils import html_to_text
6 6
 
7 7
 search_url = None
@@ -29,7 +29,7 @@ def extract_text(xpath_results):
29 29
         for e in xpath_results:
30 30
             result = result + extract_text(e)
31 31
         return result
32
-    elif type(xpath_results) == _ElementStringResult:
32
+    elif type(xpath_results) in [_ElementStringResult, _ElementUnicodeResult]:
33 33
         # it's a string
34 34
         return ''.join(xpath_results)
35 35
     else:

+ 4
- 3
searx/settings.yml View File

@@ -21,7 +21,7 @@ engines:
21 21
     engine : bing_news
22 22
     locale : en-US
23 23
     shortcut : bin
24
-    
24
+
25 25
   - name : currency
26 26
     engine : currency_convert
27 27
     categories : general
@@ -69,7 +69,7 @@ engines:
69 69
   - name : google news
70 70
     engine : google_news
71 71
     shortcut : gon
72
-    
72
+
73 73
   - name : piratebay
74 74
     engine : piratebay
75 75
     categories : videos, music, files
@@ -124,7 +124,7 @@ engines:
124 124
   - name : yahoo news
125 125
     engine : yahoo_news
126 126
     shortcut : yhn
127
-    
127
+
128 128
   - name : youtube
129 129
     engine : youtube
130 130
     categories : videos
@@ -150,3 +150,4 @@ locales:
150 150
     de : Deutsch
151 151
     hu : Magyar
152 152
     fr : Français
153
+    es : Español

+ 2
- 0
searx/static/css/style.css View File

@@ -165,6 +165,8 @@ tr:hover { background: #DDDDDD; }
165 165
 #suggestions span { display: block; margin: 0 2px 2px 2px; padding: 0; }
166 166
 #suggestions form { display: block; }
167 167
 #suggestions input { padding: 2px 6px; margin: 2px 4px;  font-size: 0.8em; display: inline-block; background: #3498DB; color: #FFFFFF; border-radius: 4px; border: 0; cursor: pointer; }
168
+#search_url { margin-top: 8px; }
169
+#search_url input { border: 1px solid #888888; padding: 4px; color: #444444; width: 20em; display: block; margin: 4px; }
168 170
 
169 171
 #preferences {
170 172
     top: 10px;

+ 3
- 3
searx/templates/about.html View File

@@ -2,9 +2,9 @@
2 2
 {% block content %}
3 3
 {% include 'github_ribbon.html' %}
4 4
 <div class="row">
5
-    <h1>About <a href="/">searx</a></h1>
5
+    <h1>About <a href="{{ url_for('index') }}">searx</a></h1>
6 6
 
7
-    <p>Searx is a <a href="https://en.wikipedia.org/wiki/Metasearch_engine">metasearch engine</a>, aggregating the results of other <a href="/preferences">search engines</a> while not storing information about its users.
7
+    <p>Searx is a <a href="https://en.wikipedia.org/wiki/Metasearch_engine">metasearch engine</a>, aggregating the results of other <a href="{{ url_for('preferences') }}">search engines</a> while not storing information about its users.
8 8
     </p>
9 9
     <h2>Why use Searx?</h2>
10 10
     <ul>
@@ -60,7 +60,7 @@ Searx can be added to your browser's search bar; moreover, it can be set as the
60 60
 <p>See the <a href="https://github.com/asciimoo/searx/wiki/Installation">installation and setup</a> wiki page</p>
61 61
 
62 62
 <h3>How to debug engines?</h3>
63
-<p><a href="/stats">Stats page</a> contains some useful data about the engines used.</p>
63
+<p><a href="{{ url_for('stats') }}">Stats page</a> contains some useful data about the engines used.</p>
64 64
 
65 65
 </div>
66 66
 {% endblock %}

+ 3
- 3
searx/templates/base.html View File

@@ -6,19 +6,19 @@
6 6
     <meta name="keywords" content="searx, search, search engine, metasearch, meta search" />
7 7
     <meta name="viewport" content="width=device-width, maximum-scale=1.0, user-scalable=1" />
8 8
     <title>{% block title %}{% endblock %}searx</title>
9
-    <link rel="stylesheet" href="/static/css/style.css" type="text/css" media="screen" />
9
+    <link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}" type="text/css" media="screen" />
10 10
     <link rel="shortcut icon" href="{{ url_for('static', filename='img/favicon.png') }}?v=2" />
11 11
     {% block styles %}
12 12
     {% endblock %}
13 13
     {% block head %}
14
-    <link title="searx" type="application/opensearchdescription+xml" rel="search" href="/opensearch.xml"/>
14
+    <link title="searx" type="application/opensearchdescription+xml" rel="search" href="{{ url_for('opensearch') }}"/>
15 15
     {% endblock %}
16 16
 </head>
17 17
 <body>
18 18
 <div id="container">
19 19
 {% block content %}
20 20
 {% endblock %}
21
-<script src="/static/js/searx.js" ></script>
21
+<script src="{{ url_for('static', filename='js/searx.js') }}" ></script>
22 22
 </div>
23 23
 </body>
24 24
 </html>

+ 1
- 1
searx/templates/github_ribbon.html View File

@@ -1,3 +1,3 @@
1 1
 <a href="https://github.com/asciimoo/searx" class="github">
2
-    <img style="position: absolute; top: 0; right: 0; border: 0;" src="/static/img/github_ribbon.png" alt="Fork me on GitHub"  class="github"/>
2
+    <img style="position: absolute; top: 0; right: 0; border: 0;" src="{{ url_for('static', filename='img/github_ribbon.png') }}" alt="Fork me on GitHub"  class="github"/>
3 3
 </a>

+ 2
- 2
searx/templates/index.html View File

@@ -4,8 +4,8 @@
4 4
     <div class="title"><h1>searx</h1></div>
5 5
     {% include 'search.html' %}
6 6
     <p class="top_margin">
7
-        <a href="/about" class="hmarg">{{ _('about') }}</a>
8
-        <a href="/preferences" class="hmarg">{{ _('preferences') }}</a>
7
+        <a href="{{ url_for('about') }}" class="hmarg">{{ _('about') }}</a>
8
+        <a href="{{ url_for('preferences') }}" class="hmarg">{{ _('preferences') }}</a>
9 9
     </p>
10 10
 </div>
11 11
 {% endblock %}

+ 2
- 2
searx/templates/preferences.html View File

@@ -4,7 +4,7 @@
4 4
 <div class="row">
5 5
     <h2>{{ _('Preferences') }}</h2>
6 6
 
7
-    <form method="post" action="/preferences" id="search_form">
7
+    <form method="post" action="{{ url_for('preferences') }}" id="search_form">
8 8
     <fieldset>
9 9
         <legend>{{ _('Default categories') }}</legend>
10 10
         <p>
@@ -66,6 +66,6 @@
66 66
 
67 67
     <input type="submit" value="{{ _('save') }}" />
68 68
     </form>
69
-    <div class="right"><a href="/">{{ _('back') }}</a></div>
69
+    <div class="right"><a href="{{ url_for('index') }}">{{ _('back') }}</a></div>
70 70
 </div>
71 71
 {% endblock %}

+ 10
- 6
searx/templates/results.html View File

@@ -1,7 +1,7 @@
1 1
 {% extends "base.html" %}
2 2
 {% block title %}{{ q }} - {% endblock %}
3 3
 {% block content %}
4
-<div class="right"><a href="/preferences" id="preferences"><span>preferences</span></a></div>
4
+<div class="right"><a href="{{ url_for('preferences') }}" id="preferences"><span>preferences</span></a></div>
5 5
 <div class="small search">
6 6
     {% include 'search.html' %}
7 7
 </div>
@@ -10,18 +10,22 @@
10 10
         {% if suggestions %}
11 11
         <div id="suggestions"><span>{{ _('Suggestions') }}</span>
12 12
             {% for suggestion in suggestions %}
13
-            <form method="post" action="/">
14
-                <input type="hidden" name="q" value="{{suggestion}}">
13
+            <form method="post" action="{{ url_for('index') }}">
14
+                <input type="hidden" name="q" value="{{ suggestion }}">
15 15
                 <input type="submit" value="{{ suggestion }}" />
16 16
             </form>
17 17
             {% endfor %}
18 18
         </div>
19 19
         {% endif %}
20 20
 
21
+        <div id="search_url">
22
+            {{ _('Search URL') }}:
23
+            <input type="text" value="{{ base_url }}?q={{ q|urlencode }}&pageno={{ pageno }}{% if selected_categories %}&category_{{ selected_categories|join("&category_") }}{% endif %}" readonly="" />
24
+        </div>
21 25
         <div id="apis">
22 26
         {{ _('Download results') }}
23 27
         {% for output_type in ('csv', 'json', 'rss') %}
24
-        <form method="post" action="/">
28
+        <form method="post" action="{{ url_for('index') }}">
25 29
             <div class="left">
26 30
             <input type="hidden" name="q" value="{{ q }}" />
27 31
             <input type="hidden" name="format" value="{{ output_type }}" />
@@ -48,7 +52,7 @@
48 52
     {% if paging %}
49 53
     <div id="pagination">
50 54
         {% if pageno > 1 %}
51
-            <form method="post" action="/">
55
+            <form method="post" action="{{ url_for('index') }}">
52 56
                 <div class="left">
53 57
                 <input type="hidden" name="q" value="{{ q }}" />
54 58
                 {% for category in selected_categories %}
@@ -59,7 +63,7 @@
59 63
                 </div>
60 64
             </form>
61 65
         {% endif %}
62
-        <form method="post" action="/">
66
+        <form method="post" action="{{ url_for('index') }}">
63 67
             <div class="left">
64 68
             {% for category in selected_categories %}
65 69
             <input type="hidden" name="category_{{ category }}" value="1"/>

+ 1
- 1
searx/templates/search.html View File

@@ -1,4 +1,4 @@
1
-<form method="post" action="/" id="search_form">
1
+<form method="post" action="{{ url_for('index') }}" id="search_form">
2 2
   <div id="search_wrapper">
3 3
     <input type="text" id="q" class="q" name="q" tabindex="1" autocomplete="off" {% if q %}value="{{ q }}"{% endif %}/>
4 4
     <input type="submit" value="search" id="search_submit" />

BIN
searx/translations/de/LC_MESSAGES/messages.mo View File


+ 67
- 57
searx/translations/de/LC_MESSAGES/messages.po View File

@@ -1,60 +1,45 @@
1
-# English translations for .
1
+# English translations for PROJECT.
2 2
 # Copyright (C) 2014 ORGANIZATION
3
-# This file is distributed under the same license as the  project.
4
-#
3
+# This file is distributed under the same license as the PROJECT project.
4
+# 
5 5
 # Translators:
6
+# pointhi, 2014
6 7
 # stf <stefan.marsiske@gmail.com>, 2014
7 8
 msgid ""
8 9
 msgstr ""
9
-"Project-Id-Version:  searx\n"
10
+"Project-Id-Version: searx\n"
10 11
 "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
11
-"POT-Creation-Date: 2014-01-31 13:40+0100\n"
12
-"PO-Revision-Date: 2014-01-30 17:40+0000\n"
13
-"Last-Translator: stf <stefan.marsiske@gmail.com>\n"
14
-"Language-Team: German "
15
-"(http://www.transifex.com/projects/p/searx/language/de/)\n"
16
-"Plural-Forms: nplurals=2; plural=(n != 1)\n"
12
+"POT-Creation-Date: 2014-03-04 20:54+0100\n"
13
+"PO-Revision-Date: 2014-03-04 22:00+0000\n"
14
+"Last-Translator: pointhi\n"
15
+"Language-Team: German (http://www.transifex.com/projects/p/searx/language/de/)\n"
17 16
 "MIME-Version: 1.0\n"
18
-"Content-Type: text/plain; charset=utf-8\n"
17
+"Content-Type: text/plain; charset=UTF-8\n"
19 18
 "Content-Transfer-Encoding: 8bit\n"
20 19
 "Generated-By: Babel 1.3\n"
20
+"Language: de\n"
21
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
21 22
 
22
-#: searx/engines/__init__.py:290
23
+#: searx/engines/__init__.py:308
23 24
 msgid "Page loads (sec)"
24 25
 msgstr "Ladezeit (sek)"
25 26
 
26
-#: searx/engines/__init__.py:294
27
+#: searx/engines/__init__.py:312
27 28
 msgid "Number of results"
28 29
 msgstr "Trefferanzahl"
29 30
 
30
-#: searx/engines/__init__.py:298
31
+#: searx/engines/__init__.py:316
31 32
 msgid "Scores"
32 33
 msgstr "Punkte"
33 34
 
34
-#: searx/engines/__init__.py:302
35
+#: searx/engines/__init__.py:320
35 36
 msgid "Scores per result"
36 37
 msgstr "Punkte pro Treffer"
37 38
 
38
-#: searx/engines/__init__.py:306
39
+#: searx/engines/__init__.py:324
39 40
 msgid "Errors"
40 41
 msgstr "Fehler"
41 42
 
42
-#: searx/templates/engines.html:4
43
-msgid "Currently used search engines"
44
-msgstr "Aktuell benutzte Suchmachinen"
45
-
46
-#: searx/templates/engines.html:8
47
-msgid "Engine name"
48
-msgstr "Suchmaschinenname"
49
-
50
-#: searx/templates/engines.html:9
51
-msgid "Category"
52
-msgstr "Kategorie"
53
-
54
-#: searx/templates/engines.html:23 searx/templates/preferences.html:42
55
-msgid "back"
56
-msgstr "Zurück"
57
-
58 43
 #: searx/templates/index.html:7
59 44
 msgid "about"
60 45
 msgstr "Über uns"
@@ -69,56 +54,79 @@ msgstr "Einstellungen"
69 54
 
70 55
 #: searx/templates/preferences.html:9
71 56
 msgid "Default categories"
72
-msgstr "Default Kategorien"
57
+msgstr "Standard Kategorien"
73 58
 
74 59
 #: searx/templates/preferences.html:15
75
-#, fuzzy
76 60
 msgid "Search language"
77
-msgstr "Oberflaechensprache"
61
+msgstr "Suchsprache"
78 62
 
79 63
 #: searx/templates/preferences.html:18
80 64
 msgid "Automatic"
81
-msgstr ""
65
+msgstr "Automatisch"
82 66
 
83 67
 #: searx/templates/preferences.html:26
84 68
 msgid "Interface language"
85
-msgstr "Oberflaechensprache"
69
+msgstr "Oberflächensprache"
70
+
71
+#: searx/templates/preferences.html:36
72
+msgid "Currently used search engines"
73
+msgstr "Aktuell benutzte Suchmaschinen"
74
+
75
+#: searx/templates/preferences.html:40
76
+msgid "Engine name"
77
+msgstr "Suchmaschinenname"
78
+
79
+#: searx/templates/preferences.html:41
80
+msgid "Category"
81
+msgstr "Kategorie"
82
+
83
+#: searx/templates/preferences.html:42 searx/templates/preferences.html:53
84
+msgid "Allow"
85
+msgstr "Erlauben"
86
+
87
+#: searx/templates/preferences.html:42 searx/templates/preferences.html:54
88
+msgid "Block"
89
+msgstr "Blockieren"
86 90
 
87
-#: searx/templates/preferences.html:35
91
+#: searx/templates/preferences.html:62
88 92
 msgid ""
89
-"These settings are stored in your cookies, this allows us not to store "
90
-"this data about you."
91
-msgstr ""
92
-"Diese Informationen werden in Cookies gespeichert, damit wir keine ihrer "
93
-"persönlichen Daten speichern müssen."
93
+"These settings are stored in your cookies, this allows us not to store this "
94
+"data about you."
95
+msgstr "Diese Informationen werden in Cookies gespeichert, damit wir keine ihrer persönlichen Daten speichern müssen."
94 96
 
95
-#: searx/templates/preferences.html:37
97
+#: searx/templates/preferences.html:64
96 98
 msgid ""
97 99
 "These cookies serve your sole convenience, we don't use these cookies to "
98 100
 "track you."
99
-msgstr ""
100
-"Diese Cookies dienen ihrer Gemütlichkeit, wir verwenden sie nicht zum "
101
-"überwachen."
101
+msgstr "Diese Cookies dienen ihrer Gemütlichkeit, wir verwenden sie nicht zum überwachen."
102 102
 
103
-#: searx/templates/preferences.html:40
103
+#: searx/templates/preferences.html:67
104 104
 msgid "save"
105 105
 msgstr "Speichern"
106 106
 
107
+#: searx/templates/preferences.html:69
108
+msgid "back"
109
+msgstr "Zurück"
110
+
107 111
 #: searx/templates/results.html:11
108 112
 msgid "Suggestions"
109
-msgstr "Vorschlaege"
113
+msgstr "Vorschläge"
110 114
 
111 115
 #: searx/templates/results.html:22
116
+msgid "Search URL"
117
+msgstr "Such-URL"
118
+
119
+#: searx/templates/results.html:26
112 120
 msgid "Download results"
113
-msgstr "Download Ergebnisse"
121
+msgstr "Ergebnisse herunterladen"
114 122
 
115
-#: searx/templates/results.html:66
123
+#: searx/templates/results.html:62
116 124
 msgid "previous page"
117
-msgstr "vorige Seite"
125
+msgstr "vorherige Seite"
118 126
 
119
-#: searx/templates/results.html:74
127
+#: searx/templates/results.html:73
120 128
 msgid "next page"
121
-msgstr "naechste Seite"
129
+msgstr "nächste Seite"
122 130
 
123 131
 #: searx/templates/stats.html:4
124 132
 msgid "Engine stats"
@@ -130,13 +138,13 @@ msgid "files"
130 138
 msgstr "Dateien"
131 139
 
132 140
 msgid "general"
133
-msgstr "General"
141
+msgstr "allgemein"
134 142
 
135 143
 msgid "music"
136
-msgstr "Music"
144
+msgstr "Musik"
137 145
 
138 146
 msgid "social media"
139
-msgstr "Social Media"
147
+msgstr "Soziale Medien"
140 148
 
141 149
 msgid "images"
142 150
 msgstr "Bilder"
@@ -147,3 +155,5 @@ msgstr "Videos"
147 155
 msgid "it"
148 156
 msgstr "IT"
149 157
 
158
+msgid "news"
159
+msgstr "Neuigkeiten"

BIN
searx/translations/en/LC_MESSAGES/messages.mo View File


+ 42
- 27
searx/translations/en/LC_MESSAGES/messages.po View File

@@ -7,7 +7,7 @@ msgid ""
7 7
 msgstr ""
8 8
 "Project-Id-Version: PROJECT VERSION\n"
9 9
 "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
10
-"POT-Creation-Date: 2014-01-31 13:40+0100\n"
10
+"POT-Creation-Date: 2014-03-04 20:54+0100\n"
11 11
 "PO-Revision-Date: 2014-01-30 15:22+0100\n"
12 12
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13 13
 "Language-Team: en <LL@li.org>\n"
@@ -17,42 +17,26 @@ msgstr ""
17 17
 "Content-Transfer-Encoding: 8bit\n"
18 18
 "Generated-By: Babel 1.3\n"
19 19
 
20
-#: searx/engines/__init__.py:290
20
+#: searx/engines/__init__.py:308
21 21
 msgid "Page loads (sec)"
22 22
 msgstr ""
23 23
 
24
-#: searx/engines/__init__.py:294
24
+#: searx/engines/__init__.py:312
25 25
 msgid "Number of results"
26 26
 msgstr ""
27 27
 
28
-#: searx/engines/__init__.py:298
28
+#: searx/engines/__init__.py:316
29 29
 msgid "Scores"
30 30
 msgstr ""
31 31
 
32
-#: searx/engines/__init__.py:302
32
+#: searx/engines/__init__.py:320
33 33
 msgid "Scores per result"
34 34
 msgstr ""
35 35
 
36
-#: searx/engines/__init__.py:306
36
+#: searx/engines/__init__.py:324
37 37
 msgid "Errors"
38 38
 msgstr ""
39 39
 
40
-#: searx/templates/engines.html:4
41
-msgid "Currently used search engines"
42
-msgstr ""
43
-
44
-#: searx/templates/engines.html:8
45
-msgid "Engine name"
46
-msgstr ""
47
-
48
-#: searx/templates/engines.html:9
49
-msgid "Category"
50
-msgstr ""
51
-
52
-#: searx/templates/engines.html:23 searx/templates/preferences.html:42
53
-msgid "back"
54
-msgstr ""
55
-
56 40
 #: searx/templates/index.html:7
57 41
 msgid "about"
58 42
 msgstr ""
@@ -81,35 +65,63 @@ msgstr ""
81 65
 msgid "Interface language"
82 66
 msgstr ""
83 67
 
84
-#: searx/templates/preferences.html:35
68
+#: searx/templates/preferences.html:36
69
+msgid "Currently used search engines"
70
+msgstr ""
71
+
72
+#: searx/templates/preferences.html:40
73
+msgid "Engine name"
74
+msgstr ""
75
+
76
+#: searx/templates/preferences.html:41
77
+msgid "Category"
78
+msgstr ""
79
+
80
+#: searx/templates/preferences.html:42 searx/templates/preferences.html:53
81
+msgid "Allow"
82
+msgstr ""
83
+
84
+#: searx/templates/preferences.html:42 searx/templates/preferences.html:54
85
+msgid "Block"
86
+msgstr ""
87
+
88
+#: searx/templates/preferences.html:62
85 89
 msgid ""
86 90
 "These settings are stored in your cookies, this allows us not to store "
87 91
 "this data about you."
88 92
 msgstr ""
89 93
 
90
-#: searx/templates/preferences.html:37
94
+#: searx/templates/preferences.html:64
91 95
 msgid ""
92 96
 "These cookies serve your sole convenience, we don't use these cookies to "
93 97
 "track you."
94 98
 msgstr ""
95 99
 
96
-#: searx/templates/preferences.html:40
100
+#: searx/templates/preferences.html:67
97 101
 msgid "save"
98 102
 msgstr ""
99 103
 
104
+#: searx/templates/preferences.html:69
105
+msgid "back"
106
+msgstr ""
107
+
100 108
 #: searx/templates/results.html:11
101 109
 msgid "Suggestions"
102 110
 msgstr ""
103 111
 
104 112
 #: searx/templates/results.html:22
113
+msgid "Search URL"
114
+msgstr ""
115
+
116
+#: searx/templates/results.html:26
105 117
 msgid "Download results"
106 118
 msgstr ""
107 119
 
108
-#: searx/templates/results.html:66
120
+#: searx/templates/results.html:62
109 121
 msgid "previous page"
110 122
 msgstr ""
111 123
 
112
-#: searx/templates/results.html:74
124
+#: searx/templates/results.html:73
113 125
 msgid "next page"
114 126
 msgstr ""
115 127
 
@@ -140,3 +152,6 @@ msgstr ""
140 152
 msgid "it"
141 153
 msgstr ""
142 154
 
155
+msgid "news"
156
+msgstr ""
157
+

BIN
searx/translations/es/LC_MESSAGES/messages.mo View File


+ 158
- 0
searx/translations/es/LC_MESSAGES/messages.po View File

@@ -0,0 +1,158 @@
1
+# English translations for PROJECT.
2
+# Copyright (C) 2014 ORGANIZATION
3
+# This file is distributed under the same license as the PROJECT project.
4
+# 
5
+# Translators:
6
+# niazle, 2014
7
+msgid ""
8
+msgstr ""
9
+"Project-Id-Version: searx\n"
10
+"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
11
+"POT-Creation-Date: 2014-03-04 20:54+0100\n"
12
+"PO-Revision-Date: 2014-03-04 20:40+0000\n"
13
+"Last-Translator: niazle\n"
14
+"Language-Team: Spanish (http://www.transifex.com/projects/p/searx/language/es/)\n"
15
+"MIME-Version: 1.0\n"
16
+"Content-Type: text/plain; charset=UTF-8\n"
17
+"Content-Transfer-Encoding: 8bit\n"
18
+"Generated-By: Babel 1.3\n"
19
+"Language: es\n"
20
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
21
+
22
+#: searx/engines/__init__.py:308
23
+msgid "Page loads (sec)"
24
+msgstr "Tiempo de carga (segundos)"
25
+
26
+#: searx/engines/__init__.py:312
27
+msgid "Number of results"
28
+msgstr "Número de resultados"
29
+
30
+#: searx/engines/__init__.py:316
31
+msgid "Scores"
32
+msgstr "Puntuaciones"
33
+
34
+#: searx/engines/__init__.py:320
35
+msgid "Scores per result"
36
+msgstr "Puntuaciones por resultado"
37
+
38
+#: searx/engines/__init__.py:324
39
+msgid "Errors"
40
+msgstr "Errores"
41
+
42
+#: searx/templates/index.html:7
43
+msgid "about"
44
+msgstr "acerca de"
45
+
46
+#: searx/templates/index.html:8
47
+msgid "preferences"
48
+msgstr "preferencias"
49
+
50
+#: searx/templates/preferences.html:5
51
+msgid "Preferences"
52
+msgstr "Preferencias"
53
+
54
+#: searx/templates/preferences.html:9
55
+msgid "Default categories"
56
+msgstr "Categorías predeterminadas"
57
+
58
+#: searx/templates/preferences.html:15
59
+msgid "Search language"
60
+msgstr "Buscar idioma"
61
+
62
+#: searx/templates/preferences.html:18
63
+msgid "Automatic"
64
+msgstr "Automático"
65
+
66
+#: searx/templates/preferences.html:26
67
+msgid "Interface language"
68
+msgstr "Idioma de la interfaz"
69
+
70
+#: searx/templates/preferences.html:36
71
+msgid "Currently used search engines"
72
+msgstr "Motores de búsqueda actualmente en uso"
73
+
74
+#: searx/templates/preferences.html:40
75
+msgid "Engine name"
76
+msgstr "Nombre del motor de búsqueda"
77
+
78
+#: searx/templates/preferences.html:41
79
+msgid "Category"
80
+msgstr "Categoría"
81
+
82
+#: searx/templates/preferences.html:42 searx/templates/preferences.html:53
83
+msgid "Allow"
84
+msgstr "Permitir"
85
+
86
+#: searx/templates/preferences.html:42 searx/templates/preferences.html:54
87
+msgid "Block"
88
+msgstr "Bloquear"
89
+
90
+#: searx/templates/preferences.html:62
91
+msgid ""
92
+"These settings are stored in your cookies, this allows us not to store this "
93
+"data about you."
94
+msgstr "Esta configuración se guarda en sus cookies, lo que nos permite no almacenar dicha información sobre usted."
95
+
96
+#: searx/templates/preferences.html:64
97
+msgid ""
98
+"These cookies serve your sole convenience, we don't use these cookies to "
99
+"track you."
100
+msgstr "Estas cookies son para su propia comodidad, no las utilizamos para rastrearle."
101
+
102
+#: searx/templates/preferences.html:67
103
+msgid "save"
104
+msgstr "Guardar"
105
+
106
+#: searx/templates/preferences.html:69
107
+msgid "back"
108
+msgstr "Atrás"
109
+
110
+#: searx/templates/results.html:11
111
+msgid "Suggestions"
112
+msgstr "Sugerencias"
113
+
114
+#: searx/templates/results.html:22
115
+msgid "Search URL"
116
+msgstr "Buscar URL"
117
+
118
+#: searx/templates/results.html:26
119
+msgid "Download results"
120
+msgstr "Descargar resultados"
121
+
122
+#: searx/templates/results.html:62
123
+msgid "previous page"
124
+msgstr "Página anterior"
125
+
126
+#: searx/templates/results.html:73
127
+msgid "next page"
128
+msgstr "Página siguiente"
129
+
130
+#: searx/templates/stats.html:4
131
+msgid "Engine stats"
132
+msgstr "Estadísticas del motor de búsqueda"
133
+
134
+# categories - manually added
135
+# TODO - automatically add
136
+msgid "files"
137
+msgstr "Archivos"
138
+
139
+msgid "general"
140
+msgstr "General"
141
+
142
+msgid "music"
143
+msgstr "Música"
144
+
145
+msgid "social media"
146
+msgstr "Medios sociales"
147
+
148
+msgid "images"
149
+msgstr "Imágenes"
150
+
151
+msgid "videos"
152
+msgstr "Vídeos"
153
+
154
+msgid "it"
155
+msgstr "TIC"
156
+
157
+msgid "news"
158
+msgstr "noticias"

BIN
searx/translations/fr/LC_MESSAGES/messages.mo View File


+ 42
- 28
searx/translations/fr/LC_MESSAGES/messages.po View File

@@ -7,7 +7,7 @@ msgid ""
7 7
 msgstr ""
8 8
 "Project-Id-Version: PROJECT VERSION\n"
9 9
 "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
10
-"POT-Creation-Date: 2014-01-31 13:40+0100\n"
10
+"POT-Creation-Date: 2014-03-04 20:54+0100\n"
11 11
 "PO-Revision-Date: 2014-01-21 23:33+0100\n"
12 12
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13 13
 "Language-Team: fr <LL@li.org>\n"
@@ -17,42 +17,26 @@ msgstr ""
17 17
 "Content-Transfer-Encoding: 8bit\n"
18 18
 "Generated-By: Babel 1.3\n"
19 19
 
20
-#: searx/engines/__init__.py:290
20
+#: searx/engines/__init__.py:308
21 21
 msgid "Page loads (sec)"
22 22
 msgstr "Chargement de la page (sec)"
23 23
 
24
-#: searx/engines/__init__.py:294
24
+#: searx/engines/__init__.py:312
25 25
 msgid "Number of results"
26 26
 msgstr "Nombre de résultats"
27 27
 
28
-#: searx/engines/__init__.py:298
28
+#: searx/engines/__init__.py:316
29 29
 msgid "Scores"
30 30
 msgstr "Score"
31 31
 
32
-#: searx/engines/__init__.py:302
32
+#: searx/engines/__init__.py:320
33 33
 msgid "Scores per result"
34 34
 msgstr "Score par résultat"
35 35
 
36
-#: searx/engines/__init__.py:306
36
+#: searx/engines/__init__.py:324
37 37
 msgid "Errors"
38 38
 msgstr "Erreurs"
39 39
 
40
-#: searx/templates/engines.html:4
41
-msgid "Currently used search engines"
42
-msgstr "Moteur actuellement utilisé"
43
-
44
-#: searx/templates/engines.html:8
45
-msgid "Engine name"
46
-msgstr "Nom du moteur"
47
-
48
-#: searx/templates/engines.html:9
49
-msgid "Category"
50
-msgstr "Catégorie"
51
-
52
-#: searx/templates/engines.html:23 searx/templates/preferences.html:42
53
-msgid "back"
54
-msgstr "retour"
55
-
56 40
 #: searx/templates/index.html:7
57 41
 msgid "about"
58 42
 msgstr "À propos"
@@ -70,7 +54,6 @@ msgid "Default categories"
70 54
 msgstr "Catégorie par défaut"
71 55
 
72 56
 #: searx/templates/preferences.html:15
73
-#, fuzzy
74 57
 msgid "Search language"
75 58
 msgstr "Langue de l'interface"
76 59
 
@@ -82,7 +65,27 @@ msgstr ""
82 65
 msgid "Interface language"
83 66
 msgstr "Langue de l'interface"
84 67
 
85
-#: searx/templates/preferences.html:35
68
+#: searx/templates/preferences.html:36
69
+msgid "Currently used search engines"
70
+msgstr "Moteur actuellement utilisé"
71
+
72
+#: searx/templates/preferences.html:40
73
+msgid "Engine name"
74
+msgstr "Nom du moteur"
75
+
76
+#: searx/templates/preferences.html:41
77
+msgid "Category"
78
+msgstr "Catégorie"
79
+
80
+#: searx/templates/preferences.html:42 searx/templates/preferences.html:53
81
+msgid "Allow"
82
+msgstr ""
83
+
84
+#: searx/templates/preferences.html:42 searx/templates/preferences.html:54
85
+msgid "Block"
86
+msgstr ""
87
+
88
+#: searx/templates/preferences.html:62
86 89
 msgid ""
87 90
 "These settings are stored in your cookies, this allows us not to store "
88 91
 "this data about you."
@@ -90,7 +93,7 @@ msgstr ""
90 93
 "Ces paramètres sont stcokés dans vos cookies; ceci nous permet de ne pas "
91 94
 "collecter vos données."
92 95
 
93
-#: searx/templates/preferences.html:37
96
+#: searx/templates/preferences.html:64
94 97
 msgid ""
95 98
 "These cookies serve your sole convenience, we don't use these cookies to "
96 99
 "track you."
@@ -98,23 +101,31 @@ msgstr ""
98 101
 "Les cookies sont la pour votre confort d'utilisation, nous ne les "
99 102
 "utilisons pas pour vous traquer."
100 103
 
101
-#: searx/templates/preferences.html:40
104
+#: searx/templates/preferences.html:67
102 105
 msgid "save"
103 106
 msgstr "enregistrer"
104 107
 
108
+#: searx/templates/preferences.html:69
109
+msgid "back"
110
+msgstr "retour"
111
+
105 112
 #: searx/templates/results.html:11
106 113
 msgid "Suggestions"
107 114
 msgstr "Suggestions"
108 115
 
109 116
 #: searx/templates/results.html:22
117
+msgid "Search URL"
118
+msgstr ""
119
+
120
+#: searx/templates/results.html:26
110 121
 msgid "Download results"
111 122
 msgstr "Télécharger les résultats"
112 123
 
113
-#: searx/templates/results.html:66
124
+#: searx/templates/results.html:62
114 125
 msgid "previous page"
115 126
 msgstr ""
116 127
 
117
-#: searx/templates/results.html:74
128
+#: searx/templates/results.html:73
118 129
 msgid "next page"
119 130
 msgstr ""
120 131
 
@@ -145,3 +156,6 @@ msgstr "vidéos"
145 156
 msgid "it"
146 157
 msgstr "it"
147 158
 
159
+msgid "news"
160
+msgstr ""
161
+

BIN
searx/translations/hu/LC_MESSAGES/messages.mo View File


+ 42
- 27
searx/translations/hu/LC_MESSAGES/messages.po View File

@@ -7,7 +7,7 @@ msgid ""
7 7
 msgstr ""
8 8
 "Project-Id-Version: PROJECT VERSION\n"
9 9
 "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
10
-"POT-Creation-Date: 2014-01-31 13:40+0100\n"
10
+"POT-Creation-Date: 2014-03-04 20:54+0100\n"
11 11
 "PO-Revision-Date: 2014-01-21 23:33+0100\n"
12 12
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13 13
 "Language-Team: hu <LL@li.org>\n"
@@ -17,42 +17,26 @@ msgstr ""
17 17
 "Content-Transfer-Encoding: 8bit\n"
18 18
 "Generated-By: Babel 1.3\n"
19 19
 
20
-#: searx/engines/__init__.py:290
20
+#: searx/engines/__init__.py:308
21 21
 msgid "Page loads (sec)"
22 22
 msgstr "Válaszidők (sec)"
23 23
 
24
-#: searx/engines/__init__.py:294
24
+#: searx/engines/__init__.py:312
25 25
 msgid "Number of results"
26 26
 msgstr "Találatok száma"
27 27
 
28
-#: searx/engines/__init__.py:298
28
+#: searx/engines/__init__.py:316
29 29
 msgid "Scores"
30 30
 msgstr "Pontszámok"
31 31
 
32
-#: searx/engines/__init__.py:302
32
+#: searx/engines/__init__.py:320
33 33
 msgid "Scores per result"
34 34
 msgstr "Pontszámok találatonként"
35 35
 
36
-#: searx/engines/__init__.py:306
36
+#: searx/engines/__init__.py:324
37 37
 msgid "Errors"
38 38
 msgstr "Hibák"
39 39
 
40
-#: searx/templates/engines.html:4
41
-msgid "Currently used search engines"
42
-msgstr "Jelenleg használt keresők"
43
-
44
-#: searx/templates/engines.html:8
45
-msgid "Engine name"
46
-msgstr "Kereső neve"
47
-
48
-#: searx/templates/engines.html:9
49
-msgid "Category"
50
-msgstr "Kategória"
51
-
52
-#: searx/templates/engines.html:23 searx/templates/preferences.html:42
53
-msgid "back"
54
-msgstr "vissza"
55
-
56 40
 #: searx/templates/index.html:7
57 41
 msgid "about"
58 42
 msgstr "rólunk"
@@ -81,13 +65,33 @@ msgstr "Automatikus"
81 65
 msgid "Interface language"
82 66
 msgstr "Felület nyelve"
83 67
 
84
-#: searx/templates/preferences.html:35
68
+#: searx/templates/preferences.html:36
69
+msgid "Currently used search engines"
70
+msgstr "Jelenleg használt keresők"
71
+
72
+#: searx/templates/preferences.html:40
73
+msgid "Engine name"
74
+msgstr "Kereső neve"
75
+
76
+#: searx/templates/preferences.html:41
77
+msgid "Category"
78
+msgstr "Kategória"
79
+
80
+#: searx/templates/preferences.html:42 searx/templates/preferences.html:53
81
+msgid "Allow"
82
+msgstr "Engedélyezés"
83
+
84
+#: searx/templates/preferences.html:42 searx/templates/preferences.html:54
85
+msgid "Block"
86
+msgstr "Tiltás"
87
+
88
+#: searx/templates/preferences.html:62
85 89
 msgid ""
86 90
 "These settings are stored in your cookies, this allows us not to store "
87 91
 "this data about you."
88 92
 msgstr "Ezek a beállítások csak a böngésző cookie-jaiban tárolódnak."
89 93
 
90
-#: searx/templates/preferences.html:37
94
+#: searx/templates/preferences.html:64
91 95
 msgid ""
92 96
 "These cookies serve your sole convenience, we don't use these cookies to "
93 97
 "track you."
@@ -95,23 +99,31 @@ msgstr ""
95 99
 "Ezek a cookie-k csak kényelmi funkciókat látnak el, nem használjuk a "
96 100
 "felhasználók követésére."
97 101
 
98
-#: searx/templates/preferences.html:40
102
+#: searx/templates/preferences.html:67
99 103
 msgid "save"
100 104
 msgstr "mentés"
101 105
 
106
+#: searx/templates/preferences.html:69
107
+msgid "back"
108
+msgstr "vissza"
109
+
102 110
 #: searx/templates/results.html:11
103 111
 msgid "Suggestions"
104 112
 msgstr "Javaslatok"
105 113
 
106 114
 #: searx/templates/results.html:22
115
+msgid "Search URL"
116
+msgstr "Keresési URL"
117
+
118
+#: searx/templates/results.html:26
107 119
 msgid "Download results"
108 120
 msgstr "Találatok letöltése"
109 121
 
110
-#: searx/templates/results.html:66
122
+#: searx/templates/results.html:62
111 123
 msgid "previous page"
112 124
 msgstr "előző oldal"
113 125
 
114
-#: searx/templates/results.html:74
126
+#: searx/templates/results.html:73
115 127
 msgid "next page"
116 128
 msgstr "következő oldal"
117 129
 
@@ -142,3 +154,6 @@ msgstr "videók"
142 154
 msgid "it"
143 155
 msgstr "it"
144 156
 
157
+msgid "news"
158
+msgstr "hírek"
159
+

+ 1
- 0
searx/utils.py View File

@@ -10,6 +10,7 @@ ua_versions = ('26.0', '27.0', '28.0')
10 10
 ua_os = ('Windows NT 6.3; WOW64', 'X11; Linux x86_64; rv:26.0')
11 11
 ua = "Mozilla/5.0 ({os}) Gecko/20100101 Firefox/{version}"
12 12
 
13
+
13 14
 def gen_useragent():
14 15
     # TODO
15 16
     return ua.format(os=choice(ua_os), version=choice(ua_versions))

+ 1
- 0
searx/webapp.py View File

@@ -182,6 +182,7 @@ def index():
182 182
         selected_categories=search.categories,
183 183
         paging=search.paging,
184 184
         pageno=search.pageno,
185
+        base_url=get_base_url(),
185 186
         suggestions=search.suggestions
186 187
     )
187 188