Make weather data fully French for better localization

Update weather service to include French language parameter in API requests and remove unused translation logic from the frontend.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: d43bd811-9372-45a7-8ac9-4a954c0538e1
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/d43bd811-9372-45a7-8ac9-4a954c0538e1/oizLDz5
This commit is contained in:
michaelschal committed 2025-08-15 08:37:55 +00:00
1 parent ea3eeafea8
commit 60efc7ef88
4 files changed
+39 -265

No files matched your search

+2 -2
View File
@@ -23,7 +23,7 @@ export class WeatherService {
*/
async fetchCurrentWeather(settings: WeatherSettings): Promise<WeatherApiResponse | null> {
try {
const url = `${this.baseUrl}/${encodeURIComponent(settings.location)}?unitGroup=metric&include=days&key=${settings.apiKey}&contentType=json`;
const url = `${this.baseUrl}/${encodeURIComponent(settings.location)}?unitGroup=metric&include=days&key=${settings.apiKey}&contentType=json&lang=fr`;
const response = await fetch(url);
if (!response.ok) {
@@ -45,7 +45,7 @@ export class WeatherService {
async fetchPreviousYearWeather(settings: WeatherSettings, targetDate: string): Promise<WeatherApiResponse | null> {
try {
// Pour les données historiques, Visual Crossing utilise la syntaxe: /timeline/location/date
const url = `${this.baseUrl}/${encodeURIComponent(settings.location)}/${targetDate}?unitGroup=metric&include=days&key=${settings.apiKey}&contentType=json`;
const url = `${this.baseUrl}/${encodeURIComponent(settings.location)}/${targetDate}?unitGroup=metric&include=days&key=${settings.apiKey}&contentType=json&lang=fr`;
console.log(`🌤️ [FETCH-HISTORY] Requesting: ${settings.location} for ${targetDate}`);