const fs = require('fs'); function updateLocale(file, lang) { const content = fs.readFileSync(file, 'utf8'); const data = JSON.parse(content); if (lang === 'fr') { data.ai.clarifyDesc = "Rendre le propos plus clair et compréhensible"; data.ai.shortenDesc = "Résumer le texte et aller à l'essentiel"; data.ai.improve = "Améliorer la rédaction"; data.ai.improveDesc = "Corriger les fautes et le style"; data.ai.toMarkdown = "Formater en Markdown"; data.ai.toMarkdownDesc = "Ajouter des titres, des puces et structurer le texte"; } else if (lang === 'en') { data.ai.clarifyDesc = "Make the text clearer and easier to understand"; data.ai.shortenDesc = "Summarize the text and get to the point"; data.ai.improve = "Improve writing"; data.ai.improveDesc = "Fix grammar and enhance style"; data.ai.toMarkdown = "Format as Markdown"; data.ai.toMarkdownDesc = "Add headings, bullet points and structure the text"; } fs.writeFileSync(file, JSON.stringify(data, null, 2)); } updateLocale('./locales/fr.json', 'fr'); updateLocale('./locales/en.json', 'en');