const fs = require('fs');

const langs = [
  { code: 'fr', text: 'Prêt à tout casser aujourd\'hui ?' },
  { code: 'es', text: '¿Listo para arrasar hoy?' },
  { code: 'de', text: 'Bereit, heute alles zu geben?' }
];

langs.forEach(({ code, text }) => {
  const path = `src/shared/i18n/locales/${code}/screens.json`;
  if (fs.existsSync(path)) {
    let content = fs.readFileSync(path, 'utf8');
    content = content.replace(
      /"home":\s*\{/,
      `"home": {\n    "readyToCrush": "${text}",`
    );
    fs.writeFileSync(path, content);
    console.log(`Updated ${code}`);
  }
});
