Compare commits

..

1 Commits

Author SHA1 Message Date
dependabot[bot] 70fff2ebf1 Bump flask-babel from 2.0.0 to 3.0.0
Bumps [flask-babel](https://github.com/python-babel/flask-babel) from 2.0.0 to 3.0.0.
- [Release notes](https://github.com/python-babel/flask-babel/releases)
- [Changelog](https://github.com/python-babel/flask-babel/blob/master/CHANGELOG)
- [Commits](https://github.com/python-babel/flask-babel/compare/v2.0.0...v3.0.0)

---
updated-dependencies:
- dependency-name: flask-babel
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
1 year ago

2
.gitignore vendored

@ -21,5 +21,3 @@ gh-pages/
/node_modules/ /node_modules/
.idea/ .idea/
searx/version_frozen.py

@ -1,3 +1,3 @@
[weblate] [weblate]
url = https://translate.codeberg.org/api/ url = https://weblate.bubu1.eu/api/
translation = searxng/searxng translation = searxng/searxng

@ -166,5 +166,4 @@ features or generally made searx better:
- Sam A. `<https://samsapti.dev>`_ - Sam A. `<https://samsapti.dev>`_
- @XavierHorwood - @XavierHorwood
- Ahmad Alkadri `<https://github.com/ahmad-alkadri>`_ - Ahmad Alkadri `<https://github.com/ahmad-alkadri>`_
- Milad Laly @Milad-Laly - Milad Laly @Milad-Laly
- @llmII

@ -65,7 +65,6 @@ RUN su searxng -c "/usr/bin/python3 -m compileall -q searx" \
ARG LABEL_DATE= ARG LABEL_DATE=
ARG GIT_URL=unknown ARG GIT_URL=unknown
ARG SEARXNG_GIT_VERSION=unknown ARG SEARXNG_GIT_VERSION=unknown
ARG SEARXNG_DOCKER_TAG=unknown
ARG LABEL_VCS_REF= ARG LABEL_VCS_REF=
ARG LABEL_VCS_URL= ARG LABEL_VCS_URL=
LABEL maintainer="searxng <${GIT_URL}>" \ LABEL maintainer="searxng <${GIT_URL}>" \
@ -80,7 +79,7 @@ LABEL maintainer="searxng <${GIT_URL}>" \
org.label-schema.build-date="${LABEL_DATE}" \ org.label-schema.build-date="${LABEL_DATE}" \
org.label-schema.usage="https://github.com/searxng/searxng-docker" \ org.label-schema.usage="https://github.com/searxng/searxng-docker" \
org.opencontainers.image.title="searxng" \ org.opencontainers.image.title="searxng" \
org.opencontainers.image.version="${SEARXNG_DOCKER_TAG}" \ org.opencontainers.image.version="${SEARXNG_GIT_VERSION}" \
org.opencontainers.image.url="${LABEL_VCS_URL}" \ org.opencontainers.image.url="${LABEL_VCS_URL}" \
org.opencontainers.image.revision=${LABEL_VCS_REF} \ org.opencontainers.image.revision=${LABEL_VCS_REF} \
org.opencontainers.image.source=${LABEL_VCS_URL} \ org.opencontainers.image.source=${LABEL_VCS_URL} \

@ -59,8 +59,8 @@ our homepage_.
.. |commits| image:: https://img.shields.io/github/commit-activity/y/searxng/searxng?color=yellow&label=commits .. |commits| image:: https://img.shields.io/github/commit-activity/y/searxng/searxng?color=yellow&label=commits
:target: https://github.com/searxng/searxng/commits/master :target: https://github.com/searxng/searxng/commits/master
.. |weblate| image:: https://translate.codeberg.org/widgets/searxng/-/searxng/svg-badge.svg .. |weblate| image:: https://weblate.bubu1.eu/widgets/searxng/-/searxng/svg-badge.svg
:target: https://translate.codeberg.org/projects/searxng/ :target: https://weblate.bubu1.eu/projects/searxng/
Contact Contact
@ -134,7 +134,7 @@ Contributing is easier
.. _Morty: https://github.com/asciimoo/morty .. _Morty: https://github.com/asciimoo/morty
.. _Filtron: https://github.com/searxng/filtron .. _Filtron: https://github.com/searxng/filtron
.. _limiter: https://docs.searxng.org/src/searx.plugins.limiter.html .. _limiter: https://docs.searxng.org/src/searx.plugins.limiter.html
.. _Weblate: https://translate.codeberg.org/projects/searxng/searxng/ .. _Weblate: https://weblate.bubu1.eu/projects/searxng/searxng/
.. _Development Quickstart: https://docs.searxng.org/dev/quickstart.html .. _Development Quickstart: https://docs.searxng.org/dev/quickstart.html
@ -142,10 +142,10 @@ Translations
============ ============
We need translators, suggestions are welcome at We need translators, suggestions are welcome at
https://translate.codeberg.org/projects/searxng/searxng/ https://weblate.bubu1.eu/projects/searxng/searxng/
.. figure:: https://translate.codeberg.org/widgets/searxng/-/multi-auto.svg .. figure:: https://weblate.bubu1.eu/widgets/searxng/-/multi-auto.svg
:target: https://translate.codeberg.org/projects/searxng/ :target: https://weblate.bubu1.eu/projects/searxng/
Make a donation Make a donation

@ -4,15 +4,15 @@
Translation Translation
=========== ===========
.. _translate.codeberg.org: https://translate.codeberg.org/projects/searxng/ .. _weblate.bubu1.eu: https://weblate.bubu1.eu/projects/searxng/
.. _Weblate: https://docs.weblate.org .. _Weblate: https://docs.weblate.org
.. _translations branch: https://github.com/searxng/searxng/tree/translations .. _translations branch: https://github.com/searxng/searxng/tree/translations
.. _orphan branch: https://git-scm.com/docs/git-checkout#Documentation/git-checkout.txt---orphanltnewbranchgt .. _orphan branch: https://git-scm.com/docs/git-checkout#Documentation/git-checkout.txt---orphanltnewbranchgt
.. _Weblate repository: https://translate.codeberg.org/projects/searxng/searxng/#repository .. _Weblate repository: https://weblate.bubu1.eu/projects/searxng/searxng/#repository
.. _wlc: https://docs.weblate.org/en/latest/wlc.html .. _wlc: https://docs.weblate.org/en/latest/wlc.html
.. |translated| image:: https://translate.codeberg.org/widgets/searxng/-/searxng/svg-badge.svg .. |translated| image:: https://weblate.bubu1.eu/widgets/searxng/-/searxng/svg-badge.svg
:target: https://translate.codeberg.org/projects/searxng/ :target: https://weblate.bubu1.eu/projects/searxng/
.. sidebar:: |translated| .. sidebar:: |translated|
@ -24,11 +24,11 @@ Translation
- Babel Command-Line: `pybabel <http://babel.pocoo.org/en/latest/cmdline.html>`_ - Babel Command-Line: `pybabel <http://babel.pocoo.org/en/latest/cmdline.html>`_
- `weblate workflow <https://docs.weblate.org/en/latest/workflows.html>`_ - `weblate workflow <https://docs.weblate.org/en/latest/workflows.html>`_
Translation takes place on translate.codeberg.org_. Translation takes place on weblate.bubu1.eu_.
Translations which has been added by translators on the translate.codeberg.org_ UI are Translations which has been added by translators on the weblate.bubu1.eu_ UI are
committed to Weblate's counterpart of the SearXNG *origin* repository which is committed to Weblate's counterpart of the SearXNG *origin* repository which is
located at ``https://translate.codeberg.org/git/searxng/searxng``. located at ``https://weblate.bubu1.eu/git/searxng/searxng``.
There is no need to clone this repository, :ref:`SearXNG Weblate workflow` take There is no need to clone this repository, :ref:`SearXNG Weblate workflow` take
care of the synchronization with the *origin*. To avoid merging commits from care of the synchronization with the *origin*. To avoid merging commits from
@ -68,7 +68,7 @@ wlc
=== ===
.. _wlc configuration: https://docs.weblate.org/en/latest/wlc.html#wlc-config .. _wlc configuration: https://docs.weblate.org/en/latest/wlc.html#wlc-config
.. _API key: https://translate.codeberg.org/accounts/profile/#api .. _API key: https://weblate.bubu1.eu/accounts/profile/#api
All weblate integration is done by GitHub workflows, but if you want to use wlc_, All weblate integration is done by GitHub workflows, but if you want to use wlc_,
copy this content into `wlc configuration`_ in your HOME ``~/.config/weblate`` copy this content into `wlc configuration`_ in your HOME ``~/.config/weblate``
@ -76,6 +76,6 @@ copy this content into `wlc configuration`_ in your HOME ``~/.config/weblate``
.. code-block:: ini .. code-block:: ini
[keys] [keys]
https://translate.codeberg.org/api/ = APIKEY https://weblate.bubu1.eu/api/ = APIKEY
Replace ``APIKEY`` by your `API key`_. Replace ``APIKEY`` by your `API key`_.

@ -190,11 +190,11 @@ weblate.translations.worktree() {
# 'translations' from Weblate's counterpart (weblate) of the SearXNG # 'translations' from Weblate's counterpart (weblate) of the SearXNG
# (origin). # (origin).
# #
# remote weblate https://translate.codeberg.org/git/searxng/searxng/ # remote weblate https://weblate.bubu1.eu/git/searxng/searxng/
( set -e ( set -e
if ! git remote get-url weblate 2> /dev/null; then if ! git remote get-url weblate 2> /dev/null; then
git remote add weblate https://translate.codeberg.org/git/searxng/searxng/ git remote add weblate https://weblate.bubu1.eu/git/searxng/searxng/
fi fi
if [ -d "${TRANSLATIONS_WORKTREE}" ]; then if [ -d "${TRANSLATIONS_WORKTREE}" ]; then
pushd . pushd .
@ -478,7 +478,7 @@ docker.build() {
eval "$(python -m searx.version)" eval "$(python -m searx.version)"
# Get the last git commit id # Get the last git commit id
VERSION_GITCOMMIT=$(echo "$VERSION_TAG" | cut -d+ -f2) VERSION_GITCOMMIT=$(echo "$VERSION_STRING" | cut -d- -f3)
build_msg DOCKER "Last commit : $VERSION_GITCOMMIT" build_msg DOCKER "Last commit : $VERSION_GITCOMMIT"
# define the docker image name # define the docker image name
@ -500,7 +500,6 @@ docker.build() {
docker $BUILD \ docker $BUILD \
--build-arg BASE_IMAGE="${DEPENDENCIES_IMAGE_NAME}" \ --build-arg BASE_IMAGE="${DEPENDENCIES_IMAGE_NAME}" \
--build-arg GIT_URL="${GIT_URL}" \ --build-arg GIT_URL="${GIT_URL}" \
--build-arg SEARXNG_DOCKER_TAG="${DOCKER_TAG}" \
--build-arg SEARXNG_GIT_VERSION="${VERSION_STRING}" \ --build-arg SEARXNG_GIT_VERSION="${VERSION_STRING}" \
--build-arg VERSION_GITCOMMIT="${VERSION_GITCOMMIT}" \ --build-arg VERSION_GITCOMMIT="${VERSION_GITCOMMIT}" \
--build-arg LABEL_DATE="$(date -u +"%Y-%m-%dT%H:%M:%SZ")" \ --build-arg LABEL_DATE="$(date -u +"%Y-%m-%dT%H:%M:%SZ")" \
@ -508,11 +507,11 @@ docker.build() {
--build-arg LABEL_VCS_URL="${GIT_URL}" \ --build-arg LABEL_VCS_URL="${GIT_URL}" \
--build-arg TIMESTAMP_SETTINGS="$(git log -1 --format="%cd" --date=unix -- searx/settings.yml)" \ --build-arg TIMESTAMP_SETTINGS="$(git log -1 --format="%cd" --date=unix -- searx/settings.yml)" \
--build-arg TIMESTAMP_UWSGI="$(git log -1 --format="%cd" --date=unix -- dockerfiles/uwsgi.ini)" \ --build-arg TIMESTAMP_UWSGI="$(git log -1 --format="%cd" --date=unix -- dockerfiles/uwsgi.ini)" \
-t "${SEARXNG_IMAGE_NAME}:latest" -t "${SEARXNG_IMAGE_NAME}:${DOCKER_TAG}" . -t "${SEARXNG_IMAGE_NAME}:latest" -t "${SEARXNG_IMAGE_NAME}:${VERSION_STRING}" .
if [ "$1" = "push" ]; then if [ "$1" = "push" ]; then
docker push "${SEARXNG_IMAGE_NAME}:latest" docker push "${SEARXNG_IMAGE_NAME}:latest"
docker push "${SEARXNG_IMAGE_NAME}:${DOCKER_TAG}" docker push "${SEARXNG_IMAGE_NAME}:${SEARXNG_GIT_VERSION}"
fi fi
) )
dump_return $? dump_return $?

@ -1,6 +1,6 @@
certifi==2022.12.7 certifi==2022.12.7
babel==2.11.0 babel==2.11.0
flask-babel==2.0.0 flask-babel==3.0.0
flask==2.2.2 flask==2.2.2
jinja2==3.1.2 jinja2==3.1.2
lxml==4.9.2 lxml==4.9.2

@ -79,7 +79,7 @@ machen. Je dezentraler das Internet ist, desto mehr Freiheit haben wir!
[SearXNG Dokumentation]: {{get_setting('brand.docs_url')}} [SearXNG Dokumentation]: {{get_setting('brand.docs_url')}}
[searx]: https://github.com/searx/searx [searx]: https://github.com/searx/searx
[Metasuchmaschine]: https://de.wikipedia.org/wiki/Metasuchmaschine [Metasuchmaschine]: https://de.wikipedia.org/wiki/Metasuchmaschine
[Weblate]: https://translate.codeberg.org/projects/searxng/ [Weblate]: https://weblate.bubu1.eu/projects/searxng/
[Seeks-Projekt]: https://beniz.github.io/seeks/ [Seeks-Projekt]: 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

@ -71,7 +71,7 @@ internet is, the more freedom we have!
[SearXNG docs]: {{get_setting('brand.docs_url')}} [SearXNG docs]: {{get_setting('brand.docs_url')}}
[searx]: https://github.com/searx/searx [searx]: https://github.com/searx/searx
[metasearch engine]: https://en.wikipedia.org/wiki/Metasearch_engine [metasearch engine]: https://en.wikipedia.org/wiki/Metasearch_engine
[Weblate]: https://translate.codeberg.org/projects/searxng/ [Weblate]: https://weblate.bubu1.eu/projects/searxng/
[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

@ -74,7 +74,7 @@ terdesentralisasinya internet, lebih banyak kebebasan yang kita punya!
[dokumentasi SearXNG]: {{get_setting('brand.docs_url')}} [dokumentasi SearXNG]: {{get_setting('brand.docs_url')}}
[searx]: https://github.com/searx/searx [searx]: https://github.com/searx/searx
[mesin pencari meta]: https://id.wikipedia.org/wiki/Mesin_pencari_web#Mesin_Pencari_dan_Mesin_Pencari-meta [mesin pencari meta]: https://id.wikipedia.org/wiki/Mesin_pencari_web#Mesin_Pencari_dan_Mesin_Pencari-meta
[Weblate]: https://translate.codeberg.org/projects/searxng/ [Weblate]: https://weblate.bubu1.eu/projects/searxng/
[proyek Seeks]: https://beniz.github.io/seeks/ [proyek Seeks]: 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/id/kb/add-or-remove-search-engine-firefox [Firefox]: https://support.mozilla.org/id/kb/add-or-remove-search-engine-firefox

@ -86,7 +86,7 @@ def get_translations():
use_translation = flask.request.form.get('use-translation') use_translation = flask.request.form.get('use-translation')
if use_translation in ADDITIONAL_TRANSLATIONS: if use_translation in ADDITIONAL_TRANSLATIONS:
babel_ext = flask_babel.current_app.extensions['babel'] babel_ext = flask_babel.current_app.extensions['babel']
return Translations.load(next(babel_ext.translation_directories), use_translation) return Translations.load(babel_ext.translation_directories[0], use_translation)
return _flask_babel_get_translations() return _flask_babel_get_translations()

@ -423,8 +423,11 @@ svg.leaflet-image-layer.leaflet-interactive path {
.leaflet-control-attribution a:focus { .leaflet-control-attribution a:focus {
text-decoration: underline; text-decoration: underline;
} }
.leaflet-control-attribution svg { .leaflet-attribution-flag {
display: inline !important; display: inline !important;
vertical-align: baseline !important;
width: 1em;
height: 0.6669em;
} }
.leaflet-left .leaflet-control-scale { .leaflet-left .leaflet-control-scale {
margin-left: 5px; margin-left: 5px;
@ -438,12 +441,10 @@ svg.leaflet-image-layer.leaflet-interactive path {
line-height: 1.1; line-height: 1.1;
padding: 2px 5px 1px; padding: 2px 5px 1px;
white-space: nowrap; white-space: nowrap;
overflow: hidden;
-moz-box-sizing: border-box; -moz-box-sizing: border-box;
box-sizing: border-box; box-sizing: border-box;
background: rgba(255, 255, 255, 0.8);
background: #fff; text-shadow: 1px 1px #fff;
background: rgba(255, 255, 255, 0.5);
} }
.leaflet-control-scale-line:not(:first-child) { .leaflet-control-scale-line:not(:first-child) {
border-top: 2px solid #777; border-top: 2px solid #777;
@ -537,8 +538,6 @@ svg.leaflet-image-layer.leaflet-interactive path {
} }
.leaflet-popup-scrolled { .leaflet-popup-scrolled {
overflow: auto; overflow: auto;
border-bottom: 1px solid #ddd;
border-top: 1px solid #ddd;
} }
.leaflet-oldie .leaflet-popup-content-wrapper { .leaflet-oldie .leaflet-popup-content-wrapper {
@ -652,6 +651,6 @@ svg.leaflet-image-layer.leaflet-interactive path {
/* Prevent printers from removing background-images of controls. */ /* Prevent printers from removing background-images of controls. */
.leaflet-control { .leaflet-control {
-webkit-print-color-adjust: exact; -webkit-print-color-adjust: exact;
color-adjust: exact; print-color-adjust: exact;
} }
} }

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

File diff suppressed because one or more lines are too long

@ -1 +1 @@
{"version":3,"file":"searxng.head.min.js","sources":["../src/js/head/00_init.js"],"sourcesContent":["/* SPDX-License-Identifier: AGPL-3.0-or-later */\n(function (w, d) {\n 'use strict';\n\n // add data- properties\n var script = d.currentScript || (function () {\n var scripts = d.getElementsByTagName('script');\n return scripts[scripts.length - 1];\n })();\n\n w.searxng = {\n settings: JSON.parse(atob(script.getAttribute('client_settings')))\n };\n\n // update the css\n var hmtlElement = d.getElementsByTagName(\"html\")[0];\n hmtlElement.classList.remove('no-js');\n hmtlElement.classList.add('js');\n\n})(window, document);\n"],"names":["w","d","script","currentScript","scripts","getElementsByTagName","length","searxng","settings","JSON","parse","atob","getAttribute","hmtlElement","classList","remove","add","window","document"],"mappings":"CACA,SAAWA,EAAGC,gBAIZ,IAAIC,EAASD,EAAEE,eAAkB,WAC/B,IAAIC,EAAUH,EAAEI,qBAAqB,UACrC,OAAOD,EAAQA,EAAQE,OAAS,GAFD,GAKjCN,EAAEO,QAAU,CACVC,SAAUC,KAAKC,MAAMC,KAAKT,EAAOU,aAAa,sBAIhD,IAAIC,EAAcZ,EAAEI,qBAAqB,QAAQ,GACjDQ,EAAYC,UAAUC,OAAO,SAC7BF,EAAYC,UAAUE,IAAI,OAhB5B,CAkBGC,OAAQC"} {"version":3,"file":"searxng.head.min.js","sources":["../src/js/head/00_init.js"],"sourcesContent":["/* SPDX-License-Identifier: AGPL-3.0-or-later */\n(function (w, d) {\n 'use strict';\n\n // add data- properties\n var script = d.currentScript || (function () {\n var scripts = d.getElementsByTagName('script');\n return scripts[scripts.length - 1];\n })();\n\n w.searxng = {\n settings: JSON.parse(atob(script.getAttribute('client_settings')))\n };\n\n // update the css\n var hmtlElement = d.getElementsByTagName(\"html\")[0];\n hmtlElement.classList.remove('no-js');\n hmtlElement.classList.add('js');\n\n})(window, document);\n"],"names":["w","d","script","currentScript","scripts","getElementsByTagName","length","searxng","settings","JSON","parse","atob","getAttribute","hmtlElement","classList","remove","add","window","document"],"mappings":"CACA,SAAWA,EAAGC,GACZ,aAGA,IAAIC,EAASD,EAAEE,eAAkB,WAC/B,IAAIC,EAAUH,EAAEI,qBAAqB,QAAQ,EAC7C,OAAOD,EAAQA,EAAQE,OAAS,EACjC,EAAE,EAEHN,EAAEO,QAAU,CACVC,SAAUC,KAAKC,MAAMC,KAAKT,EAAOU,aAAa,iBAAiB,CAAC,CAAC,CACnE,EAGA,IAAIC,EAAcZ,EAAEI,qBAAqB,MAAM,EAAE,GACjDQ,EAAYC,UAAUC,OAAO,OAAO,EACpCF,EAAYC,UAAUE,IAAI,IAAI,CAE/B,GAAEC,OAAQC,QAAQ"}

File diff suppressed because one or more lines are too long

@ -362,7 +362,7 @@ article[data-vim-selected].category-social {
.category-files, .category-files,
.category-social { .category-social {
border: 1px solid var(--color-result-border); border: 1px solid var(--color-result-border);
margin: 0 @results-tablet-offset 1rem @results-tablet-offset !important; margin: 1rem @results-tablet-offset 0 @results-tablet-offset !important;
.rounded-corners; .rounded-corners;
} }
@ -734,26 +734,6 @@ article[data-vim-selected].category-social {
} }
} }
.numbered_pagination {
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
overflow: hidden;
}
.page_number {
background: transparent !important;
color: var(--color-result-link-font) !important;
text-decoration: underline;
}
.page_number_current {
background: transparent;
color: var(--color-result-link-visited-font);
border: none;
}
#apis { #apis {
margin-top: 8px; margin-top: 8px;
clear: both; clear: both;
@ -1029,10 +1009,6 @@ article[data-vim-selected].category-social {
background-color: var(--color-sidebar-background); background-color: var(--color-sidebar-background);
} }
.numbered_pagination {
display: none;
}
.result-paper { .result-paper {
.attributes { .attributes {
display: block; display: block;

@ -187,35 +187,6 @@
<button role="link" type="submit">{{ _('Next page') }} {{ icon_small('chevron-right') }}</button> <button role="link" type="submit">{{ _('Next page') }} {{ icon_small('chevron-right') }}</button>
</div> </div>
</form> </form>
{% set pstart = 1 %}
{% set pend = 11 %}
{% if pageno > 5 %}
{% set pstart = pageno - 4 %}
{% set pend = pageno + 6 %}
{% endif %}
<div class="numbered_pagination">
{% for x in range(pstart, pend) %}
<form method="{{ method or 'POST' }}" action="{{ url_for('search') }}" class="page_number">
<input type="hidden" name="q" value="{{ q|e }}" >
{% for category in selected_categories %}
<input type="hidden" name="category_{{ category }}" value="1" >
{% endfor %}
<input type="hidden" name="pageno" value="{{ x }}" >
<input type="hidden" name="language" value="{{ current_language }}" >
<input type="hidden" name="time_range" value="{{ time_range }}" >
<input type="hidden" name="safesearch" value="{{ safesearch }}" >
<input type="hidden" name="theme" value="{{ theme }}" >
{% if timeout_limit %}<input type="hidden" name="timeout_limit" value="{{ timeout_limit|e }}" >{% endif %}
{{- engine_data_form(engine_data) -}}
{% if pageno == x %}
<input role="link" class="page_number_current" type="button" value="{{ x }}">
{% else %}
<input role="link" class="page_number" type="submit" value="{{ x }}">
{% endif %}
</form>
{% endfor %}
</div>
</nav> </nav>
{% endif %} {% endif %}
</div> </div>

@ -9,24 +9,23 @@
# pointhi, 2014 # pointhi, 2014
# rike, 2014 # rike, 2014
# stf <stefan.marsiske@gmail.com>, 2014 # stf <stefan.marsiske@gmail.com>, 2014
# Markus Heiser <markus.heiser@darmarit.de>, 2022, 2023. # Markus Heiser <markus.heiser@darmarit.de>, 2022.
# Shopimisrel <shopisrael12@gmail.com>, 2022. # Shopimisrel <shopisrael12@gmail.com>, 2022.
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-12-12 07:18+0000\n" "POT-Creation-Date: 2022-12-12 07:18+0000\n"
"PO-Revision-Date: 2023-01-20 07:15+0000\n" "PO-Revision-Date: 2022-09-21 15:58+0000\n"
"Last-Translator: Markus Heiser <markus.heiser@darmarit.de>\n" "Last-Translator: Markus Heiser <markus.heiser@darmarit.de>\n"
"Language-Team: Hebrew <https://weblate.bubu1.eu/projects/searxng/searxng/he/>"
"\n"
"Language: he\n" "Language: he\n"
"Language-Team: Hebrew "
"<https://weblate.bubu1.eu/projects/searxng/searxng/he/>\n"
"Plural-Forms: nplurals=4; plural=(n == 1) ? 0 : ((n == 2) ? 1 : ((n > 10 "
"&& n % 10 == 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 == 1) ? 0 : ((n == 2) ? 1 : ((n > 10 && "
"n % 10 == 0) ? 2 : 3));\n"
"X-Generator: Weblate 4.14.1\n"
"Generated-By: Babel 2.11.0\n" "Generated-By: Babel 2.11.0\n"
#. CONSTANT_NAMES['DEFAULT_GROUP_NAME'] #. CONSTANT_NAMES['DEFAULT_GROUP_NAME']
@ -137,7 +136,7 @@ msgstr "רשת"
#. CATEGORY_GROUPS['SCIENTIFIC PUBLICATIONS'] #. CATEGORY_GROUPS['SCIENTIFIC PUBLICATIONS']
#: searx/searxng.msg #: searx/searxng.msg
msgid "scientific publications" msgid "scientific publications"
msgstr "מחקרים מדעיים" msgstr ""
#. STYLE_NAMES['AUTO'] #. STYLE_NAMES['AUTO']
#: searx/searxng.msg #: searx/searxng.msg
@ -172,7 +171,7 @@ msgstr "שגיאת רשת תקשורת"
#: searx/webapp.py:169 #: searx/webapp.py:169
msgid "SSL error: certificate validation has failed" msgid "SSL error: certificate validation has failed"
msgstr "שגיאת SSL: אימות התעודה נכשל" msgstr ""
#: searx/webapp.py:171 #: searx/webapp.py:171
msgid "unexpected crash" msgid "unexpected crash"
@ -305,27 +304,27 @@ msgstr "אי אפשר להוריד את תמונה זו."
#: searx/engines/wttr.py:101 #: searx/engines/wttr.py:101
msgid "Morning" msgid "Morning"
msgstr "בוקר" msgstr ""
#: searx/engines/wttr.py:101 #: searx/engines/wttr.py:101
msgid "Noon" msgid "Noon"
msgstr "צהריים" msgstr ""
#: searx/engines/wttr.py:101 #: searx/engines/wttr.py:101
msgid "Evening" msgid "Evening"
msgstr "ערב" msgstr ""
#: searx/engines/wttr.py:101 #: searx/engines/wttr.py:101
msgid "Night" msgid "Night"
msgstr "לילה" msgstr ""
#: searx/plugins/autodetect_search_language.py:79 #: searx/plugins/autodetect_search_language.py:79
msgid "Autodetect search language" msgid "Autodetect search language"
msgstr "זיהוי שפת חיפוש אוטומטי" msgstr ""
#: searx/plugins/autodetect_search_language.py:80 #: searx/plugins/autodetect_search_language.py:80
msgid "Automatically detect the query search language and switch to it." msgid "Automatically detect the query search language and switch to it."
msgstr "זהה אוטומטית את שפת החיפוש והחלף אליה בהתאם." msgstr ""
#: 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."
@ -369,7 +368,7 @@ msgstr ""
#: searx/plugins/self_info.py:20 #: searx/plugins/self_info.py:20
msgid "Self Information" msgid "Self Information"
msgstr "מידע עצמי" msgstr ""
#: searx/plugins/self_info.py:21 #: searx/plugins/self_info.py:21
msgid "" msgid ""
@ -1121,7 +1120,7 @@ msgstr "הסתר מפה"
#: searx/templates/simple/result_templates/paper.html:5 #: searx/templates/simple/result_templates/paper.html:5
msgid "Published date" msgid "Published date"
msgstr "תאריך פרסום" msgstr ""
#: searx/templates/simple/result_templates/paper.html:9 #: searx/templates/simple/result_templates/paper.html:9
msgid "Journal" msgid "Journal"
@ -1129,7 +1128,7 @@ msgstr ""
#: searx/templates/simple/result_templates/paper.html:22 #: searx/templates/simple/result_templates/paper.html:22
msgid "Editor" msgid "Editor"
msgstr "עורך" msgstr ""
#: searx/templates/simple/result_templates/paper.html:23 #: searx/templates/simple/result_templates/paper.html:23
msgid "Publisher" msgid "Publisher"
@ -1137,11 +1136,11 @@ msgstr ""
#: searx/templates/simple/result_templates/paper.html:24 #: searx/templates/simple/result_templates/paper.html:24
msgid "Type" msgid "Type"
msgstr "סוג" msgstr ""
#: searx/templates/simple/result_templates/paper.html:25 #: searx/templates/simple/result_templates/paper.html:25
msgid "Tags" msgid "Tags"
msgstr "תגים" msgstr ""
#: searx/templates/simple/result_templates/paper.html:26 #: searx/templates/simple/result_templates/paper.html:26
msgid "DOI" msgid "DOI"
@ -1484,3 +1483,4 @@ msgstr "הסתר וידאו"
#~ "href=\"https://he.wikipedia.org/wiki/Hypertext_Transfer_Protocol#.D7.A9.D7.99.D7.98.D7.95.D7.AA_.D7.91.D7.A7.D7.A9.D7.94\"" #~ "href=\"https://he.wikipedia.org/wiki/Hypertext_Transfer_Protocol#.D7.A9.D7.99.D7.98.D7.95.D7.AA_.D7.91.D7.A7.D7.A9.D7.94\""
#~ " rel=\"external\">למידע נוסף אודות שיטות " #~ " rel=\"external\">למידע נוסף אודות שיטות "
#~ "בקשה (request methods)</a>" #~ "בקשה (request methods)</a>"

@ -12,22 +12,20 @@
# SecularSteve <fairfull.playing@gmail.com>, 2022. # SecularSteve <fairfull.playing@gmail.com>, 2022.
# Sweder doc <swederdvl@gmail.com>, 2022. # Sweder doc <swederdvl@gmail.com>, 2022.
# Peter Martin <weblate@pe7er.com>, 2022. # Peter Martin <weblate@pe7er.com>, 2022.
# Max Westen <max@maxwesten.nl>, 2023.
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-12-12 07:18+0000\n" "POT-Creation-Date: 2022-12-12 07:18+0000\n"
"PO-Revision-Date: 2023-01-20 07:15+0000\n" "PO-Revision-Date: 2022-11-19 16:21+0000\n"
"Last-Translator: Max Westen <max@maxwesten.nl>\n" "Last-Translator: Markus Heiser <markus.heiser@darmarit.de>\n"
"Language-Team: Dutch <https://weblate.bubu1.eu/projects/searxng/searxng/nl/>"
"\n"
"Language: nl\n" "Language: nl\n"
"Language-Team: Dutch "
"<https://weblate.bubu1.eu/projects/searxng/searxng/nl/>\n"
"Plural-Forms: nplurals=2; plural=n != 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=2; plural=n != 1;\n"
"X-Generator: Weblate 4.14.1\n"
"Generated-By: Babel 2.11.0\n" "Generated-By: Babel 2.11.0\n"
#. CONSTANT_NAMES['DEFAULT_GROUP_NAME'] #. CONSTANT_NAMES['DEFAULT_GROUP_NAME']
@ -73,7 +71,7 @@ msgstr "videos"
#. CATEGORY_NAMES['IT'] #. CATEGORY_NAMES['IT']
#: searx/searxng.msg #: searx/searxng.msg
msgid "it" msgid "it"
msgstr "IT" msgstr "het"
#. CATEGORY_NAMES['NEWS'] #. CATEGORY_NAMES['NEWS']
#: searx/searxng.msg #: searx/searxng.msg
@ -386,7 +384,7 @@ msgstr ""
#: searx/plugins/tor_check.py:25 #: searx/plugins/tor_check.py:25
msgid "Tor check plugin" msgid "Tor check plugin"
msgstr "Tor controle plug-in" msgstr "Tor proef plug-in"
#: searx/plugins/tor_check.py:28 #: searx/plugins/tor_check.py:28
msgid "" msgid ""
@ -1512,3 +1510,4 @@ msgstr "verberg video"
#~ "href=\"http://nl.wikipedia.org/wiki/Hypertext_Transfer_Protocol" #~ "href=\"http://nl.wikipedia.org/wiki/Hypertext_Transfer_Protocol"
#~ "#HTTP-requests\" rel=\"external\">lees meer over" #~ "#HTTP-requests\" rel=\"external\">lees meer over"
#~ " opvraagmethodes</a>" #~ " opvraagmethodes</a>"

@ -17,22 +17,20 @@
# calb sepherus <calb.sepherus@protonmail.com>, 2022. # calb sepherus <calb.sepherus@protonmail.com>, 2022.
# Yan Lyra <yanlyra3@gmail.com>, 2022. # Yan Lyra <yanlyra3@gmail.com>, 2022.
# zaioti <zaioti@tuta.io>, 2022. # zaioti <zaioti@tuta.io>, 2022.
# Spectro <spectro@keemail.me>, 2023.
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-12-12 07:18+0000\n" "POT-Creation-Date: 2022-12-12 07:18+0000\n"
"PO-Revision-Date: 2023-01-20 07:15+0000\n" "PO-Revision-Date: 2022-11-28 13:11+0000\n"
"Last-Translator: Spectro <spectro@keemail.me>\n" "Last-Translator: Markus Heiser <markus.heiser@darmarit.de>\n"
"Language-Team: Portuguese (Brazil) <https://weblate.bubu1.eu/projects/"
"searxng/searxng/pt_BR/>\n"
"Language: pt_BR\n" "Language: pt_BR\n"
"Language-Team: Portuguese (Brazil) "
"<https://weblate.bubu1.eu/projects/searxng/searxng/pt_BR/>\n"
"Plural-Forms: nplurals=2; plural=n > 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=2; plural=n > 1;\n"
"X-Generator: Weblate 4.14.1\n"
"Generated-By: Babel 2.11.0\n" "Generated-By: Babel 2.11.0\n"
#. CONSTANT_NAMES['DEFAULT_GROUP_NAME'] #. CONSTANT_NAMES['DEFAULT_GROUP_NAME']
@ -330,12 +328,11 @@ msgstr "Noite"
#: searx/plugins/autodetect_search_language.py:79 #: searx/plugins/autodetect_search_language.py:79
msgid "Autodetect search language" msgid "Autodetect search language"
msgstr "Detecção automática de idioma de pesquisa" msgstr ""
#: searx/plugins/autodetect_search_language.py:80 #: searx/plugins/autodetect_search_language.py:80
msgid "Automatically detect the query search language and switch to it." msgid "Automatically detect the query search language and switch to it."
msgstr "" msgstr ""
"Detecte automaticamente o idioma de pesquisa da consulta e mude para ele."
#: 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."
@ -1521,3 +1518,4 @@ msgstr "ocultar vídeo"
#~ "href=\"http://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Request_methods\"" #~ "href=\"http://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Request_methods\""
#~ " rel=\"external\">saiba mais sobre os " #~ " rel=\"external\">saiba mais sobre os "
#~ "métodos de solicitação</a>" #~ "métodos de solicitação</a>"

@ -59,10 +59,10 @@ def get_git_url_and_branch():
def get_git_version(): def get_git_version():
git_commit_date_hash = subprocess_run(r"git show -s --date='format:%-Y.%-m.%-d' --format='%cd+%h'") git_commit_date_hash = subprocess_run(r"git show -s --date='format:%Y.%m.%d' --format='%cd+%h'")
tag_version = git_version = git_commit_date_hash tag_version = git_version = git_commit_date_hash
# add "+dirty" suffix if there are uncommited changes except searx/settings.yml # add "-dirty" suffix if there are uncommited changes except searx/settings.yml
try: try:
subprocess_run("git diff --quiet -- . ':!searx/settings.yml' ':!utils/brand.env'") subprocess_run("git diff --quiet -- . ':!searx/settings.yml' ':!utils/brand.env'")
except subprocess.CalledProcessError as e: except subprocess.CalledProcessError as e:
@ -70,23 +70,16 @@ def get_git_version():
git_version += "+dirty" git_version += "+dirty"
else: else:
logger.warning('"%s" returns an unexpected return code %i', e.returncode, e.cmd) logger.warning('"%s" returns an unexpected return code %i', e.returncode, e.cmd)
docker_tag = git_version.replace("+", "-") return git_version, tag_version
return git_version, tag_version, docker_tag
try: try:
vf = importlib.import_module('searx.version_frozen') vf = importlib.import_module('searx.version_frozen')
VERSION_STRING, VERSION_TAG, DOCKER_TAG, GIT_URL, GIT_BRANCH = ( VERSION_STRING, VERSION_TAG, GIT_URL, GIT_BRANCH = vf.VERSION_STRING, vf.VERSION_TAG, vf.GIT_URL, vf.GIT_BRANCH
vf.VERSION_STRING,
vf.VERSION_TAG,
vf.DOCKER_TAG,
vf.GIT_URL,
vf.GIT_BRANCH,
)
except ImportError: except ImportError:
try: try:
try: try:
VERSION_STRING, VERSION_TAG, DOCKER_TAG = get_git_version() VERSION_STRING, VERSION_TAG = get_git_version()
except subprocess.CalledProcessError as ex: except subprocess.CalledProcessError as ex:
logger.error("Error while getting the version: %s", ex.stderr) logger.error("Error while getting the version: %s", ex.stderr)
try: try:
@ -109,7 +102,6 @@ if __name__ == "__main__":
VERSION_STRING = "{VERSION_STRING}" VERSION_STRING = "{VERSION_STRING}"
VERSION_TAG = "{VERSION_TAG}" VERSION_TAG = "{VERSION_TAG}"
DOCKER_TAG = "{DOCKER_TAG}"
GIT_URL = "{GIT_URL}" GIT_URL = "{GIT_URL}"
GIT_BRANCH = "{GIT_BRANCH}" GIT_BRANCH = "{GIT_BRANCH}"
""" """
@ -122,7 +114,6 @@ GIT_BRANCH = "{GIT_BRANCH}"
shell_code = f""" shell_code = f"""
VERSION_STRING="{VERSION_STRING}" VERSION_STRING="{VERSION_STRING}"
VERSION_TAG="{VERSION_TAG}" VERSION_TAG="{VERSION_TAG}"
DOCKER_TAG="{DOCKER_TAG}"
GIT_URL="{GIT_URL}" GIT_URL="{GIT_URL}"
GIT_BRANCH="{GIT_BRANCH}" GIT_BRANCH="{GIT_BRANCH}"
""" """

@ -160,8 +160,6 @@ app.jinja_env.add_extension('jinja2.ext.loopcontrols') # pylint: disable=no-mem
app.jinja_env.filters['group_engines_in_tab'] = group_engines_in_tab # pylint: disable=no-member app.jinja_env.filters['group_engines_in_tab'] = group_engines_in_tab # pylint: disable=no-member
app.secret_key = settings['server']['secret_key'] app.secret_key = settings['server']['secret_key']
babel = Babel(app)
timeout_text = gettext('timeout') timeout_text = gettext('timeout')
parsing_error_text = gettext('parsing error') parsing_error_text = gettext('parsing error')
http_protocol_error_text = gettext('HTTP protocol error') http_protocol_error_text = gettext('HTTP protocol error')
@ -211,13 +209,15 @@ class ExtendedRequest(flask.Request):
request = typing.cast(ExtendedRequest, flask.request) request = typing.cast(ExtendedRequest, flask.request)
@babel.localeselector
def get_locale(): def get_locale():
locale = localeselector() locale = localeselector()
logger.debug("%s uses locale `%s`", urllib.parse.quote(request.url), locale) logger.debug("%s uses locale `%s`", urllib.parse.quote(request.url), locale)
return locale return locale
babel = Babel(app, locale_selector=get_locale)
def _get_browser_language(req, lang_list): def _get_browser_language(req, lang_list):
for lang in req.headers.get("Accept-Language", "en").split(","): for lang in req.headers.get("Accept-Language", "en").split(","):
if ';' in lang: if ';' in lang:

Loading…
Cancel
Save