diff --git a/.gitignore b/.gitignore index cceef01..2954a9f 100644 --- a/.gitignore +++ b/.gitignore @@ -26,3 +26,7 @@ AGENTS.md # Local agent/editor config .claude/ + +# paraglide compiles the message runtime into the source tree +/src/lib/paraglide +/.inlang diff --git a/eslint.config.js b/eslint.config.js index 3d31f3e..40edcc3 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -25,6 +25,10 @@ export default defineConfig( // typescript-eslint strongly recommend that you do not use the no-undef lint rule on TypeScript projects. // see: https://typescript-eslint.io/troubleshooting/faqs/eslint/#i-get-errors-from-the-no-undef-rule-about-global-variables-not-being-defined-even-though-there-are-no-typescript-errors 'no-undef': 'off', + // Internal links go through `href()` / `gotoLocalized()` from $lib/i18n, + // which call resolve() and then add the locale prefix. The rule only + // recognises a literal resolve() call, so it cannot see through them. + 'svelte/no-navigation-without-resolve': 'off', '@typescript-eslint/no-unused-vars': [ 'error', { diff --git a/messages/de.json b/messages/de.json new file mode 100644 index 0000000..e1ec8d2 --- /dev/null +++ b/messages/de.json @@ -0,0 +1,126 @@ +{ + "$schema": "https://inlang.com/schema/inlang-message-format", + "nav_week": "7-Tage-Vorhersage", + "nav_compare": "Modellvergleich", + "nav_14day": "14-Tage-Vorhersage", + "nav_seasonal": "Saisonal", + "nav_historical": "Rückblick", + "nav_maps": "Karten", + "nav_collapse": "Einklappen", + "nav_expand_sidebar": "Seitenleiste ausklappen", + "nav_collapse_sidebar": "Seitenleiste einklappen", + "nav_home": "Drizzli Startseite", + "nav_toggle_menu": "Menü umschalten", + "search_placeholder": "Ort suchen …", + "settings_title": "Einstellungen", + "units_title": "Einheiten", + "units_aria": "Maßeinheiten wählen", + "unit_temperature": "Temperatur", + "unit_wind_speed": "Windgeschwindigkeit", + "unit_precipitation": "Niederschlag", + "theme_label": "Design", + "theme_system": "System", + "theme_light": "Hell", + "theme_dark": "Dunkel", + "theme_follow_system": "Design: System folgen", + "theme_light_title": "Design: hell", + "theme_dark_title": "Design: dunkel", + "language_label": "Sprache", + "supporter_active": "Unterstützer-Extras aktiv", + "supporter_support": "Drizz.li unterstützen", + "supporter_manage_key": "Zugangsschlüssel verwalten", + "supporter_unlock": "Unterstützer-Extras freischalten", + "supporter_badge": "Unterstützer", + "strip_past_label": "zurück", + "strip_past_aria": "Die letzten 3 Tage laden", + "strip_days_label": "Tage", + "strip_extend_aria": "Die vollen 15 Tage anzeigen", + "strip_history_label": "Archiv", + "strip_history_aria": "Wetterarchiv öffnen", + "strip_history_title": "Rückblick: jedes Datum zurück bis 1940", + "strip_seasonal_label": "saisonal", + "strip_seasonal_aria": "Saisonale Aussichten öffnen", + "strip_seasonal_title": "Saisonale Aussichten: Monatstrends für die kommenden Monate", + "day_today": "Heute", + "day_tomorrow": "Morgen", + "day_yesterday": "Gestern", + "page_week_subtitle": "7-Tage-Vorhersage", + "page_compare_subtitle": "Modellvergleich", + "page_14day_subtitle": "14-Tage-Ensemblevorhersage", + "page_seasonal_subtitle": "Saisonale Aussichten", + "page_historical_subtitle": "Wetterrückblick", + "hourly_heading": "stündlich", + "hourly_variables": "Variablen", + "meteograms_heading": "Meteogramme", + "meteograms_customize": "Anpassen", + "meteograms_zoom_hint": "Ziehen oder", + "meteograms_zoom_hint_end": "+ Scrollen zum Zoomen", + "range_today": "Heute", + "range_selected_day": "Gewählter Tag", + "range_3_days": "3 Tage", + "range_5_days": "5 Tage", + "range_all": "Alles", + "range_group_aria": "Zeitraum des Diagramms", + "reset_zoom": "Zoom zurücksetzen", + "default_range_title": "Standard-Zeitraum", + "default_range_auto": "Auto", + "default_range_auto_hint": "3 Tage auf dem Handy, alles auf größeren Bildschirmen", + "summary_heading": "in Worten", + "summary_no_data": "Für diesen Tag liegen keine Stundenwerte vor.", + "label_sunrise": "Sonnenaufgang", + "label_sunset": "Sonnenuntergang", + "label_daylight": "Tageslicht", + "label_uv_index": "UV-Index", + "label_moonrise": "Mondaufgang", + "label_moonset": "Monduntergang", + "label_moon": "Mond", + "daylight_hours": "{hours} Std. {minutes} Min.", + "sunshine_share": "{percent}% Sonne", + "uv_low": "Niedrig", + "uv_moderate": "Mäßig", + "uv_high": "Hoch", + "uv_very_high": "Sehr hoch", + "uv_extreme": "Extrem", + "moon_new": "Neumond", + "moon_waxing_crescent": "Zunehmende Sichel", + "moon_first_quarter": "Erstes Viertel", + "moon_waxing_gibbous": "Zunehmender Mond", + "moon_full": "Vollmond", + "moon_waning_gibbous": "Abnehmender Mond", + "moon_last_quarter": "Letztes Viertel", + "moon_waning_crescent": "Abnehmende Sichel", + "cond_clear": "klar", + "cond_fair": "teils bewölkt", + "cond_cloudy": "bedeckt", + "cond_fog": "neblig", + "cond_drizzle": "nieselig", + "cond_rain": "regnerisch", + "cond_snow": "schneereich", + "cond_thunder": "stürmisch", + "period_overnight": "nachts", + "period_morning": "morgens", + "period_afternoon": "nachmittags", + "period_evening": "in den Abendstunden", + "forecast_sky_all_day": "Den ganzen Tag {condition}.", + "forecast_sky_two": "{p1} {c1}, {p2} {c2}.", + "forecast_sky_three": "{p1} {c1}, {p2} {c2}, {p3} dann {c3}.", + "forecast_temp": "Höchstwerte um {high}, nachts Abkühlung auf {low}.", + "forecast_temp_feels": "Höchstwerte um {high}, nachts Abkühlung auf {low} - gefühlt eher {feels}.", + "forecast_precip_window": "Rund {amount} Niederschlag, das meiste davon {when}.", + "forecast_precip_spread": "Rund {amount} Niederschlag über den Tag verteilt.", + "forecast_precip_chance": "Überwiegend trocken, mit bis zu {percent}% Schauerwahrscheinlichkeit.", + "forecast_precip_dry": "Es bleibt durchweg trocken.", + "forecast_wind_dir": "Wind aus {direction} mit bis zu {speed}.", + "forecast_wind_dir_gusts": "Wind aus {direction} mit bis zu {speed}, in Böen {gust}.", + "forecast_wind": "Wind mit bis zu {speed}.", + "forecast_wind_gusts": "Wind mit bis zu {speed}, in Böen {gust}.", + "forecast_uv": "UV-Index bis {value} ({label}) - mittags an Sonnenschutz denken.", + "forecast_calm": "Kaum ein Lüftchen.", + "footer_tagline": "Schnelle, unkomplizierte Wettervorhersagen auf Basis offener Daten.", + "footer_data_by": "Wetterdaten von", + "footer_forecasts": "Vorhersagen", + "footer_popular": "Beliebte Orte", + "footer_about_section": "Über", + "model_weather": "Wettermodell", + "model_ensemble": "Ensemblemodell" +} diff --git a/messages/en.json b/messages/en.json new file mode 100644 index 0000000..51c965b --- /dev/null +++ b/messages/en.json @@ -0,0 +1,126 @@ +{ + "$schema": "https://inlang.com/schema/inlang-message-format", + "nav_week": "7-Day Forecast", + "nav_compare": "Model Comparison", + "nav_14day": "14-Day Forecast", + "nav_seasonal": "Seasonal", + "nav_historical": "Historical", + "nav_maps": "Maps", + "nav_collapse": "Collapse", + "nav_expand_sidebar": "Expand sidebar", + "nav_collapse_sidebar": "Collapse sidebar", + "nav_home": "Drizzli home", + "nav_toggle_menu": "Toggle menu", + "search_placeholder": "Search location...", + "settings_title": "Settings", + "units_title": "Units", + "units_aria": "Choose measurement units", + "unit_temperature": "Temperature", + "unit_wind_speed": "Wind speed", + "unit_precipitation": "Precipitation", + "theme_label": "Theme", + "theme_system": "System", + "theme_light": "Light", + "theme_dark": "Dark", + "theme_follow_system": "Theme: follow system", + "theme_light_title": "Theme: light", + "theme_dark_title": "Theme: dark", + "language_label": "Language", + "supporter_active": "Supporter extras active", + "supporter_support": "Support Drizz.li", + "supporter_manage_key": "Manage your access key", + "supporter_unlock": "Unlock the supporter extras", + "supporter_badge": "Supporter", + "strip_past_label": "past", + "strip_past_aria": "Load the past 3 days", + "strip_days_label": "days", + "strip_extend_aria": "Show the full 15-day forecast", + "strip_history_label": "history", + "strip_history_aria": "Open the historical weather archive", + "strip_history_title": "Historical weather: any past date back to 1940", + "strip_seasonal_label": "seasonal", + "strip_seasonal_aria": "Open the seasonal outlook", + "strip_seasonal_title": "Seasonal outlook: monthly trends for the months ahead", + "day_today": "Today", + "day_tomorrow": "Tomorrow", + "day_yesterday": "Yesterday", + "page_week_subtitle": "7-day forecast", + "page_compare_subtitle": "Model comparison", + "page_14day_subtitle": "14-day ensemble forecast", + "page_seasonal_subtitle": "Seasonal outlook", + "page_historical_subtitle": "Historical weather", + "hourly_heading": "hourly", + "hourly_variables": "Variables", + "meteograms_heading": "Meteograms", + "meteograms_customize": "Customize", + "meteograms_zoom_hint": "drag or", + "meteograms_zoom_hint_end": "+ scroll to zoom", + "range_today": "Today", + "range_selected_day": "Selected day", + "range_3_days": "3 days", + "range_5_days": "5 days", + "range_all": "All", + "range_group_aria": "Chart time range", + "reset_zoom": "Reset zoom", + "default_range_title": "Default time range", + "default_range_auto": "Auto", + "default_range_auto_hint": "3 days on phones, everything on wider screens", + "summary_heading": "in words", + "summary_no_data": "No hourly detail available for this day.", + "label_sunrise": "Sunrise", + "label_sunset": "Sunset", + "label_daylight": "Daylight", + "label_uv_index": "UV index", + "label_moonrise": "Moonrise", + "label_moonset": "Moonset", + "label_moon": "Moon", + "daylight_hours": "{hours} h {minutes} m", + "sunshine_share": "{percent}% sun", + "uv_low": "Low", + "uv_moderate": "Moderate", + "uv_high": "High", + "uv_very_high": "Very high", + "uv_extreme": "Extreme", + "moon_new": "New moon", + "moon_waxing_crescent": "Waxing crescent", + "moon_first_quarter": "First quarter", + "moon_waxing_gibbous": "Waxing gibbous", + "moon_full": "Full moon", + "moon_waning_gibbous": "Waning gibbous", + "moon_last_quarter": "Last quarter", + "moon_waning_crescent": "Waning crescent", + "cond_clear": "clear", + "cond_fair": "partly cloudy", + "cond_cloudy": "overcast", + "cond_fog": "foggy", + "cond_drizzle": "drizzly", + "cond_rain": "wet", + "cond_snow": "snowy", + "cond_thunder": "stormy", + "period_overnight": "overnight", + "period_morning": "in the morning", + "period_afternoon": "in the afternoon", + "period_evening": "in the evening", + "forecast_sky_all_day": "{condition} all day.", + "forecast_sky_two": "{c1} {p1}, turning {c2} {p2}.", + "forecast_sky_three": "{c1} {p1}, turning {c2} {p2}, then {c3} {p3}.", + "forecast_temp": "Highs near {high}, dropping to {low} overnight.", + "forecast_temp_feels": "Highs near {high}, dropping to {low} overnight, though it will feel closer to {feels}.", + "forecast_precip_window": "Around {amount} of precipitation, most of it {when}.", + "forecast_precip_spread": "Around {amount} of precipitation spread across the day.", + "forecast_precip_chance": "Mostly dry, with up to a {percent}% chance of catching a shower.", + "forecast_precip_dry": "Staying dry throughout.", + "forecast_wind_dir": "Wind from the {direction} reaching {speed}.", + "forecast_wind_dir_gusts": "Wind from the {direction} reaching {speed}, with gusts to {gust}.", + "forecast_wind": "Wind reaching {speed}.", + "forecast_wind_gusts": "Wind reaching {speed}, with gusts to {gust}.", + "forecast_uv": "UV peaks at {value} ({label}), so cover up around midday.", + "forecast_calm": "Barely a breath of wind.", + "footer_tagline": "Fast, no-nonsense weather forecasts built on open data.", + "footer_data_by": "Weather data by", + "footer_forecasts": "Forecasts", + "footer_popular": "Popular locations", + "footer_about_section": "About", + "model_weather": "Weather model", + "model_ensemble": "Ensemble model" +} diff --git a/messages/es.json b/messages/es.json new file mode 100644 index 0000000..d132af2 --- /dev/null +++ b/messages/es.json @@ -0,0 +1,126 @@ +{ + "$schema": "https://inlang.com/schema/inlang-message-format", + "nav_week": "Pronóstico de 7 días", + "nav_compare": "Comparación de modelos", + "nav_14day": "Pronóstico de 14 días", + "nav_seasonal": "Estacional", + "nav_historical": "Histórico", + "nav_maps": "Mapas", + "nav_collapse": "Contraer", + "nav_expand_sidebar": "Expandir barra lateral", + "nav_collapse_sidebar": "Contraer barra lateral", + "nav_home": "Inicio de Drizzli", + "nav_toggle_menu": "Alternar menú", + "search_placeholder": "Buscar ubicación…", + "settings_title": "Ajustes", + "units_title": "Unidades", + "units_aria": "Elegir unidades de medida", + "unit_temperature": "Temperatura", + "unit_wind_speed": "Velocidad del viento", + "unit_precipitation": "Precipitación", + "theme_label": "Tema", + "theme_system": "Sistema", + "theme_light": "Claro", + "theme_dark": "Oscuro", + "theme_follow_system": "Tema: seguir al sistema", + "theme_light_title": "Tema: claro", + "theme_dark_title": "Tema: oscuro", + "language_label": "Idioma", + "supporter_active": "Extras de colaborador activos", + "supporter_support": "Apoya Drizz.li", + "supporter_manage_key": "Gestiona tu clave de acceso", + "supporter_unlock": "Desbloquea los extras de colaborador", + "supporter_badge": "Colaborador", + "strip_past_label": "antes", + "strip_past_aria": "Cargar los últimos 3 días", + "strip_days_label": "días", + "strip_extend_aria": "Ver el pronóstico completo de 15 días", + "strip_history_label": "archivo", + "strip_history_aria": "Abrir el archivo meteorológico", + "strip_history_title": "Histórico: cualquier fecha desde 1940", + "strip_seasonal_label": "estacional", + "strip_seasonal_aria": "Abrir la previsión estacional", + "strip_seasonal_title": "Previsión estacional: tendencias de los próximos meses", + "day_today": "Hoy", + "day_tomorrow": "Mañana", + "day_yesterday": "Ayer", + "page_week_subtitle": "pronóstico de 7 días", + "page_compare_subtitle": "comparación de modelos", + "page_14day_subtitle": "pronóstico de conjunto a 14 días", + "page_seasonal_subtitle": "previsión estacional", + "page_historical_subtitle": "clima histórico", + "hourly_heading": "por horas", + "hourly_variables": "Variables", + "meteograms_heading": "Meteogramas", + "meteograms_customize": "Personalizar", + "meteograms_zoom_hint": "arrastra o", + "meteograms_zoom_hint_end": "+ desplazar para ampliar", + "range_today": "Hoy", + "range_selected_day": "Día seleccionado", + "range_3_days": "3 días", + "range_5_days": "5 días", + "range_all": "Todo", + "range_group_aria": "Rango temporal del gráfico", + "reset_zoom": "Restablecer zoom", + "default_range_title": "Rango temporal predeterminado", + "default_range_auto": "Auto", + "default_range_auto_hint": "3 días en el móvil, todo en pantallas anchas", + "summary_heading": "en palabras", + "summary_no_data": "No hay datos horarios para este día.", + "label_sunrise": "Amanecer", + "label_sunset": "Atardecer", + "label_daylight": "Luz diurna", + "label_uv_index": "Índice UV", + "label_moonrise": "Salida de la luna", + "label_moonset": "Puesta de la luna", + "label_moon": "Luna", + "daylight_hours": "{hours} h {minutes} min", + "sunshine_share": "{percent}% de sol", + "uv_low": "Bajo", + "uv_moderate": "Moderado", + "uv_high": "Alto", + "uv_very_high": "Muy alto", + "uv_extreme": "Extremo", + "moon_new": "Luna nueva", + "moon_waxing_crescent": "Luna creciente", + "moon_first_quarter": "Cuarto creciente", + "moon_waxing_gibbous": "Gibosa creciente", + "moon_full": "Luna llena", + "moon_waning_gibbous": "Gibosa menguante", + "moon_last_quarter": "Cuarto menguante", + "moon_waning_crescent": "Luna menguante", + "cond_clear": "despejado", + "cond_fair": "parcialmente nublado", + "cond_cloudy": "nublado", + "cond_fog": "con niebla", + "cond_drizzle": "con llovizna", + "cond_rain": "lluvioso", + "cond_snow": "con nieve", + "cond_thunder": "tormentoso", + "period_overnight": "por la noche", + "period_morning": "por la mañana", + "period_afternoon": "por la tarde", + "period_evening": "al anochecer", + "forecast_sky_all_day": "{condition} todo el día.", + "forecast_sky_two": "{c1} {p1} y {c2} {p2}.", + "forecast_sky_three": "{c1} {p1}, {c2} {p2} y {c3} {p3}.", + "forecast_temp": "Máximas de {high} y mínimas de {low} por la noche.", + "forecast_temp_feels": "Máximas de {high} y mínimas de {low} por la noche, aunque la sensación será de {feels}.", + "forecast_precip_window": "Unos {amount} de precipitación, sobre todo {when}.", + "forecast_precip_spread": "Unos {amount} de precipitación repartidos a lo largo del día.", + "forecast_precip_chance": "Mayormente seco, con hasta un {percent}% de probabilidad de chubascos.", + "forecast_precip_dry": "Se mantendrá seco todo el día.", + "forecast_wind_dir": "Viento del {direction} de hasta {speed}.", + "forecast_wind_dir_gusts": "Viento del {direction} de hasta {speed}, con rachas de {gust}.", + "forecast_wind": "Viento de hasta {speed}.", + "forecast_wind_gusts": "Viento de hasta {speed}, con rachas de {gust}.", + "forecast_uv": "El índice UV llega a {value} ({label}), así que protégete al mediodía.", + "forecast_calm": "Apenas hay viento.", + "footer_tagline": "Pronósticos rápidos y directos basados en datos abiertos.", + "footer_data_by": "Datos meteorológicos de", + "footer_forecasts": "Pronósticos", + "footer_popular": "Ubicaciones populares", + "footer_about_section": "Acerca de", + "model_weather": "Modelo meteorológico", + "model_ensemble": "Modelo de conjunto" +} diff --git a/messages/fr.json b/messages/fr.json new file mode 100644 index 0000000..e38b872 --- /dev/null +++ b/messages/fr.json @@ -0,0 +1,126 @@ +{ + "$schema": "https://inlang.com/schema/inlang-message-format", + "nav_week": "Prévisions à 7 jours", + "nav_compare": "Comparaison des modèles", + "nav_14day": "Prévisions à 14 jours", + "nav_seasonal": "Saisonnier", + "nav_historical": "Historique", + "nav_maps": "Cartes", + "nav_collapse": "Réduire", + "nav_expand_sidebar": "Déployer la barre latérale", + "nav_collapse_sidebar": "Réduire la barre latérale", + "nav_home": "Accueil Drizzli", + "nav_toggle_menu": "Basculer le menu", + "search_placeholder": "Rechercher un lieu…", + "settings_title": "Paramètres", + "units_title": "Unités", + "units_aria": "Choisir les unités de mesure", + "unit_temperature": "Température", + "unit_wind_speed": "Vitesse du vent", + "unit_precipitation": "Précipitations", + "theme_label": "Thème", + "theme_system": "Système", + "theme_light": "Clair", + "theme_dark": "Sombre", + "theme_follow_system": "Thème : suivre le système", + "theme_light_title": "Thème : clair", + "theme_dark_title": "Thème : sombre", + "language_label": "Langue", + "supporter_active": "Bonus contributeur actifs", + "supporter_support": "Soutenir Drizz.li", + "supporter_manage_key": "Gérer votre clé d'accès", + "supporter_unlock": "Débloquer les bonus contributeur", + "supporter_badge": "Contributeur", + "strip_past_label": "avant", + "strip_past_aria": "Charger les 3 derniers jours", + "strip_days_label": "jours", + "strip_extend_aria": "Afficher les 15 jours complets", + "strip_history_label": "archives", + "strip_history_aria": "Ouvrir les archives météo", + "strip_history_title": "Historique : toute date depuis 1940", + "strip_seasonal_label": "saisonnier", + "strip_seasonal_aria": "Ouvrir les tendances saisonnières", + "strip_seasonal_title": "Tendances saisonnières : les mois à venir", + "day_today": "Aujourd'hui", + "day_tomorrow": "Demain", + "day_yesterday": "Hier", + "page_week_subtitle": "prévisions à 7 jours", + "page_compare_subtitle": "comparaison des modèles", + "page_14day_subtitle": "prévision d'ensemble à 14 jours", + "page_seasonal_subtitle": "tendances saisonnières", + "page_historical_subtitle": "météo historique", + "hourly_heading": "par heure", + "hourly_variables": "Variables", + "meteograms_heading": "Météogrammes", + "meteograms_customize": "Personnaliser", + "meteograms_zoom_hint": "glissez ou", + "meteograms_zoom_hint_end": "+ défiler pour zoomer", + "range_today": "Aujourd'hui", + "range_selected_day": "Jour sélectionné", + "range_3_days": "3 jours", + "range_5_days": "5 jours", + "range_all": "Tout", + "range_group_aria": "Plage horaire du graphique", + "reset_zoom": "Réinitialiser le zoom", + "default_range_title": "Plage horaire par défaut", + "default_range_auto": "Auto", + "default_range_auto_hint": "3 jours sur mobile, tout sur grand écran", + "summary_heading": "en résumé", + "summary_no_data": "Aucun détail horaire pour ce jour.", + "label_sunrise": "Lever du soleil", + "label_sunset": "Coucher du soleil", + "label_daylight": "Durée du jour", + "label_uv_index": "Indice UV", + "label_moonrise": "Lever de la lune", + "label_moonset": "Coucher de la lune", + "label_moon": "Lune", + "daylight_hours": "{hours} h {minutes} min", + "sunshine_share": "{percent}% de soleil", + "uv_low": "Faible", + "uv_moderate": "Modéré", + "uv_high": "Élevé", + "uv_very_high": "Très élevé", + "uv_extreme": "Extrême", + "moon_new": "Nouvelle lune", + "moon_waxing_crescent": "Premier croissant", + "moon_first_quarter": "Premier quartier", + "moon_waxing_gibbous": "Gibbeuse croissante", + "moon_full": "Pleine lune", + "moon_waning_gibbous": "Gibbeuse décroissante", + "moon_last_quarter": "Dernier quartier", + "moon_waning_crescent": "Dernier croissant", + "cond_clear": "dégagé", + "cond_fair": "partiellement nuageux", + "cond_cloudy": "couvert", + "cond_fog": "brumeux", + "cond_drizzle": "bruineux", + "cond_rain": "pluvieux", + "cond_snow": "neigeux", + "cond_thunder": "orageux", + "period_overnight": "la nuit", + "period_morning": "le matin", + "period_afternoon": "l'après-midi", + "period_evening": "en soirée", + "forecast_sky_all_day": "{condition} toute la journée.", + "forecast_sky_two": "{c1} {p1}, puis {c2} {p2}.", + "forecast_sky_three": "{c1} {p1}, puis {c2} {p2} et enfin {c3} {p3}.", + "forecast_temp": "Maximales proches de {high}, minimales de {low} la nuit.", + "forecast_temp_feels": "Maximales proches de {high}, minimales de {low} la nuit, mais ressenti plutôt {feels}.", + "forecast_precip_window": "Environ {amount} de précipitations, surtout {when}.", + "forecast_precip_spread": "Environ {amount} de précipitations réparties sur la journée.", + "forecast_precip_chance": "Temps plutôt sec, avec jusqu'à {percent}% de risque d'averse.", + "forecast_precip_dry": "Le temps reste sec toute la journée.", + "forecast_wind_dir": "Vent de {direction} atteignant {speed}.", + "forecast_wind_dir_gusts": "Vent de {direction} atteignant {speed}, avec des rafales à {gust}.", + "forecast_wind": "Vent atteignant {speed}.", + "forecast_wind_gusts": "Vent atteignant {speed}, avec des rafales à {gust}.", + "forecast_uv": "Indice UV jusqu'à {value} ({label}) : protégez-vous en milieu de journée.", + "forecast_calm": "Pratiquement pas de vent.", + "footer_tagline": "Des prévisions météo rapides et sans fioritures, basées sur des données ouvertes.", + "footer_data_by": "Données météo par", + "footer_forecasts": "Prévisions", + "footer_popular": "Lieux populaires", + "footer_about_section": "À propos", + "model_weather": "Modèle météo", + "model_ensemble": "Modèle d'ensemble" +} diff --git a/messages/it.json b/messages/it.json new file mode 100644 index 0000000..5c67ad5 --- /dev/null +++ b/messages/it.json @@ -0,0 +1,126 @@ +{ + "$schema": "https://inlang.com/schema/inlang-message-format", + "nav_week": "Previsioni a 7 giorni", + "nav_compare": "Confronto modelli", + "nav_14day": "Previsioni a 14 giorni", + "nav_seasonal": "Stagionale", + "nav_historical": "Storico", + "nav_maps": "Mappe", + "nav_collapse": "Comprimi", + "nav_expand_sidebar": "Espandi barra laterale", + "nav_collapse_sidebar": "Comprimi barra laterale", + "nav_home": "Home di Drizzli", + "nav_toggle_menu": "Attiva/disattiva menu", + "search_placeholder": "Cerca una località…", + "settings_title": "Impostazioni", + "units_title": "Unità", + "units_aria": "Scegli le unità di misura", + "unit_temperature": "Temperatura", + "unit_wind_speed": "Velocità del vento", + "unit_precipitation": "Precipitazioni", + "theme_label": "Tema", + "theme_system": "Sistema", + "theme_light": "Chiaro", + "theme_dark": "Scuro", + "theme_follow_system": "Tema: segui il sistema", + "theme_light_title": "Tema: chiaro", + "theme_dark_title": "Tema: scuro", + "language_label": "Lingua", + "supporter_active": "Extra sostenitore attivi", + "supporter_support": "Sostieni Drizz.li", + "supporter_manage_key": "Gestisci la tua chiave di accesso", + "supporter_unlock": "Sblocca gli extra sostenitore", + "supporter_badge": "Sostenitore", + "strip_past_label": "prima", + "strip_past_aria": "Carica gli ultimi 3 giorni", + "strip_days_label": "giorni", + "strip_extend_aria": "Mostra le previsioni complete a 15 giorni", + "strip_history_label": "archivio", + "strip_history_aria": "Apri l'archivio meteo", + "strip_history_title": "Storico: qualsiasi data dal 1940", + "strip_seasonal_label": "stagionale", + "strip_seasonal_aria": "Apri le tendenze stagionali", + "strip_seasonal_title": "Tendenze stagionali: i prossimi mesi", + "day_today": "Oggi", + "day_tomorrow": "Domani", + "day_yesterday": "Ieri", + "page_week_subtitle": "previsioni a 7 giorni", + "page_compare_subtitle": "confronto modelli", + "page_14day_subtitle": "previsione d'insieme a 14 giorni", + "page_seasonal_subtitle": "tendenze stagionali", + "page_historical_subtitle": "meteo storico", + "hourly_heading": "orario", + "hourly_variables": "Variabili", + "meteograms_heading": "Meteogrammi", + "meteograms_customize": "Personalizza", + "meteograms_zoom_hint": "trascina o", + "meteograms_zoom_hint_end": "+ scorri per ingrandire", + "range_today": "Oggi", + "range_selected_day": "Giorno selezionato", + "range_3_days": "3 giorni", + "range_5_days": "5 giorni", + "range_all": "Tutto", + "range_group_aria": "Intervallo temporale del grafico", + "reset_zoom": "Reimposta zoom", + "default_range_title": "Intervallo temporale predefinito", + "default_range_auto": "Auto", + "default_range_auto_hint": "3 giorni su cellulare, tutto su schermi ampi", + "summary_heading": "in parole", + "summary_no_data": "Nessun dato orario per questo giorno.", + "label_sunrise": "Alba", + "label_sunset": "Tramonto", + "label_daylight": "Ore di luce", + "label_uv_index": "Indice UV", + "label_moonrise": "Sorgere della luna", + "label_moonset": "Tramonto della luna", + "label_moon": "Luna", + "daylight_hours": "{hours} h {minutes} min", + "sunshine_share": "{percent}% di sole", + "uv_low": "Basso", + "uv_moderate": "Moderato", + "uv_high": "Alto", + "uv_very_high": "Molto alto", + "uv_extreme": "Estremo", + "moon_new": "Luna nuova", + "moon_waxing_crescent": "Luna crescente", + "moon_first_quarter": "Primo quarto", + "moon_waxing_gibbous": "Gibbosa crescente", + "moon_full": "Luna piena", + "moon_waning_gibbous": "Gibbosa calante", + "moon_last_quarter": "Ultimo quarto", + "moon_waning_crescent": "Luna calante", + "cond_clear": "sereno", + "cond_fair": "parzialmente nuvoloso", + "cond_cloudy": "coperto", + "cond_fog": "nebbioso", + "cond_drizzle": "con pioviggine", + "cond_rain": "piovoso", + "cond_snow": "nevoso", + "cond_thunder": "temporalesco", + "period_overnight": "durante la notte", + "period_morning": "al mattino", + "period_afternoon": "nel pomeriggio", + "period_evening": "in serata", + "forecast_sky_all_day": "{condition} per tutta la giornata.", + "forecast_sky_two": "{c1} {p1}, poi {c2} {p2}.", + "forecast_sky_three": "{c1} {p1}, poi {c2} {p2} e infine {c3} {p3}.", + "forecast_temp": "Massime intorno a {high} e minime di {low} durante la notte.", + "forecast_temp_feels": "Massime intorno a {high} e minime di {low} durante la notte, ma con una percezione di {feels}.", + "forecast_precip_window": "Circa {amount} di precipitazioni, soprattutto {when}.", + "forecast_precip_spread": "Circa {amount} di precipitazioni distribuite nell'arco della giornata.", + "forecast_precip_chance": "Perlopiù asciutto, con una probabilità di rovesci fino al {percent}%.", + "forecast_precip_dry": "Resterà asciutto tutto il giorno.", + "forecast_wind_dir": "Vento da {direction} fino a {speed}.", + "forecast_wind_dir_gusts": "Vento da {direction} fino a {speed}, con raffiche a {gust}.", + "forecast_wind": "Vento fino a {speed}.", + "forecast_wind_gusts": "Vento fino a {speed}, con raffiche a {gust}.", + "forecast_uv": "Indice UV fino a {value} ({label}): proteggiti a metà giornata.", + "forecast_calm": "Quasi assenza di vento.", + "footer_tagline": "Previsioni meteo rapide e senza fronzoli, basate su dati aperti.", + "footer_data_by": "Dati meteo da", + "footer_forecasts": "Previsioni", + "footer_popular": "Località popolari", + "footer_about_section": "Informazioni", + "model_weather": "Modello meteo", + "model_ensemble": "Modello d'insieme" +} diff --git a/package-lock.json b/package-lock.json index 8d198af..3bca1ea 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,6 +10,7 @@ "devDependencies": { "@eslint/compat": "^2.1.0", "@eslint/js": "^10.0.1", + "@inlang/paraglide-js": "^2.23.0", "@internationalized/date": "^3.12.2", "@lucide/svelte": "^1.25.0", "@sveltejs/adapter-static": "^3.0.10", @@ -495,6 +496,64 @@ "url": "https://github.com/sponsors/nzakas" } }, + "node_modules/@inlang/paraglide-js": { + "version": "2.23.0", + "resolved": "https://registry.npmjs.org/@inlang/paraglide-js/-/paraglide-js-2.23.0.tgz", + "integrity": "sha512-q+FQisRAVQqyD+0fdVHPkC7UDfaXENUJqUjim7XGEzWHE6vVMUOO10MFtAOKx5VYAgi8o7rLwe4zjzesCY0Anw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@inlang/recommend-sherlock": "^0.2.1", + "@inlang/sdk": "^2.10.0", + "commander": "11.1.0", + "consola": "3.4.0", + "json5": "2.2.3", + "unplugin": "^2.1.2", + "urlpattern-polyfill": "^10.0.0" + }, + "bin": { + "paraglide-js": "bin/run.js" + }, + "peerDependencies": { + "typescript": ">=5.6", + "vite": ">=5.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + }, + "vite": { + "optional": true + } + } + }, + "node_modules/@inlang/recommend-sherlock": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/@inlang/recommend-sherlock/-/recommend-sherlock-0.2.1.tgz", + "integrity": "sha512-ckv8HvHy/iTqaVAEKrr+gnl+p3XFNwe5D2+6w6wJk2ORV2XkcRkKOJ/XsTUJbPSiyi4PI+p+T3bqbmNx/rDUlg==", + "dev": true, + "license": "MIT", + "dependencies": { + "comment-json": "^4.2.3" + } + }, + "node_modules/@inlang/sdk": { + "version": "2.10.2", + "resolved": "https://registry.npmjs.org/@inlang/sdk/-/sdk-2.10.2.tgz", + "integrity": "sha512-O1ki72SNK6LPagaGrvlioBb1mWKvump7cO7P85hfGZjdFTmDdn3icI0A6MvaBsB3P9KQHAjzyubnN1OslGufTw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@lix-js/sdk": "0.4.10", + "@sinclair/typebox": "^0.31.17", + "kysely": "^0.28.12", + "sqlite-wasm-kysely": "0.3.0", + "uuid": "^14.0.0" + }, + "engines": { + "node": ">=20.0.0" + } + }, "node_modules/@internationalized/date": { "version": "3.12.2", "resolved": "https://registry.npmjs.org/@internationalized/date/-/date-3.12.2.tgz", @@ -555,6 +614,32 @@ "@jridgewell/sourcemap-codec": "^1.4.14" } }, + "node_modules/@lix-js/sdk": { + "version": "0.4.10", + "resolved": "https://registry.npmjs.org/@lix-js/sdk/-/sdk-0.4.10.tgz", + "integrity": "sha512-0dMInAJK/67guTG5rRZaCEhvzC5cCXENOjaePA5AqMXrCE97kaY7SRor9e2vnoGsFIiGqXKlT0MCIoZj36G0gg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@lix-js/server-protocol-schema": "0.1.1", + "dedent": "1.5.1", + "human-id": "^4.1.1", + "js-sha256": "^0.11.0", + "kysely": "^0.28.12", + "sqlite-wasm-kysely": "0.3.0", + "uuid": "^14.0.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@lix-js/server-protocol-schema": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@lix-js/server-protocol-schema/-/server-protocol-schema-0.1.1.tgz", + "integrity": "sha512-jBeALB6prAbtr5q4vTuxnRZZv1M2rKe8iNqRQhFJ4Tv7150unEa0vKyz0hs8Gl3fUGsWaNJBh3J8++fpbrpRBQ==", + "dev": true, + "license": "Apache-2.0" + }, "node_modules/@lucide/svelte": { "version": "1.25.0", "resolved": "https://registry.npmjs.org/@lucide/svelte/-/svelte-1.25.0.tgz", @@ -896,6 +981,23 @@ "dev": true, "license": "MIT" }, + "node_modules/@sinclair/typebox": { + "version": "0.31.30", + "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.31.30.tgz", + "integrity": "sha512-MGsM7bVmHg3sUKCphlu3SGQ+T+5JTbygZWYArfKQCW5anJeACHeqLhcnf+R7XlCWZ+QR3C8JTBx3kCKJTN69ow==", + "dev": true, + "license": "MIT" + }, + "node_modules/@sqlite.org/sqlite-wasm": { + "version": "3.48.0-build4", + "resolved": "https://registry.npmjs.org/@sqlite.org/sqlite-wasm/-/sqlite-wasm-3.48.0-build4.tgz", + "integrity": "sha512-hI6twvUkzOmyGZhQMza1gpfqErZxXRw6JEsiVjUbo7tFanVD+8Oil0Ih3l2nGzHdxPI41zFmfUQG7GHqhciKZQ==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "sqlite-wasm": "bin/index.js" + } + }, "node_modules/@standard-schema/spec": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@standard-schema/spec/-/spec-1.1.0.tgz", @@ -1896,6 +1998,13 @@ "node": ">= 0.4" } }, + "node_modules/array-timsort": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/array-timsort/-/array-timsort-1.0.3.tgz", + "integrity": "sha512-/+3GRL7dDAGEfM6TseQk/U+mi18TU2Ms9I3UlLdUMhz2hbvGNTKdj9xniwXfUqgYhHxRx0+8UnKkvlNwVU+cWQ==", + "dev": true, + "license": "MIT" + }, "node_modules/assertion-error": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-2.0.1.tgz", @@ -1994,6 +2103,40 @@ "node": ">=6" } }, + "node_modules/commander": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-11.1.0.tgz", + "integrity": "sha512-yPVavfyCcRhmorC7rWlkHn15b4wDVgVmBA7kV4QVBsF7kv/9TKJAbAXVTxvTnwP8HHKjRCJDClKbciiYS7p0DQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=16" + } + }, + "node_modules/comment-json": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/comment-json/-/comment-json-4.6.2.tgz", + "integrity": "sha512-R2rze/hDX30uul4NZoIZ76ImSJLFxn/1/ZxtKC1L77y2X1k+yYu1joKbAtMA2Fg3hZrTOiw0I5mwVMo0cf250w==", + "dev": true, + "license": "MIT", + "dependencies": { + "array-timsort": "^1.0.3", + "esprima": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/consola": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/consola/-/consola-3.4.0.tgz", + "integrity": "sha512-EiPU8G6dQG0GFHNR8ljnZFki/8a+cQwEQ+7wpxdChl02Q8HXlwEZWD5lqAF8vC2sEC3Tehr8hy7vErz88LHyUA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^14.18.0 || >=16.10.0" + } + }, "node_modules/convert-source-map": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", @@ -2078,6 +2221,21 @@ } } }, + "node_modules/dedent": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/dedent/-/dedent-1.5.1.tgz", + "integrity": "sha512-+LxW+KLWxu3HW3M2w2ympwtqPrqYRzU8fqi6Fhd18fBALe15blJPI/I4+UHveMVG6lJqB4JNd4UG0S5cnVHwIg==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "babel-plugin-macros": "^3.1.0" + }, + "peerDependenciesMeta": { + "babel-plugin-macros": { + "optional": true + } + } + }, "node_modules/deep-is": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", @@ -2374,6 +2532,20 @@ "url": "https://opencollective.com/eslint" } }, + "node_modules/esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true, + "license": "BSD-2-Clause", + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/esquery": { "version": "1.7.0", "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.7.0.tgz", @@ -2603,6 +2775,16 @@ "dev": true, "license": "ISC" }, + "node_modules/human-id": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/human-id/-/human-id-4.2.0.tgz", + "integrity": "sha512-K3GbkIWqyvvlpfhBPlbEvD97TtqBpAYA4kt+cn2lD2x2HuohzZCibcA2nOlnJT6exqvJLggoB5nv2dNf192nEA==", + "dev": true, + "license": "MIT", + "bin": { + "human-id": "dist/cli.js" + } + }, "node_modules/ignore": { "version": "5.3.2", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", @@ -2687,6 +2869,13 @@ "jiti": "lib/jiti-cli.mjs" } }, + "node_modules/js-sha256": { + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/js-sha256/-/js-sha256-0.11.1.tgz", + "integrity": "sha512-o6WSo/LUvY2uC4j7mO50a2ms7E/EAdbP0swigLV+nzHKTTaYnaLIWJ02VdXrsJX0vGedDESQnLsOekr94ryfjg==", + "dev": true, + "license": "MIT" + }, "node_modules/js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", @@ -2728,6 +2917,19 @@ "dev": true, "license": "MIT" }, + "node_modules/json5": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", + "dev": true, + "license": "MIT", + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, "node_modules/keyv": { "version": "4.5.4", "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", @@ -2755,6 +2957,16 @@ "dev": true, "license": "MIT" }, + "node_modules/kysely": { + "version": "0.28.17", + "resolved": "https://registry.npmjs.org/kysely/-/kysely-0.28.17.tgz", + "integrity": "sha512-nbD8lB9EB3wNdMhOCdx5Li8DxnLbvKByylRLcJ1h+4SkrowVeECAyZlyiKMThF7xFdRz0jSQ2MoJr+wXux2y0Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=20.0.0" + } + }, "node_modules/levn": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", @@ -3779,6 +3991,18 @@ "node": ">=0.10.0" } }, + "node_modules/sqlite-wasm-kysely": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/sqlite-wasm-kysely/-/sqlite-wasm-kysely-0.3.0.tgz", + "integrity": "sha512-TzjBNv7KwRw6E3pdKdlRyZiTmUIE0UttT/Sl56MVwVARl/u5gp978KepazCJZewFUnlWHz9i3NQd4kOtP/Afdg==", + "dev": true, + "dependencies": { + "@sqlite.org/sqlite-wasm": "^3.48.0-build2" + }, + "peerDependencies": { + "kysely": "*" + } + }, "node_modules/stackback": { "version": "0.0.2", "resolved": "https://registry.npmjs.org/stackback/-/stackback-0.0.2.tgz", @@ -4170,6 +4394,22 @@ "dev": true, "license": "MIT" }, + "node_modules/unplugin": { + "version": "2.3.11", + "resolved": "https://registry.npmjs.org/unplugin/-/unplugin-2.3.11.tgz", + "integrity": "sha512-5uKD0nqiYVzlmCRs01Fhs2BdkEgBS3SAVP6ndrBsuK42iC2+JHyxM05Rm9G8+5mkmRtzMZGY8Ct5+mliZxU/Ww==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/remapping": "^2.3.5", + "acorn": "^8.15.0", + "picomatch": "^4.0.3", + "webpack-virtual-modules": "^0.6.2" + }, + "engines": { + "node": ">=18.12.0" + } + }, "node_modules/uri-js": { "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", @@ -4180,6 +4420,13 @@ "punycode": "^2.1.0" } }, + "node_modules/urlpattern-polyfill": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/urlpattern-polyfill/-/urlpattern-polyfill-10.1.0.tgz", + "integrity": "sha512-IGjKp/o0NL3Bso1PymYURCJxMPNAf/ILOpendP9f5B6e1rTJgdgiOvgfoT8VxCAdY+Wisb9uhGaJJf3yZ2V9nw==", + "dev": true, + "license": "MIT" + }, "node_modules/util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", @@ -4187,6 +4434,20 @@ "dev": true, "license": "MIT" }, + "node_modules/uuid": { + "version": "14.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-14.0.1.tgz", + "integrity": "sha512-6ZxzVpzDXDa3bJWaHilVayA+BH/1zmxCJoVgvmqJnid/gPoKHxUrS/aC/T6LGQtNHT+XHG9fXPJB4d+IrU30Ew==", + "dev": true, + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], + "license": "MIT", + "bin": { + "uuid": "dist-node/bin/uuid" + } + }, "node_modules/vite": { "version": "8.1.5", "resolved": "https://registry.npmjs.org/vite/-/vite-8.1.5.tgz", @@ -4407,6 +4668,13 @@ "vitest": "^4.0.0" } }, + "node_modules/webpack-virtual-modules": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/webpack-virtual-modules/-/webpack-virtual-modules-0.6.2.tgz", + "integrity": "sha512-66/V2i5hQanC51vBQKPH4aI8NMAcBW59FVBs+rC7eGHupMyfn34q7rZIE+ETlJ+XTevqfUhVVBgSUNSW2flEUQ==", + "dev": true, + "license": "MIT" + }, "node_modules/which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", diff --git a/package.json b/package.json index 6b88f34..4761af7 100644 --- a/package.json +++ b/package.json @@ -19,6 +19,7 @@ "devDependencies": { "@eslint/compat": "^2.1.0", "@eslint/js": "^10.0.1", + "@inlang/paraglide-js": "^2.23.0", "@internationalized/date": "^3.12.2", "@lucide/svelte": "^1.25.0", "@sveltejs/adapter-static": "^3.0.10", diff --git a/project.inlang/settings.json b/project.inlang/settings.json new file mode 100644 index 0000000..82e906d --- /dev/null +++ b/project.inlang/settings.json @@ -0,0 +1,12 @@ +{ + "$schema": "https://inlang.com/schema/project-settings", + "baseLocale": "en", + "locales": ["en", "de", "es", "fr", "it"], + "modules": [ + "https://cdn.jsdelivr.net/npm/@inlang/plugin-message-format@4.4.0/dist/index.js", + "https://cdn.jsdelivr.net/npm/@inlang/plugin-m-function-matcher@2.2.6/dist/index.js" + ], + "plugin.inlang.messageFormat": { + "pathPattern": "./messages/{locale}.json" + } +} diff --git a/src/app.html b/src/app.html index 5ec0a50..cb618ef 100644 --- a/src/app.html +++ b/src/app.html @@ -1,5 +1,5 @@ - +
diff --git a/src/hooks.server.ts b/src/hooks.server.ts new file mode 100644 index 0000000..58614fc --- /dev/null +++ b/src/hooks.server.ts @@ -0,0 +1,16 @@ +import { paraglideMiddleware } from '$lib/paraglide/server'; + +import type { Handle } from '@sveltejs/kit'; + +/** + * Runs for every prerendered page, so the HTML written to disk is already in the + * right language and carries a matching `` - the client never has to + * repaint the page into its locale. + */ +export const handle: Handle = ({ event, resolve }) => + paraglideMiddleware(event.request, ({ request, locale }) => { + event.request = request; + return resolve(event, { + transformPageChunk: ({ html }) => html.replace('%paraglide.lang%', locale) + }); + }); diff --git a/src/hooks.ts b/src/hooks.ts new file mode 100644 index 0000000..056a22e --- /dev/null +++ b/src/hooks.ts @@ -0,0 +1,10 @@ +import { deLocalizeUrl } from '$lib/paraglide/runtime'; + +import type { Reroute } from '@sveltejs/kit'; + +/** + * The locale lives in the URL (`/de/weather/week/`), but the routes on disk are + * language-neutral. Stripping the prefix here lets one route tree serve every + * language - on the server, during prerendering and on client-side navigation. + */ +export const reroute: Reroute = (request) => deLocalizeUrl(request.url).pathname; diff --git a/src/lib/components/language-options.svelte b/src/lib/components/language-options.svelte new file mode 100644 index 0000000..578251b --- /dev/null +++ b/src/lib/components/language-options.svelte @@ -0,0 +1,53 @@ + + +