mirror of
https://github.com/searxng/searxng.git
synced 2024-11-05 04:40:11 +01:00
2ffd446e5c
This PR does no functional change it is just an attempt to make more clear in the code, what a default category is and what a subcategory is. The previous name 'others' leads to confusion with the **category 'other'**. If a engine is not assigned to a category, the default is assigned:: DEFAULT_CATEGORY = 'other' If an engine has only one category and this category is shown as tab in the user interface, this engine has no further subgrouping:: NO_SUBGROUPING = 'without further subgrouping' Related: - https://github.com/searxng/searxng/issues/1604 - https://github.com/searxng/searxng/pull/1545 Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
54 lines
1.1 KiB
Python
54 lines
1.1 KiB
Python
# -*- mode: python -*-
|
|
# SPDX-License-Identifier: AGPL-3.0-or-later
|
|
"""A SearXNG message file, see :py:obj:`searx.babel`
|
|
"""
|
|
|
|
from searx import webutils
|
|
from searx import engines
|
|
|
|
__all__ = [
|
|
'CONSTANT_NAMES',
|
|
'CATEGORY_NAMES',
|
|
'CATEGORY_GROUPS',
|
|
'STYLE_NAMES',
|
|
]
|
|
|
|
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',
|
|
'VIDEOS': 'videos',
|
|
'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',
|
|
}
|