// The whole map, and a deliberate ceiling: these are the only three notifications the server // composes itself, and only the languages someone has actually written copy for. Everything else // — and every unrecognised or missing `lang` — falls back to English (see copyFor). const COPY = { en: { restTitle: 'Rest over 💪', restBody: 'Time for your next set.', testBody: 'Test notification ✅ — this is what alerts look like.', dayFallbackTitle: 'Workout planned today', dayRoutineSuffix: 'today', dayBody: "It's on your plan — let's go 💪", }, // Spanish is this fork's default UI language, so an instance that never sets `lang` — and every // profile set to Spanish — gets these rather than the English ones. es: { restTitle: 'Descanso terminado 💪', restBody: 'Toca la siguiente serie.', testBody: 'Notificación de prueba ✅ — así se ven los avisos.', dayFallbackTitle: 'Entreno planificado para hoy', dayRoutineSuffix: 'hoy', dayBody: 'Está en tu plan — ¡vamos! 💪', }, 'pt-BR': { restTitle: 'Descanso terminado 💪', restBody: 'Hora da próxima série.', testBody: 'Notificação de teste ✅ — é assim que os alertas aparecem.', dayFallbackTitle: 'Treino planejado para hoje', dayRoutineSuffix: 'hoje', dayBody: 'Está no seu plano — vamos treinar 💪', }, }; const copyFor = lang => COPY[lang] || COPY.en; export function restTimerPush(lang) { const copy = copyFor(lang); return { title: copy.restTitle, body: copy.restBody, tag: 'rest-timer' }; } export function testPush(lang) { return { title: 'KuentaGYM', body: copyFor(lang).testBody, tag: 'test' }; } export function dayReminderPush(lang, routine) { const copy = copyFor(lang); return { title: routine ? `${routine.emoji || '🏋️'} ${routine.name} ${copy.dayRoutineSuffix}` : copy.dayFallbackTitle, body: copy.dayBody, tag: 'day-reminder', }; }