This commit is contained in:
root 2022-04-14 16:30:32 +08:00
parent 44e942827e
commit 92aa12c131
28 changed files with 388 additions and 195 deletions

View file

@ -126,6 +126,10 @@ extensions = [
'notfound.extension', # https://github.com/readthedocs/sphinx-notfound-page 'notfound.extension', # https://github.com/readthedocs/sphinx-notfound-page
] ]
myst_enable_extensions = [
"replacements", "smartquotes"
]
suppress_warnings = ['myst.domains'] suppress_warnings = ['myst.domains']
intersphinx_mapping = { intersphinx_mapping = {

View file

@ -3,7 +3,7 @@ nose2[coverage_plugin]==0.11.0
cov-core==1.15.0 cov-core==1.15.0
black==22.3.0 black==22.3.0
pycodestyle==2.8.0 pycodestyle==2.8.0
pylint==2.13.4 pylint==2.13.5
splinter==0.17.0 splinter==0.17.0
selenium==4.1.3 selenium==4.1.3
twine==4.0.0 twine==4.0.0

View file

@ -13,6 +13,6 @@ uvloop==0.16.0
httpx-socks[asyncio]==0.7.2 httpx-socks[asyncio]==0.7.2
langdetect==1.0.9 langdetect==1.0.9
setproctitle==1.2.2 setproctitle==1.2.2
redis==4.2.0 redis==4.2.2
mistletoe==0.8.2 markdown-it-py==2.0.1
typing_extensions==4.1.1 typing_extensions==4.1.1

136
searx/engines/jisho.py Normal file
View file

@ -0,0 +1,136 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
"""
Jisho (the Japanese-English dictionary)
"""
from urllib.parse import urlencode, urljoin
# about
about = {
"website": 'https://jisho.org',
"wikidata_id": 'Q24568389',
"official_api_documentation": "https://jisho.org/forum/54fefc1f6e73340b1f160000-is-there-any-kind-of-search-api",
"use_official_api": True,
"require_api_key": False,
"results": 'JSON',
"language": 'ja',
}
categories = ['dictionaries']
paging = False
URL = 'https://jisho.org'
BASE_URL = 'https://jisho.org/word/'
SEARCH_URL = URL + '/api/v1/search/words?{query}'
def request(query, params):
query = urlencode({'keyword': query})
params['url'] = SEARCH_URL.format(query=query)
logger.debug(f"query_url --> {params['url']}")
return params
def response(resp):
results = []
first_result = True
search_results = resp.json()
for page in search_results.get('data', []):
# Entries that are purely from Wikipedia are excluded.
parts_of_speech = page.get('senses') and page['senses'][0].get('parts_of_speech')
if parts_of_speech and parts_of_speech[0] == 'Wikipedia definition':
pass
# Process alternative forms
alt_forms = []
for title_raw in page['japanese']:
if 'word' not in title_raw:
alt_forms.append(title_raw['reading'])
else:
title = title_raw['word']
if 'reading' in title_raw:
title += ' (' + title_raw['reading'] + ')'
alt_forms.append(title)
#
result_url = urljoin(BASE_URL, page['slug'])
definitions = get_definitions(page)
# For results, we'll return the URL, all alternative forms (as title),
# and all definitions (as description) truncated to 300 characters.
content = " ".join(f"{engdef}." for _, engdef, _ in definitions)
results.append({
'url': result_url,
'title': ", ".join(alt_forms),
'content': content[:300] + (content[300:] and '...')
})
# Like Wordnik, we'll return the first result in an infobox too.
if first_result:
first_result = False
results.append(get_infobox(alt_forms, result_url, definitions))
return results
def get_definitions(page):
# Process definitions
definitions = []
for defn_raw in page['senses']:
extra = []
# Extra data. Since they're not documented, this implementation is based solely by the author's assumptions.
if defn_raw.get('tags'):
if defn_raw.get('info'):
# "usually written as kana: <kana>"
extra.append(defn_raw['tags'][0] + ', ' + defn_raw['info'][0] + '. ')
else:
# abbreviation, archaism, etc.
extra.append(', '.join(defn_raw['tags']) + '. ')
elif defn_raw.get('info'):
# inconsistent
extra.append(', '.join(defn_raw['info']).capitalize() + '. ')
if defn_raw.get('restrictions'):
extra.append('Only applies to: ' + ', '.join(defn_raw['restrictions']) + '. ')
definitions.append((
', '.join(defn_raw['parts_of_speech']),
'; '.join(defn_raw['english_definitions']),
''.join(extra)[:-1],
))
return definitions
def get_infobox(alt_forms, result_url, definitions):
infobox_content = []
# title & alt_forms
infobox_title = alt_forms[0]
if len(alt_forms) > 1:
infobox_content.append(f'<p><i>Other forms:</i> {", ".join(alt_forms[1:])}</p>')
# definitions
infobox_content.append('''
<small><a href="https://www.edrdg.org/wiki/index.php/JMdict-EDICT_Dictionary_Project">JMdict</a>
and <a href="https://www.edrdg.org/enamdict/enamdict_doc.html">JMnedict</a>
by <a href="https://www.edrdg.org/edrdg/licence.html">EDRDG</a>, CC BY-SA 3.0.</small>
<ul>
''')
for pos, engdef, extra in definitions:
if pos == 'Wikipedia definition':
infobox_content.append('</ul><small>Wikipedia, CC BY-SA 3.0.</small><ul>')
pos = f'<i>{pos}</i>: ' if pos else ''
extra = f' ({extra})' if extra else ''
infobox_content.append(f'<li>{pos}{engdef}{extra}</li>')
infobox_content.append('</ul>')
#
return {
'infobox': infobox_title,
'content': ''.join(infobox_content),
'urls': [
{
'title': 'Jisho.org',
'url': result_url,
}
]
}

View file

@ -123,7 +123,7 @@ def response(resp):
if not result_chunks: if not result_chunks:
return [] return []
title = "Wolfram|Alpha (%s)" % infobox_title title = "Wolfram Alpha (%s)" % infobox_title
# append infobox # append infobox
results.append( results.append(

View file

@ -29,7 +29,7 @@ import typing
import urllib.parse import urllib.parse
import jinja2 import jinja2
from flask.helpers import url_for from flask.helpers import url_for
import mistletoe from markdown_it import MarkdownIt
from .. import get_setting from .. import get_setting
from ..compat import cached_property from ..compat import cached_property
@ -71,13 +71,17 @@ class InfoPage:
@cached_property @cached_property
def html(self): def html(self):
"""Render Markdown (CommonMark_) to HTML by using mistletoe_. """Render Markdown (CommonMark_) to HTML by using markdown-it-py_.
.. _CommonMark: https://commonmark.org/ .. _CommonMark: https://commonmark.org/
.. _mistletoe: https://github.com/miyuchina/mistletoe .. _markdown-it-py: https://github.com/executablebooks/markdown-it-py
""" """
return mistletoe.markdown(self.content) return MarkdownIt(
"commonmark", {"typographer": True}
).enable(
["replacements", "smartquotes"]
).render(self.content)
def get_ctx(self): # pylint: disable=no-self-use def get_ctx(self): # pylint: disable=no-self-use
"""Jinja context to render :py:obj:`InfoPage.content`""" """Jinja context to render :py:obj:`InfoPage.content`"""

View file

@ -1,55 +1,42 @@
# About MAGI # About Search
MAGI is a fork from the well-known metasearch engine searx, aggregating Search is a fork from the well-known metasearch engine searx, aggregating
the results of other {{link('search engines', 'preferences')}} while not the results of other {{link('search engines', 'preferences')}} while not
storing information about its users. storing information about its users.
More about MAGI ... More about Search ...
## Why use it? ## Why use it?
* MAGI may not offer you as personalised results as Google, but it doesn't * Search may not offer you as personalised results as Google, but it doesn't
generate a profile about you. generate a profile about you.
* MAGI doesn't care about what you search for, never shares anything with a * Search doesn't care about what you search for, never shares anything with a
third party, and it can't be used to compromise you. third party, and it can't be used to compromise you.
* MAGI is free software, the code is 100% open and you can help to make it Search is a [metasearch engine], inspired by the [seeks project]. It provides
better.
If you do care about privacy, want to be a conscious user, or otherwise believe
in digital freedom, make SearXNG your default search engine or run it on your
own server
## Technical details - How does it work?
MAGI is a [metasearch engine], inspired by the [seeks project]. It provides
basic privacy by mixing your queries with searches on other platforms without basic privacy by mixing your queries with searches on other platforms without
storing search data. Queries are made using a POST request on every browser storing search data. Queries are made using a POST request on every browser
(except Chromium-based browsers*). Therefore they show up in neither our logs, (except Chromium-based browsers*). Therefore they show up in neither our logs,
nor your url history. In the case of Chromium-based browser users there is an nor your url history. In the case of Chromium-based browser users there is an
exception: MAGI uses the search bar to perform GET requests. MAGI can be exception: Search uses the search bar to perform GET requests. Search can be
added to your browser's search bar; moreover, it can be set as the default added to your browser's search bar; moreover, it can be set as the default
search engine. search engine.
## How to set as the default search engine? ## How do I set it as the default search engine?
MAGI supports [OpenSearch]. For more information on changing your default Search supports [OpenSearch]. For more information on changing your default
search engine, see your browser's documentation: search engine, see your browser's documentation:
* [Firefox] - [Firefox]
* [Microsoft Edge] - [Microsoft Edge] - Behind the link, you will also find some useful instructions
* Chromium-based browsers [only add websites that the user navigates to without for Chrome and Safari.
a path.](https://www.chromium.org/tab-to-search) - [Chromium]-based browsers only add websites that the user navigates to without
a path.
## Where to find anonymous usage statistics of this instance ?
{{link('Stats page', 'stats')}} contains some useful data about the engines
used.
[metasearch engine]: https://en.wikipedia.org/wiki/Metasearch_engine [metasearch engine]: https://en.wikipedia.org/wiki/Metasearch_engine
[seeks project]: https://beniz.github.io/seeks/ [seeks project]: https://beniz.github.io/seeks/
[OpenSearch]: https://github.com/dewitt/opensearch/blob/master/opensearch-1-1-draft-6.md [OpenSearch]: https://github.com/dewitt/opensearch/blob/master/opensearch-1-1-draft-6.md
[Firefox]: https://support.mozilla.org/en-US/kb/add-or-remove-search-engine-firefox [Firefox]: https://support.mozilla.org/en-US/kb/add-or-remove-search-engine-firefox
[Microsoft Edge]: https://support.microsoft.com/en-us/help/4028574/microsoft-edge-change-the-default-search-engine [Microsoft Edge]: https://support.microsoft.com/en-us/help/4028574/microsoft-edge-change-the-default-search-engine
[Chromium]: https://www.chromium.org/tab-to-search

View file

@ -1,35 +1,69 @@
# Search syntax # Search syntax
MAGI allows you to modify the default categories, engines and search language Search allows you to modify the default categories, engines and search language
via the search query. via the search query.
Prefix `!` to set category and engine names. ## `!` select engine and category
Prefix: `:` to set the language. To set category and/or engine names use a `!` prefix. To give a few examples:
Abbrevations of the engines and languages are also accepted. Engine/category - search in wikipedia for **paris**
modifiers are chainable and inclusive. E.g. with {{search('!map !ddg !wp paris')}}
search in map category **and** duckduckgo **and** wikipedia for
`paris`.
See the {{link('preferences', 'preferences')}} for the list of engines, - {{search('!wp paris')}}
categories and languages. - {{search('!wikipedia paris')}}
## Examples - search in category **map** for **paris**
Search in wikipedia for `paris`: - {{search('!map paris')}}
* {{search('!wp paris')}} - image search
* {{search('!wikipedia paris')}}
Search in category `map` for `paris`: - {{search('!images Wau Holland')}}
* {{search('!map paris')}} Abbreviations of the engines and languages are also accepted. Engine/category
modifiers are chain able and inclusive. E.g. with {{search('!map !ddg !wp
paris')}} search in map category and duckduckgo and wikipedia for **paris**.
Image search: ## `:` select language
* {{search('!images Wau Holland')}} To select language filter use a `:` prefix. To give an example:
Custom language in wikipedia: - search wikipedia by a custom language
* {{search(':fr !wp Wau Holland')}} - {{search(':fr !wp Wau Holland')}}
## `!!` external bangs
SearXNG supports the external bangs from [ddg]. To directly jump to a external
search page use the `!!` prefix. To give an example:
- search wikipedia by a custom language
- {{search('!!wfr Wau Holland')}}
Please note, your search will be performed directly in the external search
engine, SearXNG cannot protect your privacy on this.
[ddg]: https://duckduckgo.com/bang
## Special Queries
In the {{link('preferences', 'preferences')}} page you find keywords for
_special queries_. To give a few examples:
- generate a random UUID
- {{search('random uuid')}}
- find the average
- {{search('avg 123 548 2.04 24.2')}}
- show _user agent_ of your browser (needs to be activated)
- {{search('user-agent')}}
- convert strings to different hash digests (needs to be activated)
- {{search('md5 lorem ipsum')}}
- {{search('sha512 lorem ipsum')}}

View file

@ -2,11 +2,11 @@
# list of language codes # list of language codes
# this file is generated automatically by utils/fetch_languages.py # this file is generated automatically by utils/fetch_languages.py
language_codes = ( language_codes = (
('af-ZA', 'Afrikaans', '', 'Afrikaans', '\U0001f1ff\U0001f1e6'), ('af-ZA', 'Afrikaans', 'Suid-Afrika', 'Afrikaans', '\U0001f1ff\U0001f1e6'),
('ar-EG', 'العربية', '', 'Arabic', '\U0001f1ea\U0001f1ec'), ('ar-EG', 'العربية', 'مصر', 'Arabic', '\U0001f1ea\U0001f1ec'),
('be-BY', 'Беларуская', '', 'Belarusian', '\U0001f1e7\U0001f1fe'), ('be-BY', 'Беларуская', 'Беларусь', 'Belarusian', '\U0001f1e7\U0001f1fe'),
('bg-BG', 'Български', 'България', 'Bulgarian', '\U0001f1e7\U0001f1ec'), ('bg-BG', 'Български', 'България', 'Bulgarian', '\U0001f1e7\U0001f1ec'),
('ca-ES', 'Català', '', 'Catalan', '\U0001f1ea\U0001f1f8'), ('ca-ES', 'Català', 'Espanya', 'Catalan', '\U0001f1ea\U0001f1f8'),
('cs-CZ', 'Čeština', 'Česko', 'Czech', '\U0001f1e8\U0001f1ff'), ('cs-CZ', 'Čeština', 'Česko', 'Czech', '\U0001f1e8\U0001f1ff'),
('da-DK', 'Dansk', 'Danmark', 'Danish', '\U0001f1e9\U0001f1f0'), ('da-DK', 'Dansk', 'Danmark', 'Danish', '\U0001f1e9\U0001f1f0'),
('de', 'Deutsch', '', 'German', '\U0001f310'), ('de', 'Deutsch', '', 'German', '\U0001f310'),
@ -28,26 +28,30 @@ language_codes = (
('es-ES', 'Español', 'España', 'Spanish', '\U0001f1ea\U0001f1f8'), ('es-ES', 'Español', 'España', 'Spanish', '\U0001f1ea\U0001f1f8'),
('es-MX', 'Español', 'México', 'Spanish', '\U0001f1f2\U0001f1fd'), ('es-MX', 'Español', 'México', 'Spanish', '\U0001f1f2\U0001f1fd'),
('et-EE', 'Eesti', 'Eesti', 'Estonian', '\U0001f1ea\U0001f1ea'), ('et-EE', 'Eesti', 'Eesti', 'Estonian', '\U0001f1ea\U0001f1ea'),
('fa-IR', 'فارسی', '', 'Persian', '\U0001f1ee\U0001f1f7'), ('fa-IR', 'فارسی', 'ایران', 'Persian', '\U0001f1ee\U0001f1f7'),
('fi-FI', 'Suomi', 'Suomi', 'Finnish', '\U0001f1eb\U0001f1ee'), ('fi-FI', 'Suomi', 'Suomi', 'Finnish', '\U0001f1eb\U0001f1ee'),
('fil-PH', 'Filipino', '', 'Filipino', '\U0001f1f5\U0001f1ed'), ('fil-PH', 'Filipino', 'Pilipinas', 'Filipino', '\U0001f1f5\U0001f1ed'),
('fr', 'Français', '', 'French', '\U0001f310'), ('fr', 'Français', '', 'French', '\U0001f310'),
('fr-BE', 'Français', 'Belgique', 'French', '\U0001f1e7\U0001f1ea'), ('fr-BE', 'Français', 'Belgique', 'French', '\U0001f1e7\U0001f1ea'),
('fr-CA', 'Français', 'Canada', 'French', '\U0001f1e8\U0001f1e6'), ('fr-CA', 'Français', 'Canada', 'French', '\U0001f1e8\U0001f1e6'),
('fr-CH', 'Français', 'Suisse', 'French', '\U0001f1e8\U0001f1ed'), ('fr-CH', 'Français', 'Suisse', 'French', '\U0001f1e8\U0001f1ed'),
('fr-FR', 'Français', 'France', 'French', '\U0001f1eb\U0001f1f7'), ('fr-FR', 'Français', 'France', 'French', '\U0001f1eb\U0001f1f7'),
('he-IL', 'עברית', '', 'Hebrew', '\U0001f1ee\U0001f1f1'), ('he-IL', 'עברית', 'ישראל', 'Hebrew', '\U0001f1ee\U0001f1f1'),
('hi-IN', 'हिन्दी', '', 'Hindi', '\U0001f1ee\U0001f1f3'), ('hi-IN', 'हिन्दी', 'भारत', 'Hindi', '\U0001f1ee\U0001f1f3'),
('hr-HR', 'Hrvatski', '', 'Croatian', '\U0001f1ed\U0001f1f7'), ('hr-HR', 'Hrvatski', 'Hrvatska', 'Croatian', '\U0001f1ed\U0001f1f7'),
('hu-HU', 'Magyar', 'Magyarország', 'Hungarian', '\U0001f1ed\U0001f1fa'), ('hu-HU', 'Magyar', 'Magyarország', 'Hungarian', '\U0001f1ed\U0001f1fa'),
('id-ID', 'Indonesia', '', 'Indonesian', '\U0001f1ee\U0001f1e9'), ('id-ID', 'Indonesia', 'Indonesia', 'Indonesian', '\U0001f1ee\U0001f1e9'),
('is-IS', 'Íslenska', '', 'Icelandic', '\U0001f1ee\U0001f1f8'), ('is-IS', 'Íslenska', 'Ísland', 'Icelandic', '\U0001f1ee\U0001f1f8'),
('it-IT', 'Italiano', 'Italia', 'Italian', '\U0001f1ee\U0001f1f9'), ('it-IT', 'Italiano', 'Italia', 'Italian', '\U0001f1ee\U0001f1f9'),
('ja-JP', '日本語', '', 'Japanese', '\U0001f1ef\U0001f1f5'), ('ja-JP', '日本語', '日本', 'Japanese', '\U0001f1ef\U0001f1f5'),
('ko-KR', '한국어', '', 'Korean', '\U0001f1f0\U0001f1f7'), ('ko-KR', '한국어', '대한민국', 'Korean', '\U0001f1f0\U0001f1f7'),
('lt-LT', 'Lietuvių', '', 'Lithuanian', '\U0001f1f1\U0001f1f9'), ('lt-LT', 'Lietuvių', 'Lietuva', 'Lithuanian', '\U0001f1f1\U0001f1f9'),
('lv-LV', 'Latviešu', '', 'Latvian', '\U0001f1f1\U0001f1fb'), ('lv-LV', 'Latviešu', 'Latvija', 'Latvian', '\U0001f1f1\U0001f1fb'),
('nb-NO', 'Norsk Bokmål', '', 'Norwegian Bokmål', '\U0001f1f3\U0001f1f4'), ( 'nb-NO',
'Norsk Bokmål',
'Norge',
'Norwegian Bokmål',
'\U0001f1f3\U0001f1f4'),
('nl', 'Nederlands', '', 'Dutch', '\U0001f310'), ('nl', 'Nederlands', '', 'Dutch', '\U0001f310'),
('nl-BE', 'Nederlands', 'België', 'Dutch', '\U0001f1e7\U0001f1ea'), ('nl-BE', 'Nederlands', 'België', 'Dutch', '\U0001f1e7\U0001f1ea'),
('nl-NL', 'Nederlands', 'Nederland', 'Dutch', '\U0001f1f3\U0001f1f1'), ('nl-NL', 'Nederlands', 'Nederland', 'Dutch', '\U0001f1f3\U0001f1f1'),
@ -56,16 +60,16 @@ language_codes = (
('pt-BR', 'Português', 'Brasil', 'Portuguese', '\U0001f1e7\U0001f1f7'), ('pt-BR', 'Português', 'Brasil', 'Portuguese', '\U0001f1e7\U0001f1f7'),
('pt-PT', 'Português', 'Portugal', 'Portuguese', '\U0001f1f5\U0001f1f9'), ('pt-PT', 'Português', 'Portugal', 'Portuguese', '\U0001f1f5\U0001f1f9'),
('ro-RO', 'Română', 'România', 'Romanian', '\U0001f1f7\U0001f1f4'), ('ro-RO', 'Română', 'România', 'Romanian', '\U0001f1f7\U0001f1f4'),
('ru-RU', 'Русский', '', 'Russian', '\U0001f1f7\U0001f1fa'), ('ru-RU', 'Русский', 'Россия', 'Russian', '\U0001f1f7\U0001f1fa'),
('sk-SK', 'Slovenčina', '', 'Slovak', '\U0001f1f8\U0001f1f0'), ('sk-SK', 'Slovenčina', 'Slovensko', 'Slovak', '\U0001f1f8\U0001f1f0'),
('sl-SI', 'Slovenščina', '', 'Slovenian', '\U0001f1f8\U0001f1ee'), ('sl-SI', 'Slovenščina', 'Slovenija', 'Slovenian', '\U0001f1f8\U0001f1ee'),
('sr-RS', 'Српски', '', 'Serbian', '\U0001f1f7\U0001f1f8'), ('sr-RS', 'Српски', 'Србија', 'Serbian', '\U0001f1f7\U0001f1f8'),
('sv-SE', 'Svenska', 'Sverige', 'Swedish', '\U0001f1f8\U0001f1ea'), ('sv-SE', 'Svenska', 'Sverige', 'Swedish', '\U0001f1f8\U0001f1ea'),
('sw-TZ', 'Kiswahili', '', 'Swahili', '\U0001f1f9\U0001f1ff'), ('sw-TZ', 'Kiswahili', 'Tanzania', 'Swahili', '\U0001f1f9\U0001f1ff'),
('th-TH', 'ไทย', '', 'Thai', '\U0001f1f9\U0001f1ed'), ('th-TH', 'ไทย', 'ไทย', 'Thai', '\U0001f1f9\U0001f1ed'),
('tr-TR', 'Türkçe', '', 'Turkish', '\U0001f1f9\U0001f1f7'), ('tr-TR', 'Türkçe', 'Türkiye', 'Turkish', '\U0001f1f9\U0001f1f7'),
('uk-UA', 'Українська', '', 'Ukrainian', '\U0001f1fa\U0001f1e6'), ('uk-UA', 'Українська', 'Україна', 'Ukrainian', '\U0001f1fa\U0001f1e6'),
('vi-VN', 'Tiếng Việt', '', 'Vietnamese', '\U0001f1fb\U0001f1f3'), ('vi-VN', 'Tiếng Việt', 'Việt Nam', 'Vietnamese', '\U0001f1fb\U0001f1f3'),
('zh', '中文', '', 'Chinese', '\U0001f310'), ('zh', '中文', '', 'Chinese', '\U0001f310'),
('zh-CN', '中文', '中国', 'Chinese', '\U0001f1e8\U0001f1f3'), ('zh-CN', '中文', '中国', 'Chinese', '\U0001f1e8\U0001f1f3'),
('zh-HK', '中文', '中國香港特別行政區', 'Chinese', '\U0001f1ed\U0001f1f0'), ('zh-HK', '中文', '中國香港特別行政區', 'Chinese', '\U0001f1ed\U0001f1f0'),

View file

@ -798,6 +798,12 @@ engines:
timeout: 3.0 timeout: 3.0
disabled: true disabled: true
- name: jisho
engine: jisho
shortcut: js
timeout: 3.0
disabled: true
- name: kickass - name: kickass
engine: kickass engine: kickass
shortcut: kc shortcut: kc

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -145,7 +145,8 @@ article.result-images[data-vim-selected] {
filter: opacity(60%); filter: opacity(60%);
} }
span.title { span.title,
span.source {
color: var(--color-result-image-span-font-selected); color: var(--color-result-image-span-font-selected);
} }
} }
@ -373,7 +374,7 @@ article[data-vim-selected].category-social {
.result-images { .result-images {
flex-grow: 1; flex-grow: 1;
padding: 0.5rem 0.5rem 2rem 0.5rem; padding: 0.5rem 0.5rem 3rem 0.5rem;
margin: 0.25rem; margin: 0.25rem;
border: none !important; border: none !important;
height: @results-image-row-height; height: @results-image-row-height;
@ -393,7 +394,8 @@ article[data-vim-selected].category-social {
background: var(--color-result-image-background); background: var(--color-result-image-background);
} }
span.title { span.title,
span.source {
display: block; display: block;
position: absolute; position: absolute;
@ -405,6 +407,11 @@ article[data-vim-selected].category-social {
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
} }
span.source {
padding: 1.8rem 0 0 0;
font-size: 0.7rem;
}
} }
.result-map { .result-map {

View file

@ -5,7 +5,7 @@
<!-- Draw favicon --> <!-- Draw favicon -->
{% macro draw_favicon(favicon) -%} {% macro draw_favicon(favicon) -%}
<img width="32" height="32" class="favicon" src="{{ url_for('static', filename='img/icons/' + favicon + '.png') }}" alt="{{ favicon }}" /> <img width="32" height="32" class="favicon" src="{{ url_for('static', filename='themes/oscar/img/icons/' + favicon + '.png') }}" alt="{{ favicon }}" />
{%- endmacro %} {%- endmacro %}
{%- macro result_link(url, title, classes='', id='') -%} {%- macro result_link(url, title, classes='', id='') -%}

View file

@ -2,6 +2,7 @@
<a {% if results_on_new_tab %}target="_blank" rel="noopener noreferrer"{% else %}rel="noreferrer"{% endif %} href="{{ result.img_src }}">{{- "" -}} <a {% if results_on_new_tab %}target="_blank" rel="noopener noreferrer"{% else %}rel="noreferrer"{% endif %} href="{{ result.img_src }}">{{- "" -}}
<img class="image_thumbnail" {% if results_on_new_tab %}target="_blank" rel="noopener noreferrer"{% else %}rel="noreferrer"{% endif %} src="{% if result.thumbnail_src %}{{ image_proxify(result.thumbnail_src) }}{% else %}{{ image_proxify(result.img_src) }}{% endif %}" alt="{{ result.title|striptags }}" loading="lazy" width="200" height="200">{{- "" -}} <img class="image_thumbnail" {% if results_on_new_tab %}target="_blank" rel="noopener noreferrer"{% else %}rel="noreferrer"{% endif %} src="{% if result.thumbnail_src %}{{ image_proxify(result.thumbnail_src) }}{% else %}{{ image_proxify(result.img_src) }}{% endif %}" alt="{{ result.title|striptags }}" loading="lazy" width="200" height="200">{{- "" -}}
<span class="title">{{ result.title|striptags }}</span>{{- "" -}} <span class="title">{{ result.title|striptags }}</span>{{- "" -}}
<span class="source">{{ result.parsed_url.netloc }}</span>{{- "" -}}
</a>{{- "" -}} </a>{{- "" -}}
<div class="detail">{{- "" -}} <div class="detail">{{- "" -}}
<a class="result-detail-close" href="#">{{ icon('close') }}</a>{{- "" -}} <a class="result-detail-close" href="#">{{ icon('close') }}</a>{{- "" -}}

View file

@ -8,7 +8,7 @@ msgstr ""
"Project-Id-Version: PROJECT VERSION\n" "Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2022-03-20 07:34+0000\n" "POT-Creation-Date: 2022-03-20 07:34+0000\n"
"PO-Revision-Date: 2022-03-27 13:40+0000\n" "PO-Revision-Date: 2022-04-07 09:24+0000\n"
"Last-Translator: Linerly <linerly@protonmail.com>\n" "Last-Translator: Linerly <linerly@protonmail.com>\n"
"Language-Team: Indonesian <https://weblate.bubu1.eu/projects/searxng/searxng/" "Language-Team: Indonesian <https://weblate.bubu1.eu/projects/searxng/searxng/"
"id/>\n" "id/>\n"
@ -365,7 +365,7 @@ msgstr "Tutup"
#: searx/templates/simple/messages/no_results.html:6 #: searx/templates/simple/messages/no_results.html:6
#: searx/templates/simple/results.html:46 #: searx/templates/simple/results.html:46
msgid "Error!" msgid "Error!"
msgstr "Kesalahan!" msgstr "Terjadi kesalahan!"
#: searx/templates/oscar/base.html:85 searx/templates/simple/base.html:61 #: searx/templates/oscar/base.html:85 searx/templates/simple/base.html:61
msgid "Powered by" msgid "Powered by"
@ -429,7 +429,7 @@ msgstr "di-cache"
#: searx/templates/oscar/macros.html:79 searx/templates/oscar/macros.html:93 #: searx/templates/oscar/macros.html:79 searx/templates/oscar/macros.html:93
#: searx/templates/simple/macros.html:43 #: searx/templates/simple/macros.html:43
msgid "proxied" msgid "proxied"
msgstr "di-proksi" msgstr "diproksi"
#: searx/templates/oscar/macros.html:133 #: searx/templates/oscar/macros.html:133
#: searx/templates/oscar/preferences.html:344 #: searx/templates/oscar/preferences.html:344
@ -550,7 +550,7 @@ msgstr "Pencarian Khusus"
#: searx/templates/oscar/preferences.html:465 #: searx/templates/oscar/preferences.html:465
#: searx/templates/simple/preferences.html:383 #: searx/templates/simple/preferences.html:383
msgid "Cookies" msgid "Cookies"
msgstr "Cookie" msgstr "Kuki"
#: searx/templates/oscar/preferences.html:123 #: searx/templates/oscar/preferences.html:123
#: searx/templates/oscar/preferences.html:125 #: searx/templates/oscar/preferences.html:125
@ -726,9 +726,9 @@ msgid ""
"href=\"http://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Request_methods\"" "href=\"http://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Request_methods\""
" rel=\"external\">learn more about request methods</a>" " rel=\"external\">learn more about request methods</a>"
msgstr "" msgstr ""
"Ubah bagaimana formulir dikirimkan, <a " "Ubah bagaimana formulir dikirimkan, <a href=\"https://id.wikipedia.org/wiki/"
"href=\"http://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Request_methods\"" "Hypertext_Transfer_Protocol#Metode_permintaan\" rel=\"external\">pelajari "
" rel=\"external\">pelajari lebih lanjut tentang metode permintaan</a>" "lebih lanjut tentang metode permintaan</a>"
#: searx/templates/oscar/preferences.html:284 #: searx/templates/oscar/preferences.html:284
#: searx/templates/simple/preferences.html:259 #: searx/templates/simple/preferences.html:259
@ -874,7 +874,7 @@ msgid ""
"This is the list of cookies and their values SearXNG is storing on your " "This is the list of cookies and their values SearXNG is storing on your "
"computer." "computer."
msgstr "" msgstr ""
"Ini adalah daftar cookie dan nilai-nilai mereka yang SearXNG simpan di " "Ini adalah daftar kuki dan nilai-nilai mereka yang SearXNG simpan di "
"komputer Anda." "komputer Anda."
#: searx/templates/oscar/preferences.html:469 #: searx/templates/oscar/preferences.html:469
@ -885,7 +885,7 @@ msgstr "Dengan daftar itu, Anda dapat menilai transparansi SearXNG."
#: searx/templates/oscar/preferences.html:474 #: searx/templates/oscar/preferences.html:474
#: searx/templates/simple/preferences.html:391 #: searx/templates/simple/preferences.html:391
msgid "Cookie name" msgid "Cookie name"
msgstr "Nama cookie" msgstr "Nama kuki"
#: searx/templates/oscar/preferences.html:475 #: searx/templates/oscar/preferences.html:475
#: searx/templates/simple/preferences.html:392 #: searx/templates/simple/preferences.html:392
@ -898,8 +898,8 @@ msgid ""
"These settings are stored in your cookies, this allows us not to store " "These settings are stored in your cookies, this allows us not to store "
"this data about you." "this data about you."
msgstr "" msgstr ""
"Pengaturan ini disimpan di cookie Anda, ini memungkinkan kami untuk tidak" "Pengaturan ini disimpan di kuki Anda, ini memungkinkan kami untuk tidak "
" menyimpan data ini tentang Anda." "menyimpan data ini tentang Anda."
#: searx/templates/oscar/preferences.html:493 #: searx/templates/oscar/preferences.html:493
#: searx/templates/simple/preferences.html:415 #: searx/templates/simple/preferences.html:415
@ -907,8 +907,8 @@ msgid ""
"These cookies serve your sole convenience, we don't use these cookies to " "These cookies serve your sole convenience, we don't use these cookies to "
"track you." "track you."
msgstr "" msgstr ""
"Cookie ini hanya untuk kenyamanan Anda, kami tidak menggunakan cookie ini" "Kuki ini hanya untuk kenyamanan Anda, kami tidak menggunakan kuki ini untuk "
" untuk melacak Anda." "melacak Anda."
#: searx/templates/oscar/preferences.html:497 #: searx/templates/oscar/preferences.html:497
#: searx/templates/simple/preferences.html:404 #: searx/templates/simple/preferences.html:404
@ -1118,7 +1118,7 @@ msgstr "Informasi!"
#: searx/templates/oscar/messages/no_cookies.html:4 #: searx/templates/oscar/messages/no_cookies.html:4
msgid "currently, there are no cookies defined." msgid "currently, there are no cookies defined."
msgstr "saat ini, tidak ada cookie yang didefinisikan" msgstr "saat ini, tidak ada kuki yang didefinisikan"
#: searx/templates/oscar/messages/no_data_available.html:4 #: searx/templates/oscar/messages/no_data_available.html:4
#: searx/templates/simple/stats.html:21 #: searx/templates/simple/stats.html:21

View file

@ -6,31 +6,32 @@
# Moo, 2019-2020 # Moo, 2019-2020
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: searx\n" "Project-Id-Version: searx\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2022-03-20 07:34+0000\n" "POT-Creation-Date: 2022-03-20 07:34+0000\n"
"PO-Revision-Date: 2021-12-10 07:17+0000\n" "PO-Revision-Date: 2022-04-07 09:24+0000\n"
"Last-Translator: Markus Heiser <markus.heiser@darmarit.de>\n" "Last-Translator: Markus Heiser <markus.heiser@darmarit.de>\n"
"Language-Team: Lithuanian <https://weblate.bubu1.eu/projects/searxng/searxng/"
"lt/>\n"
"Language: lt\n" "Language: lt\n"
"Language-Team: Lithuanian "
"<https://weblate.bubu1.eu/projects/searxng/searxng/lt/>\n"
"Plural-Forms: nplurals=4; plural=(n % 10 == 1 && (n % 100 > 19 || n % 100"
" < 11) ? 0 : (n % 10 >= 2 && n % 10 <=9) && (n % 100 > 19 || n % 100 < "
"11) ? 1 : n % 1 != 0 ? 2: 3)\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n" "Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=4; plural=(n % 10 == 1 && (n % 100 > 19 || n % 100 < "
"11) ? 0 : (n % 10 >= 2 && n % 10 <=9) && (n % 100 > 19 || n % 100 < 11) ? 1 :"
" n % 1 != 0 ? 2: 3);\n"
"X-Generator: Weblate 4.11\n"
"Generated-By: Babel 2.9.1\n" "Generated-By: Babel 2.9.1\n"
#. CONSTANT_NAMES['DEFAULT_GROUP_NAME'] #. CONSTANT_NAMES['DEFAULT_GROUP_NAME']
#: searx/searxng.msg #: searx/searxng.msg
msgid "others" msgid "others"
msgstr "" msgstr "kiti"
#. CONSTANT_NAMES['OTHER_CATEGORY'] #. CONSTANT_NAMES['OTHER_CATEGORY']
#: searx/searxng.msg #: searx/searxng.msg
msgid "other" msgid "other"
msgstr "" msgstr "kitas"
#. CATEGORY_NAMES['FILES'] #. CATEGORY_NAMES['FILES']
#: searx/searxng.msg #: searx/searxng.msg
@ -80,7 +81,7 @@ msgstr "žemėlapis"
#. CATEGORY_NAMES['ONIONS'] #. CATEGORY_NAMES['ONIONS']
#: searx/searxng.msg #: searx/searxng.msg
msgid "onions" msgid "onions"
msgstr "" msgstr "svogūnai"
#. CATEGORY_NAMES['SCIENCE'] #. CATEGORY_NAMES['SCIENCE']
#: searx/searxng.msg #: searx/searxng.msg
@ -90,105 +91,105 @@ msgstr "mokslas"
#. CATEGORY_GROUPS['APPS'] #. CATEGORY_GROUPS['APPS']
#: searx/searxng.msg #: searx/searxng.msg
msgid "apps" msgid "apps"
msgstr "" msgstr "programėlėles"
#. CATEGORY_GROUPS['DICTIONARIES'] #. CATEGORY_GROUPS['DICTIONARIES']
#: searx/searxng.msg #: searx/searxng.msg
msgid "dictionaries" msgid "dictionaries"
msgstr "" msgstr "žodynai"
#. CATEGORY_GROUPS['LYRICS'] #. CATEGORY_GROUPS['LYRICS']
#: searx/searxng.msg #: searx/searxng.msg
msgid "lyrics" msgid "lyrics"
msgstr "" msgstr "dainų žodžiai"
#. CATEGORY_GROUPS['PACKAGES'] #. CATEGORY_GROUPS['PACKAGES']
#: searx/searxng.msg #: searx/searxng.msg
msgid "packages" msgid "packages"
msgstr "" msgstr "paketai"
#. CATEGORY_GROUPS['Q_A'] #. CATEGORY_GROUPS['Q_A']
#: searx/searxng.msg #: searx/searxng.msg
msgid "q&a" msgid "q&a"
msgstr "" msgstr "klausimai ir atsakymai"
#. CATEGORY_GROUPS['REPOS'] #. CATEGORY_GROUPS['REPOS']
#: searx/searxng.msg #: searx/searxng.msg
msgid "repos" msgid "repos"
msgstr "" msgstr "saugyklos"
#. CATEGORY_GROUPS['SOFTWARE_WIKIS'] #. CATEGORY_GROUPS['SOFTWARE_WIKIS']
#: searx/searxng.msg #: searx/searxng.msg
msgid "software wikis" msgid "software wikis"
msgstr "" msgstr "programų žinynas"
#. CATEGORY_GROUPS['WEB'] #. CATEGORY_GROUPS['WEB']
#: searx/searxng.msg #: searx/searxng.msg
msgid "web" msgid "web"
msgstr "" msgstr "internetas"
#. STYLE_NAMES['AUTO'] #. STYLE_NAMES['AUTO']
#: searx/searxng.msg #: searx/searxng.msg
msgid "auto" msgid "auto"
msgstr "" msgstr "automatinis"
#. STYLE_NAMES['LIGHT'] #. STYLE_NAMES['LIGHT']
#: searx/searxng.msg #: searx/searxng.msg
msgid "light" msgid "light"
msgstr "" msgstr "lengvas"
#. STYLE_NAMES['DARK'] #. STYLE_NAMES['DARK']
#: searx/searxng.msg #: searx/searxng.msg
msgid "dark" msgid "dark"
msgstr "" msgstr "tamsus"
#: searx/webapp.py:169 #: searx/webapp.py:169
msgid "timeout" msgid "timeout"
msgstr "" msgstr "laikas baigėsi"
#: searx/webapp.py:170 #: searx/webapp.py:170
msgid "parsing error" msgid "parsing error"
msgstr "" msgstr "parsavymo klaida"
#: searx/webapp.py:171 #: searx/webapp.py:171
msgid "HTTP protocol error" msgid "HTTP protocol error"
msgstr "" msgstr "HTTP protokolo klaida"
#: searx/webapp.py:172 #: searx/webapp.py:172
msgid "network error" msgid "network error"
msgstr "" msgstr "tinklo klaida"
#: searx/webapp.py:174 #: searx/webapp.py:174
msgid "unexpected crash" msgid "unexpected crash"
msgstr "" msgstr "netikėta klaida"
#: searx/webapp.py:181 #: searx/webapp.py:181
msgid "HTTP error" msgid "HTTP error"
msgstr "" msgstr "HTTP klaida"
#: searx/webapp.py:182 #: searx/webapp.py:182
msgid "HTTP connection error" msgid "HTTP connection error"
msgstr "" msgstr "HTTP prisijungimo klaida"
#: searx/webapp.py:188 #: searx/webapp.py:188
msgid "proxy error" msgid "proxy error"
msgstr "" msgstr "tarpinio serverio klaida"
#: searx/webapp.py:189 #: searx/webapp.py:189
msgid "CAPTCHA" msgid "CAPTCHA"
msgstr "" msgstr "CAPTCHA"
#: searx/webapp.py:190 #: searx/webapp.py:190
msgid "too many requests" msgid "too many requests"
msgstr "" msgstr "Per daug užklausų"
#: searx/webapp.py:191 #: searx/webapp.py:191
msgid "access denied" msgid "access denied"
msgstr "" msgstr "prieiga uždrausta"
#: searx/webapp.py:192 #: searx/webapp.py:192
msgid "server API error" msgid "server API error"
msgstr "" msgstr "serverio API klaida"
#: searx/webapp.py:410 #: searx/webapp.py:410
msgid "No item found" msgid "No item found"
@ -197,11 +198,11 @@ msgstr "Elementų nerasta"
#: searx/engines/qwant.py:212 #: searx/engines/qwant.py:212
#: searx/templates/simple/result_templates/images.html:23 searx/webapp.py:412 #: searx/templates/simple/result_templates/images.html:23 searx/webapp.py:412
msgid "Source" msgid "Source"
msgstr "" msgstr "Šaltinis"
#: searx/webapp.py:414 #: searx/webapp.py:414
msgid "Error loading the next page" msgid "Error loading the next page"
msgstr "" msgstr "Klaida keliant ateinantį puslapį"
#: searx/webapp.py:526 searx/webapp.py:967 #: searx/webapp.py:526 searx/webapp.py:967
msgid "Invalid settings, please edit your preferences" msgid "Invalid settings, please edit your preferences"
@ -225,7 +226,7 @@ msgstr "prieš {hours} val., {minutes} min"
#: searx/webapp.py:871 #: searx/webapp.py:871
msgid "Suspended" msgid "Suspended"
msgstr "" msgstr "Sustabdytas"
#: searx/answerers/random/answerer.py:67 #: searx/answerers/random/answerer.py:67
msgid "Random value generator" msgid "Random value generator"
@ -261,15 +262,15 @@ msgstr "Šiai publikacijai nėra prieinama jokia santrauka."
#: searx/engines/qwant.py:214 #: searx/engines/qwant.py:214
msgid "Channel" msgid "Channel"
msgstr "" msgstr "Kanalas"
#: searx/plugins/hash_plugin.py:24 #: searx/plugins/hash_plugin.py:24
msgid "Converts strings to different hash digests." msgid "Converts strings to different hash digests."
msgstr "" msgstr "Konvertuoja eilutes į skirtingas maišos santraukas."
#: searx/plugins/hash_plugin.py:52 #: searx/plugins/hash_plugin.py:52
msgid "hash digest" msgid "hash digest"
msgstr "" msgstr "maišos santrauka"
#: searx/plugins/hostname_replace.py:9 #: searx/plugins/hostname_replace.py:9
msgid "Hostname replace" msgid "Hostname replace"
@ -305,7 +306,7 @@ msgstr ""
#: searx/plugins/self_info.py:20 #: searx/plugins/self_info.py:20
msgid "Self Informations" msgid "Self Informations"
msgstr "" msgstr "Informacija apie save"
#: searx/plugins/self_info.py:21 #: searx/plugins/self_info.py:21
msgid "" msgid ""
@ -397,7 +398,7 @@ msgstr "Viešieji egzemplioriai"
#: searx/templates/oscar/base.html:90 searx/templates/simple/base.html:66 #: searx/templates/oscar/base.html:90 searx/templates/simple/base.html:66
msgid "Contact instance maintainer" msgid "Contact instance maintainer"
msgstr "" msgstr "Susisiekite su instancijos prižiūrėtoju"
#: searx/templates/oscar/languages.html:2 #: searx/templates/oscar/languages.html:2
msgid "Language" msgid "Language"
@ -442,7 +443,7 @@ msgstr "Leisti"
#: searx/templates/oscar/macros.html:139 #: searx/templates/oscar/macros.html:139
msgid "broken" msgid "broken"
msgstr "" msgstr "nutrūkęs"
#: searx/templates/oscar/macros.html:141 #: searx/templates/oscar/macros.html:141
msgid "supported" msgid "supported"
@ -465,7 +466,7 @@ msgstr "nuostatos"
#: searx/templates/oscar/preferences.html:12 #: searx/templates/oscar/preferences.html:12
#: searx/templates/simple/preferences.html:29 #: searx/templates/simple/preferences.html:29
msgid "No HTTPS" msgid "No HTTPS"
msgstr "" msgstr "Nėra HTTPS"
#: searx/templates/oscar/preferences.html:14 #: searx/templates/oscar/preferences.html:14
#: searx/templates/oscar/results.html:27 searx/templates/simple/results.html:39 #: searx/templates/oscar/results.html:27 searx/templates/simple/results.html:39
@ -474,7 +475,7 @@ msgstr "Rezultatų skaičius"
#: searx/templates/oscar/preferences.html:14 #: searx/templates/oscar/preferences.html:14
msgid "Avg." msgid "Avg."
msgstr "" msgstr "Vid."
#: searx/templates/oscar/messages/no_results.html:8 #: searx/templates/oscar/messages/no_results.html:8
#: searx/templates/oscar/preferences.html:17 #: searx/templates/oscar/preferences.html:17
@ -485,33 +486,33 @@ msgstr ""
#: searx/templates/simple/preferences.html:32 #: searx/templates/simple/preferences.html:32
#: searx/templates/simple/results.html:49 #: searx/templates/simple/results.html:49
msgid "View error logs and submit a bug report" msgid "View error logs and submit a bug report"
msgstr "" msgstr "Peržiūrėkite klaidų žurnalus ir pateikite klaidų ataskaitą"
#: searx/templates/oscar/preferences.html:38 #: searx/templates/oscar/preferences.html:38
#: searx/templates/oscar/stats.html:70 #: searx/templates/oscar/stats.html:70
#: searx/templates/simple/preferences.html:53 #: searx/templates/simple/preferences.html:53
#: searx/templates/simple/stats.html:67 #: searx/templates/simple/stats.html:67
msgid "Median" msgid "Median"
msgstr "" msgstr "Mediana"
#: searx/templates/oscar/preferences.html:39 #: searx/templates/oscar/preferences.html:39
#: searx/templates/oscar/stats.html:76 #: searx/templates/oscar/stats.html:76
#: searx/templates/simple/preferences.html:54 #: searx/templates/simple/preferences.html:54
#: searx/templates/simple/stats.html:73 #: searx/templates/simple/stats.html:73
msgid "P80" msgid "P80"
msgstr "" msgstr "P80"
#: searx/templates/oscar/preferences.html:40 #: searx/templates/oscar/preferences.html:40
#: searx/templates/oscar/stats.html:82 #: searx/templates/oscar/stats.html:82
#: searx/templates/simple/preferences.html:55 #: searx/templates/simple/preferences.html:55
#: searx/templates/simple/stats.html:79 #: searx/templates/simple/stats.html:79
msgid "P95" msgid "P95"
msgstr "" msgstr "P95"
#: searx/templates/oscar/preferences.html:68 #: searx/templates/oscar/preferences.html:68
#: searx/templates/simple/preferences.html:83 #: searx/templates/simple/preferences.html:83
msgid "Failed checker test(s): " msgid "Failed checker test(s): "
msgstr "" msgstr "Nepavykęs tikrintojo testas (-ai): "
#: searx/templates/oscar/preferences.html:96 #: searx/templates/oscar/preferences.html:96
#: searx/templates/simple/preferences.html:99 #: searx/templates/simple/preferences.html:99
@ -527,7 +528,7 @@ msgstr "Bendra"
#: searx/templates/oscar/preferences.html:102 #: searx/templates/oscar/preferences.html:102
#: searx/templates/oscar/preferences.html:193 #: searx/templates/oscar/preferences.html:193
msgid "User Interface" msgid "User Interface"
msgstr "" msgstr "Vartotojo sąsaja"
#: searx/templates/oscar/preferences.html:103 #: searx/templates/oscar/preferences.html:103
#: searx/templates/oscar/preferences.html:268 #: searx/templates/oscar/preferences.html:268
@ -1478,4 +1479,3 @@ msgstr ""
#~ "search results but you can search " #~ "search results but you can search "
#~ "the engines listed here via bangs." #~ "the engines listed here via bangs."
#~ msgstr "" #~ msgstr ""

View file

@ -8,19 +8,20 @@
# Mihai Pora <mihai.pora@gmail.com>, 2019 # Mihai Pora <mihai.pora@gmail.com>, 2019
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: searx\n" "Project-Id-Version: searx\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2022-03-20 07:34+0000\n" "POT-Creation-Date: 2022-03-20 07:34+0000\n"
"PO-Revision-Date: 2020-07-09 13:10+0000\n" "PO-Revision-Date: 2022-04-08 07:18+0000\n"
"Last-Translator: Daniel Șerbănescu <daniel@serbanescu.dk>\n" "Last-Translator: Markus Heiser <markus.heiser@darmarit.de>\n"
"Language-Team: Romanian <https://weblate.bubu1.eu/projects/searxng/searxng/"
"ro/>\n"
"Language: ro\n" "Language: ro\n"
"Language-Team: Romanian "
"(http://www.transifex.com/asciimoo/searx/language/ro/)\n"
"Plural-Forms: nplurals=3; "
"plural=(n==1?0:(((n%100>19)||((n%100==0)&&(n!=0)))?2:1))\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n" "Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=n==1 ? 0 : (n==0 || (n%100 > 0 && n%100 < "
"20)) ? 1 : 2;\n"
"X-Generator: Weblate 4.11\n"
"Generated-By: Babel 2.9.1\n" "Generated-By: Babel 2.9.1\n"
#. CONSTANT_NAMES['DEFAULT_GROUP_NAME'] #. CONSTANT_NAMES['DEFAULT_GROUP_NAME']
@ -91,57 +92,57 @@ msgstr "știință"
#. CATEGORY_GROUPS['APPS'] #. CATEGORY_GROUPS['APPS']
#: searx/searxng.msg #: searx/searxng.msg
msgid "apps" msgid "apps"
msgstr "" msgstr "aplicații"
#. CATEGORY_GROUPS['DICTIONARIES'] #. CATEGORY_GROUPS['DICTIONARIES']
#: searx/searxng.msg #: searx/searxng.msg
msgid "dictionaries" msgid "dictionaries"
msgstr "" msgstr "dicționare"
#. CATEGORY_GROUPS['LYRICS'] #. CATEGORY_GROUPS['LYRICS']
#: searx/searxng.msg #: searx/searxng.msg
msgid "lyrics" msgid "lyrics"
msgstr "" msgstr "versuri"
#. CATEGORY_GROUPS['PACKAGES'] #. CATEGORY_GROUPS['PACKAGES']
#: searx/searxng.msg #: searx/searxng.msg
msgid "packages" msgid "packages"
msgstr "" msgstr "pachete"
#. CATEGORY_GROUPS['Q_A'] #. CATEGORY_GROUPS['Q_A']
#: searx/searxng.msg #: searx/searxng.msg
msgid "q&a" msgid "q&a"
msgstr "" msgstr "î&r"
#. CATEGORY_GROUPS['REPOS'] #. CATEGORY_GROUPS['REPOS']
#: searx/searxng.msg #: searx/searxng.msg
msgid "repos" msgid "repos"
msgstr "" msgstr "arhive digitale"
#. CATEGORY_GROUPS['SOFTWARE_WIKIS'] #. CATEGORY_GROUPS['SOFTWARE_WIKIS']
#: searx/searxng.msg #: searx/searxng.msg
msgid "software wikis" msgid "software wikis"
msgstr "" msgstr "enciclopedii de programe"
#. CATEGORY_GROUPS['WEB'] #. CATEGORY_GROUPS['WEB']
#: searx/searxng.msg #: searx/searxng.msg
msgid "web" msgid "web"
msgstr "" msgstr "rețea"
#. STYLE_NAMES['AUTO'] #. STYLE_NAMES['AUTO']
#: searx/searxng.msg #: searx/searxng.msg
msgid "auto" msgid "auto"
msgstr "" msgstr "automat"
#. STYLE_NAMES['LIGHT'] #. STYLE_NAMES['LIGHT']
#: searx/searxng.msg #: searx/searxng.msg
msgid "light" msgid "light"
msgstr "" msgstr "luminos"
#. STYLE_NAMES['DARK'] #. STYLE_NAMES['DARK']
#: searx/searxng.msg #: searx/searxng.msg
msgid "dark" msgid "dark"
msgstr "" msgstr "întunecat"
#: searx/webapp.py:169 #: searx/webapp.py:169
msgid "timeout" msgid "timeout"
@ -149,27 +150,27 @@ msgstr ""
#: searx/webapp.py:170 #: searx/webapp.py:170
msgid "parsing error" msgid "parsing error"
msgstr "" msgstr "examinare eșuată"
#: searx/webapp.py:171 #: searx/webapp.py:171
msgid "HTTP protocol error" msgid "HTTP protocol error"
msgstr "" msgstr "eroare protocol HTTP"
#: searx/webapp.py:172 #: searx/webapp.py:172
msgid "network error" msgid "network error"
msgstr "" msgstr "eraore rețea"
#: searx/webapp.py:174 #: searx/webapp.py:174
msgid "unexpected crash" msgid "unexpected crash"
msgstr "" msgstr "defecțiune neașteptată"
#: searx/webapp.py:181 #: searx/webapp.py:181
msgid "HTTP error" msgid "HTTP error"
msgstr "" msgstr "eroare HTTP"
#: searx/webapp.py:182 #: searx/webapp.py:182
msgid "HTTP connection error" msgid "HTTP connection error"
msgstr "" msgstr "eroare conexiune HTTP"
#: searx/webapp.py:188 #: searx/webapp.py:188
msgid "proxy error" msgid "proxy error"
@ -181,11 +182,11 @@ msgstr ""
#: searx/webapp.py:190 #: searx/webapp.py:190
msgid "too many requests" msgid "too many requests"
msgstr "" msgstr "Prea multe solicitări"
#: searx/webapp.py:191 #: searx/webapp.py:191
msgid "access denied" msgid "access denied"
msgstr "" msgstr "Acces interzis"
#: searx/webapp.py:192 #: searx/webapp.py:192
msgid "server API error" msgid "server API error"
@ -198,15 +199,15 @@ msgstr "Niciun element găsit"
#: searx/engines/qwant.py:212 #: searx/engines/qwant.py:212
#: searx/templates/simple/result_templates/images.html:23 searx/webapp.py:412 #: searx/templates/simple/result_templates/images.html:23 searx/webapp.py:412
msgid "Source" msgid "Source"
msgstr "" msgstr "Sursă"
#: searx/webapp.py:414 #: searx/webapp.py:414
msgid "Error loading the next page" msgid "Error loading the next page"
msgstr "" msgstr "Eroare la încărcarea paginii următoare"
#: searx/webapp.py:526 searx/webapp.py:967 #: searx/webapp.py:526 searx/webapp.py:967
msgid "Invalid settings, please edit your preferences" msgid "Invalid settings, please edit your preferences"
msgstr "Configurări nevalide, editați preferințele" msgstr "Configurări nevalide, modificați preferințele"
#: searx/webapp.py:542 #: searx/webapp.py:542
msgid "Invalid settings" msgid "Invalid settings"
@ -226,7 +227,7 @@ msgstr "{hours} oră(e), {minutes} minut(e) în urmă"
#: searx/webapp.py:871 #: searx/webapp.py:871
msgid "Suspended" msgid "Suspended"
msgstr "" msgstr "Întrerupt"
#: searx/answerers/random/answerer.py:67 #: searx/answerers/random/answerer.py:67
msgid "Random value generator" msgid "Random value generator"
@ -344,7 +345,7 @@ msgstr "Pagină negăsită"
#: searx/templates/oscar/404.html:6 searx/templates/simple/404.html:6 #: searx/templates/oscar/404.html:6 searx/templates/simple/404.html:6
#, python-format #, python-format
msgid "Go to %(search_page)s." msgid "Go to %(search_page)s."
msgstr "Navighează la %(search_page)s" msgstr "Navighează la %(search_page)s."
#: searx/templates/oscar/404.html:6 searx/templates/simple/404.html:6 #: searx/templates/oscar/404.html:6 searx/templates/simple/404.html:6
msgid "search page" msgid "search page"
@ -652,7 +653,7 @@ msgstr "Schimbă limba aspectului"
#: searx/templates/oscar/preferences.html:210 #: searx/templates/oscar/preferences.html:210
#: searx/templates/simple/preferences.html:195 #: searx/templates/simple/preferences.html:195
msgid "Theme" msgid "Theme"
msgstr "" msgstr "Temă"
#: searx/templates/oscar/preferences.html:211 #: searx/templates/oscar/preferences.html:211
#: searx/templates/simple/preferences.html:203 #: searx/templates/simple/preferences.html:203
@ -716,7 +717,7 @@ msgstr "Încarcă automat pagina următoare când se derulează la baza paginii
#: searx/templates/oscar/preferences.html:273 #: searx/templates/oscar/preferences.html:273
#: searx/templates/simple/preferences.html:247 #: searx/templates/simple/preferences.html:247
msgid "HTTP Method" msgid "HTTP Method"
msgstr "" msgstr "Metodă HTTP"
#: searx/templates/oscar/preferences.html:274 #: searx/templates/oscar/preferences.html:274
#: searx/templates/simple/preferences.html:254 #: searx/templates/simple/preferences.html:254
@ -767,7 +768,7 @@ msgstr ""
#: searx/templates/oscar/preferences.html:326 #: searx/templates/oscar/preferences.html:326
msgid "Allow all" msgid "Allow all"
msgstr "" msgstr "Permite toate"
#: searx/templates/oscar/preferences.html:327 #: searx/templates/oscar/preferences.html:327
msgid "Disable all" msgid "Disable all"
@ -1121,7 +1122,7 @@ msgstr "Deocamdată nu există date disponibile."
#: searx/templates/oscar/messages/no_results.html:4 #: searx/templates/oscar/messages/no_results.html:4
#: searx/templates/simple/messages/no_results.html:6 #: searx/templates/simple/messages/no_results.html:6
msgid "Engines cannot retrieve results." msgid "Engines cannot retrieve results."
msgstr "Motoarele nu pot obține rezultate" msgstr "Motoarele nu pot obține rezultate."
#: searx/templates/oscar/messages/no_results.html:13 #: searx/templates/oscar/messages/no_results.html:13
#: searx/templates/simple/messages/no_results.html:15 #: searx/templates/simple/messages/no_results.html:15
@ -1479,4 +1480,3 @@ msgstr ""
#~ "search results but you can search " #~ "search results but you can search "
#~ "the engines listed here via bangs." #~ "the engines listed here via bangs."
#~ msgstr "" #~ msgstr ""

View file

@ -20,7 +20,7 @@ from typing import List, Dict, Iterable, Optional
import urllib import urllib
import urllib.parse import urllib.parse
from urllib.parse import urlencode from urllib.parse import urlencode, unquote
import httpx import httpx
@ -434,7 +434,7 @@ def _get_enable_categories(all_categories: Iterable[str]):
def get_pretty_url(parsed_url: urllib.parse.ParseResult): def get_pretty_url(parsed_url: urllib.parse.ParseResult):
path = parsed_url.path path = parsed_url.path
path = path[:-1] if len(path) > 0 and path[-1] == '/' else path path = path[:-1] if len(path) > 0 and path[-1] == '/' else path
path = path.replace("/", " ") path = unquote(path.replace("/", " "))
return [parsed_url.scheme + "://" + parsed_url.netloc, path] return [parsed_url.scheme + "://" + parsed_url.netloc, path]

View file

@ -113,6 +113,16 @@ def get_unicode_flag(lang_code):
return c1 + c2 return c1 + c2
def get_territory_name(lang_code):
country_name = None
locale = get_locale(lang_code)
try:
country_name = locale.get_territory_name()
except FileNotFoundError as exc:
print("ERROR: %s --> %s" % (locale, exc))
return country_name
# Join all language lists. # Join all language lists.
def join_language_lists(engines_languages): def join_language_lists(engines_languages):
language_list = {} language_list = {}
@ -274,7 +284,7 @@ def write_languages_file(languages):
item = ( item = (
code, code,
languages[code]['name'].split(' (')[0], languages[code]['name'].split(' (')[0],
languages[code].get('country_name') or '', get_territory_name(code) or '',
languages[code].get('english_name') or '', languages[code].get('english_name') or '',
UnicodeEscape(flag), UnicodeEscape(flag),
) )

View file

@ -130,7 +130,7 @@ class TestLanguageParser(SearxTestCase):
self.assertEqual(query.autocomplete_list, [":hu-hu"]) self.assertEqual(query.autocomplete_list, [":hu-hu"])
query = RawTextQuery(':v', []) query = RawTextQuery(':v', [])
self.assertEqual(query.autocomplete_list, [":vi", ":tiếng việt"]) self.assertEqual(query.autocomplete_list, [':vi', ':tiếng việt', ':việt_nam'])
class TestTimeoutParser(SearxTestCase): class TestTimeoutParser(SearxTestCase):

View file

@ -1535,7 +1535,7 @@ pkg_install() {
;; ;;
arch) arch)
# shellcheck disable=SC2068 # shellcheck disable=SC2068
pacman --noprogressbar -Sy --noconfirm $@ pacman --noprogressbar -Sy --noconfirm --needed $@
;; ;;
fedora) fedora)
# shellcheck disable=SC2068 # shellcheck disable=SC2068

View file

@ -69,7 +69,7 @@ nvm.min_node() {
local higher_v local higher_v
if ! command -v node >/dev/null; then if ! command -v node >/dev/null; then
wanr_msg "Node.js is not yet installed" warn_msg "Node.js is not yet installed"
return 42 return 42
fi fi