Files
searxng/searx/searxng.msg
Markus Heiser 280aceb1ae [mod] add new category 'stock_images' - a specialization of 'images' (#6703)
Engines like Pexels provide images that one would more likely expect in a
category named ``stock_images``.

By classifying engines like Pexels more precisely, we enable a more specific
handling of them, which also helps to avoid mixing them with the more general
image search on the internet. [1]

We leave these engines *enabled* by default, take them out of ``images`` and
move them into the specialization ``stock_images``.

This makes it possible, on the one hand, for the admin to configure a tab in the
UI, and on the other hand, the user can always select the group directly using
the search syntax ``!stock_images ...``.

What we need to keep in mind:

1. Technically speaking, there are no subcategories in the strict
   sense.  Organizationally, the *subcategories* are derived from the
   `categories_as_tabs`.

2. From an admin’s perspective, `categories_as_tabs` is the tool for
   structuring their content.

3. In the context of “enabled/disabled by default”: We should avoid having
   the admin have to activate many individual engines when they want to
   structure their content (UI tabs).

So if we leave an engine enabled by default and **move** it from `images` to a
new category, the admin only needs to add the new category to
`categories_as_tabs` to restructure their content.  If the new category is also
part of the translations (see `searx/searxng.msg` in this PR), this UI structure
would also be available internationally.

[1] https://github.com/searxng/searxng/pull/6690#issuecomment-5646291679

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2026-09-18 16:13:42 +02:00

113 lines
2.5 KiB
Plaintext

# -*- mode: python -*-
# SPDX-License-Identifier: AGPL-3.0-or-later
"""A SearXNG message file, see :py:obj:`searx.babel`"""
import typing
from searx import webutils
from searx import engines
from searx.weather import WeatherConditionType
__all__ = [
'CONSTANT_NAMES',
'CATEGORY_NAMES',
'CATEGORY_GROUPS',
'STYLE_NAMES',
'BRAND_CUSTOM_LINKS',
'WEATHER_TERMS',
'WEATHER_CONDITIONS',
'SOCIAL_MEDIA_TERMS',
]
CONSTANT_NAMES = {
# Constants defined in other modules
'NO_SUBGROUPING': webutils.NO_SUBGROUPING,
'DEFAULT_CATEGORY': engines.DEFAULT_CATEGORY,
}
CATEGORY_NAMES = {
'FILES': 'files',
'GENERAL': 'general',
'MUSIC': 'music',
'SOCIAL_MEDIA': 'social media',
'IMAGES': 'images',
'STOCK_IMAGES': 'stock images',
'VIDEOS': 'videos',
'RADIO': 'radio',
'TV': 'tv',
'IT': 'it',
'NEWS': 'news',
'MAP': 'map',
'ONIONS': 'onions',
'SCIENCE': 'science',
}
CATEGORY_GROUPS = {
# non-tab categories
'APPS': 'apps',
'DICTIONARIES': 'dictionaries',
'LYRICS': 'lyrics',
'PACKAGES': 'packages',
'Q_A': 'q&a',
'REPOS': 'repos',
'SOFTWARE_WIKIS': 'software wikis',
'WEB': 'web',
'SCIENTIFIC PUBLICATIONS': 'scientific publications',
}
STYLE_NAMES = {
'AUTO': 'auto',
'LIGHT': 'light',
'DARK': 'dark',
'BLACK': 'black',
}
BRAND_CUSTOM_LINKS = {
'UPTIME': 'Uptime',
'ABOUT': 'About',
}
WEATHER_TERMS = {
'AVERAGE TEMP.': 'Average temp.',
'CLOUD COVER': 'Cloud cover',
'CONDITION': 'Condition',
'CURRENT CONDITION': 'Current condition',
'EVENING': 'Evening',
'FEELS LIKE': 'Feels like',
'HUMIDITY': 'Humidity',
'MAX TEMP.': 'Max temp.',
'MIN TEMP.': 'Min temp.',
'MORNING': 'Morning',
'NIGHT': 'Night',
'NOON': 'Noon',
'PRESSURE': 'Pressure',
'SUNRISE': 'Sunrise',
'SUNSET': 'Sunset',
'TEMPERATURE': 'Temperature',
'UV INDEX': 'UV index',
'VISIBILITY': 'Visibility',
'WIND': 'Wind',
}
WEATHER_CONDITIONS = [
# The capitalized string goes into to i18n/l10n (en: "Clear sky" -> de: "wolkenloser Himmel")
msg.capitalize()
for msg in typing.get_args(WeatherConditionType)
]
SOCIAL_MEDIA_TERMS = {
'SUBSCRIBERS': 'subscribers',
'POSTS': 'posts',
'ACTIVE USERS': 'active users',
'COMMENTS': 'comments',
'USER': 'user',
'COMMUNITY': 'community',
'POINTS': 'points',
'TITLE': 'title',
'AUTHOR': 'author',
'THREAD OPEN': 'open',
'THREAD CLOSED': 'closed',
'THREAD ANSWERED': 'answered',
}