summaryrefslogtreecommitdiff
path: root/searx/searxng.msg
diff options
context:
space:
mode:
authorMarkus Heiser <markus.heiser@darmarit.de>2025-05-29 11:38:34 +0200
committerMarkus Heiser <markus.heiser@darmarIT.de>2025-05-31 20:34:59 +0200
commitff206e967993bd2e7aa6597b03d0affee20948b9 (patch)
tree1b03b3da44e5db205c55f6ed7783a94c6da3d8d7 /searx/searxng.msg
parenta800dd04735c98a293edff00493a5fee3dfeaed7 (diff)
[mod] weather results: add types, i18n/l10n, symbols & unit conversions
The types necessary for weather information such as GeoLocation, DateTime, Temperature,Pressure, WindSpeed, RelativeHumidity, Compass (wind direction) and symbols for the weather have been implemented. There are unit conversions and translations for weather property labels. Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Diffstat (limited to 'searx/searxng.msg')
-rw-r--r--searx/searxng.msg12
1 files changed, 12 insertions, 0 deletions
diff --git a/searx/searxng.msg b/searx/searxng.msg
index a4bfb038a..7401b8313 100644
--- a/searx/searxng.msg
+++ b/searx/searxng.msg
@@ -3,8 +3,12 @@
"""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',
@@ -13,6 +17,7 @@ __all__ = [
'STYLE_NAMES',
'BRAND_CUSTOM_LINKS',
'WEATHER_TERMS',
+ 'WEATHER_CONDITIONS',
'SOCIAL_MEDIA_TERMS',
]
@@ -85,6 +90,13 @@ WEATHER_TERMS = {
'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',