feat: Translate various strings and comments to Spanish for better localization

- Updated error messages and comments in main.rs, openapi.rs, portfolio.rs, predictive.rs, ai.rs, health.rs, middleware.rs, models.rs, token_limits.rs, and webhooks.rs to Spanish.
- Enhanced user experience by providing localized content for Spanish-speaking users.
This commit is contained in:
2026-04-10 10:26:26 -04:00
parent 7c48b3b1a9
commit 53e5ef4d0b
35 changed files with 1135 additions and 1144 deletions
+6 -6
View File
@@ -1,11 +1,11 @@
//! Health check endpoints for monitoring and observability
//! Endpoints de verificación de salud para monitoreo y observabilidad
use axum::{Json, Router, routing::get, extract::State};
use serde_json::json;
use sqlx::PgPool;
use std::time::Instant;
/// Health check state shared across requests
/// Estado de verificación de salud compartido entre peticiones
#[derive(Clone)]
pub struct HealthState {
pub start_time: Instant,
@@ -21,7 +21,7 @@ impl Default for HealthState {
}
}
/// Basic health check endpoint
/// Endpoint básico de verificación de salud
pub async fn health_check() -> Json<serde_json::Value> {
Json(json!({
"status": "healthy",
@@ -29,7 +29,7 @@ pub async fn health_check() -> Json<serde_json::Value> {
}))
}
/// Detailed readiness check including database connectivity
/// Verificación detallada de disponibilidad que incluye la conectividad con la base de datos
pub async fn readiness_check(pool: PgPool) -> Json<serde_json::Value> {
let db_status = match pool.acquire().await {
Ok(_) => "connected",
@@ -45,7 +45,7 @@ pub async fn readiness_check(pool: PgPool) -> Json<serde_json::Value> {
}))
}
/// Liveness check with uptime information
/// Verificación de vitalidad (liveness) con información de tiempo de actividad (uptime)
pub async fn liveness_check(state: State<HealthState>) -> Json<serde_json::Value> {
let uptime = state.start_time.elapsed();
@@ -57,7 +57,7 @@ pub async fn liveness_check(state: State<HealthState>) -> Json<serde_json::Value
}))
}
/// Create health routes
/// Crear rutas de salud
pub fn health_routes(pool: PgPool) -> Router<HealthState> {
Router::new()
.route("/health", get(health_check))