mirror of
https://github.com/Dasemu/skipredictor.git
synced 2026-11-26 23:36:17 +00:00
feat(bot): translate all telegram bot messages to spanish
This commit is contained in:
1 parent
1bc1e58781
commit
b690e82f98
3 files changed
+48
-48
No files matched your search
@@ -69,27 +69,27 @@ def _build_weather_summary(weather_data: dict[str, Any]) -> str:
|
||||
temp_max = weather_data.get("temperature_2m_max")
|
||||
temp_min = weather_data.get("temperature_2m_min")
|
||||
if temp_max is not None and temp_min is not None:
|
||||
parts.append(f"Temp {temp_min:.0f}–{temp_max:.0f} °C")
|
||||
parts.append(f"Tª {temp_min:.0f}–{temp_max:.0f} °C")
|
||||
elif temp_max is not None:
|
||||
parts.append(f"Temp max {temp_max:.0f} °C")
|
||||
parts.append(f"Tª máx {temp_max:.0f} °C")
|
||||
|
||||
snowfall = weather_data.get("snowfall_sum")
|
||||
if snowfall is not None and snowfall > 0:
|
||||
parts.append(f"Snow {snowfall:.0f} cm")
|
||||
parts.append(f"Nieve {snowfall:.0f} cm")
|
||||
|
||||
snow_depth = weather_data.get("snow_depth")
|
||||
if snow_depth is not None:
|
||||
parts.append(f"Depth {snow_depth:.0f} cm")
|
||||
parts.append(f"Espesor {snow_depth:.0f} cm")
|
||||
|
||||
precip = weather_data.get("precipitation_sum")
|
||||
if precip is not None and precip > 0:
|
||||
parts.append(f"Rain {precip:.1f} mm")
|
||||
parts.append(f"Lluvia {precip:.1f} mm")
|
||||
|
||||
wind_gust = weather_data.get("wind_gusts_10m_max")
|
||||
if wind_gust is not None:
|
||||
parts.append(f"Gusts {wind_gust:.0f} km/h")
|
||||
parts.append(f"Rachas {wind_gust:.0f} km/h")
|
||||
|
||||
return " | ".join(parts) if parts else "No weather data available."
|
||||
return " | ".join(parts) if parts else "Sin datos meteorológicos disponibles."
|
||||
|
||||
|
||||
class HybridPredictor:
|
||||
@@ -413,9 +413,9 @@ class HybridPredictor:
|
||||
reasons_text = " ".join(reasons).lower()
|
||||
|
||||
# Infer crowd from rule reasons text
|
||||
if "high crowd" in reasons_text or "busy" in reasons_text:
|
||||
if "afluencia alto" in reasons_text or "concurrida" in reasons_text:
|
||||
return "high"
|
||||
if "low crowd" in reasons_text:
|
||||
if "afluencia bajo" in reasons_text:
|
||||
return "low"
|
||||
|
||||
# Use ML prediction if available
|
||||
|
||||
Reference in new issue
Block a user