Skip to content

Open-source gym & body-weight tracker, now in the App Store (iPhone + Apple Watch) and as an Android APK. Plan routines, log workouts, see which muscles are trained, import from Strong/Hevy/FitNotes. Self-host it or use it on the phone alone.

Missed-workout nudge: one playful push on the evening of a skipped planned day

Duarte Santosc3d90f21105e
diff --git a/api/Dockerfile b/api/Dockerfile
index 80b90f296..ee08dc032 100644
--- a/api/Dockerfile
+++ b/api/Dockerfile
@@ -53,7 +53,7 @@ RUN npm ci --omit=dev --omit=optional && npm cache clean --force
# Every module server.js imports from the api root has to be named here: the image carries nothing
# else, and one that is missing only shows at boot, as ERR_MODULE_NOT_FOUND.
-COPY server.js push-messages.js verify-error.js password.js rate-limit.js passkeys-store.js device-link.js media.js queue.js ./
+COPY server.js push-messages.js nudge.js nudge-copy.js verify-error.js password.js rate-limit.js passkeys-store.js device-link.js media.js queue.js ./
COPY coach ./coach
ENV NODE_ENV=production
ENV PORT=3000
diff --git a/api/nudge-copy.js b/api/nudge-copy.js
new file mode 100644
index 000000000..3b7daf226
--- /dev/null
+++ b/api/nudge-copy.js
@@ -0,0 +1,526 @@
+// GENERATED by scripts/build-nudge-copy.mjs from frontend/src/lib/nudge.js and frontend/src/locales.
+// Do not edit by hand: change the frontend strings and run the script again.
+export const NUDGE_COPY = {
+ "en": {
+ "friendly": {
+ "title": "Everything okay?",
+ "lines": [
+ "{0} is still waiting. What’s up?",
+ "No {0} today? Even a short session tomorrow counts.",
+ "Rough day? {0} will keep. Tomorrow is a fresh start.",
+ "Hey, {0} didn’t happen today. All good?"
+ ]
+ },
+ "guilt": {
+ "title": "I miss you",
+ "lines": [
+ "{0} waited by the door all evening. For you.",
+ "The barbell asked about you today. I didn’t know what to say.",
+ "Was it something I said? {0} misses you.",
+ "I saved you a spot on the bench. It’s still empty."
+ ]
+ },
+ "drill": {
+ "title": "Attention, recruit!",
+ "lines": [
+ "Your gains are packing their bags. {0} tomorrow, no excuses!",
+ "{0} doesn’t do itself, recruit. Move it!",
+ "Excuses don’t lift weights. Report for {0} tomorrow!",
+ "Your muscles filed a missing-person report. Show up for {0}!"
+ ]
+ }
+ },
+ "ar": {
+ "friendly": {
+ "title": "هل كل شيء على ما يرام؟",
+ "lines": [
+ "{0} ما زال ينتظرك. ما الأمر؟",
+ "لا {0} اليوم؟ حتى جلسة قصيرة غدًا تُحسب.",
+ "يوم صعب؟ {0} يمكنه الانتظار. غدًا بداية جديدة.",
+ "مرحبًا، لم يحدث {0} اليوم. هل كل شيء بخير؟"
+ ]
+ },
+ "guilt": {
+ "title": "اشتقت إليك",
+ "lines": [
+ "{0} انتظرك عند الباب طوال المساء. أنت بالذات.",
+ "سأل عنك البار اليوم. لم أعرف ماذا أقول.",
+ "هل قلت شيئًا أزعجك؟ {0} مشتاق إليك.",
+ "حجزت لك مكانًا على المقعد. ما زال فارغًا."
+ ]
+ },
+ "drill": {
+ "title": "انتباه أيها المجنّد!",
+ "lines": [
+ "مكاسبك تحزم حقائبها. {0} غدًا، بلا أعذار!",
+ "{0} لن ينجز نفسه أيها المجنّد. تحرّك!",
+ "الأعذار لا ترفع الأوزان. احضر غدًا إلى {0}!",
+ "عضلاتك أبلغت عن فقدانك. احضر إلى {0}!"
+ ]
+ }
+ },
+ "de": {
+ "friendly": {
+ "title": "Alles okay?",
+ "lines": [
+ "{0} wartet noch auf dich. Was ist los?",
+ "Heute kein {0}? Auch eine kurze Einheit morgen zählt.",
+ "Harter Tag? {0} läuft nicht weg. Morgen ist ein neuer Anfang.",
+ "Hey, {0} ist heute ausgefallen. Alles gut?"
+ ]
+ },
+ "guilt": {
+ "title": "Ich vermisse dich",
+ "lines": [
+ "{0} hat den ganzen Abend an der Tür gewartet. Auf dich.",
+ "Die Langhantel hat heute nach dir gefragt. Ich wusste nicht, was ich sagen soll.",
+ "War es etwas, das ich gesagt habe? {0} vermisst dich.",
+ "Ich habe dir einen Platz auf der Bank freigehalten. Er ist immer noch leer."
+ ]
+ },
+ "drill": {
+ "title": "Achtung, Rekrut!",
+ "lines": [
+ "Deine Gains packen schon die Koffer. {0} morgen, keine Ausreden!",
+ "{0} macht sich nicht von allein, Rekrut. Bewegung!",
+ "Ausreden stemmen keine Gewichte. Morgen trittst du zu {0} an!",
+ "Deine Muskeln haben eine Vermisstenanzeige aufgegeben. Antreten zu {0}!"
+ ]
+ }
+ },
+ "es": {
+ "friendly": {
+ "title": "¿Todo bien?",
+ "lines": [
+ "{0} sigue esperando. ¿Qué pasa?",
+ "¿Hoy no hubo {0}? Mañana, hasta una sesión corta cuenta.",
+ "¿Día difícil? {0} puede esperar. Mañana empiezas de nuevo.",
+ "Oye, hoy no hubo {0}. ¿Todo bien?"
+ ]
+ },
+ "guilt": {
+ "title": "Te echo de menos",
+ "lines": [
+ "{0} te esperó en la puerta toda la tarde. A ti.",
+ "La barra preguntó por ti hoy. No supe qué decirle.",
+ "¿Fue algo que dije? {0} te echa de menos.",
+ "Te guardé un sitio en el banco. Sigue vacío."
+ ]
+ },
+ "drill": {
+ "title": "¡Atención, recluta!",
+ "lines": [
+ "Tus ganancias están haciendo las maletas. ¡{0} mañana, sin excusas!",
+ "{0} no se hace solo, recluta. ¡Muévete!",
+ "Las excusas no levantan pesas. ¡Mañana te presentas a {0}!",
+ "Tus músculos pusieron una denuncia por desaparición. ¡Preséntate a {0}!"
+ ]
+ }
+ },
+ "fr": {
+ "friendly": {
+ "title": "Tout va bien ?",
+ "lines": [
+ "{0} vous attend toujours. Que se passe-t-il ?",
+ "Pas de {0} aujourd’hui ? Même une courte séance demain compte.",
+ "Journée difficile ? {0} peut attendre. Demain est un nouveau départ.",
+ "Hé, {0} n’a pas eu lieu aujourd’hui. Tout va bien ?"
+ ]
+ },
+ "guilt": {
+ "title": "Vous me manquez",
+ "lines": [
+ "{0} vous a attendu à la porte toute la soirée. Vous.",
+ "La barre a demandé de vos nouvelles aujourd’hui. Je n’ai pas su quoi lui dire.",
+ "C’est quelque chose que j’ai dit ? {0} s’ennuie de vous.",
+ "Je vous ai gardé une place sur le banc. Elle est toujours vide."
+ ]
+ },
+ "drill": {
+ "title": "Garde-à-vous, recrue !",
+ "lines": [
+ "Vos gains font leurs valises. {0} demain, sans excuses !",
+ "{0} ne va pas se faire tout seul, recrue. Au pas de course !",
+ "Les excuses ne soulèvent pas de poids. Présentez-vous demain pour {0} !",
+ "Vos muscles ont signalé votre disparition. Présentez-vous pour {0} !"
+ ]
+ }
+ },
+ "hi": {
+ "friendly": {
+ "title": "सब ठीक है?",
+ "lines": [
+ "{0} अब भी इंतज़ार कर रहा है। क्या हुआ?",
+ "आज {0} नहीं हुआ? कल एक छोटा सेशन भी गिना जाएगा।",
+ "मुश्किल दिन था? {0} इंतज़ार कर लेगा। कल नई शुरुआत है।",
+ "अरे, आज {0} नहीं हुआ। सब ठीक है?"
+ ]
+ },
+ "guilt": {
+ "title": "आपकी याद आ रही है",
+ "lines": [
+ "{0} पूरी शाम दरवाज़े पर आपका इंतज़ार करता रहा।",
+ "आज बारबेल ने आपके बारे में पूछा। मुझे समझ नहीं आया क्या कहूँ।",
+ "क्या मैंने कुछ गलत कहा? {0} को आपकी याद आ रही है।",
+ "मैंने बेंच पर आपके लिए जगह रखी थी। वह अब भी खाली है।"
+ ]
+ },
+ "drill": {
+ "title": "सावधान, रंगरूट!",
+ "lines": [
+ "आपके गेन्स बोरिया-बिस्तर बाँध रहे हैं। कल {0}, कोई बहाना नहीं!",
+ "{0} अपने आप नहीं होगा, रंगरूट। चलो, हिलो!",
+ "बहाने वज़न नहीं उठाते। कल {0} के लिए हाज़िर हो!",
+ "आपकी मांसपेशियों ने गुमशुदगी की रिपोर्ट लिखाई है। {0} के लिए हाज़िर हो!"
+ ]
+ }
+ },
+ "hu": {
+ "friendly": {
+ "title": "Minden rendben?",
+ "lines": [
+ "A(z) {0} még mindig vár. Mi a helyzet?",
+ "Ma nem volt {0}? Holnap egy rövid edzés is számít.",
+ "Nehéz nap? A(z) {0} megvár. Holnap új kezdet.",
+ "Hé, ma elmaradt a(z) {0}. Minden oké?"
+ ]
+ },
+ "guilt": {
+ "title": "Hiányzol",
+ "lines": [
+ "A(z) {0} egész este az ajtóban várt. Rád.",
+ "A rúd ma rólad kérdezett. Nem tudtam, mit mondjak.",
+ "Valami rosszat mondtam? A(z) {0} hiányol téged.",
+ "Foglaltam neked helyet a padon. Még mindig üres."
+ ]
+ },
+ "drill": {
+ "title": "Vigyázz, újonc!",
+ "lines": [
+ "Az eredményeid már pakolnak. Holnap {0}, nincs kifogás!",
+ "A(z) {0} nem csinálja meg magát, újonc. Mozgás!",
+ "A kifogások nem emelnek súlyt. Holnap jelentkezel: {0}!",
+ "Az izmaid eltűntként jelentettek. Jelentkezz: {0}!"
+ ]
+ }
+ },
+ "it": {
+ "friendly": {
+ "title": "Tutto bene?",
+ "lines": [
+ "{0} ti sta ancora aspettando. Che succede?",
+ "Niente {0} oggi? Anche una sessione breve domani conta.",
+ "Giornata dura? {0} può aspettare. Domani si ricomincia.",
+ "Ehi, oggi {0} è saltato. Tutto a posto?"
+ ]
+ },
+ "guilt": {
+ "title": "Mi manchi",
+ "lines": [
+ "{0} ti ha aspettato alla porta tutta la sera. Proprio te.",
+ "Il bilanciere oggi ha chiesto di te. Non sapevo cosa dirgli.",
+ "Ho detto qualcosa di sbagliato? {0} sente la tua mancanza.",
+ "Ti ho tenuto un posto sulla panca. È ancora vuoto."
+ ]
+ },
+ "drill": {
+ "title": "Attenti, recluta!",
+ "lines": [
+ "I tuoi progressi stanno facendo le valigie. {0} domani, niente scuse!",
+ "{0} non si fa da solo, recluta. Muoviti!",
+ "Le scuse non sollevano pesi. Domani ti presenti a {0}!",
+ "I tuoi muscoli hanno denunciato la tua scomparsa. Presentati a {0}!"
+ ]
+ }
+ },
+ "ko": {
+ "friendly": {
+ "title": "괜찮으세요?",
+ "lines": [
+ "{0}이(가) 아직 기다리고 있어요. 무슨 일 있어요?",
+ "오늘은 {0} 안 했나요? 내일은 짧게라도 하면 돼요.",
+ "힘든 하루였나요? {0}은(는) 기다려 줄 거예요. 내일 다시 시작해요.",
+ "저기요, 오늘 {0}을(를) 못 했네요. 괜찮아요?"
+ ]
+ },
+ "guilt": {
+ "title": "보고 싶어요",
+ "lines": [
+ "{0}이(가) 저녁 내내 문 앞에서 기다렸어요. 당신을요.",
+ "오늘 바벨이 당신 안부를 물었어요. 뭐라고 해야 할지 몰랐어요.",
+ "제가 뭐 잘못 말했나요? {0}이(가) 당신을 보고 싶어 해요.",
+ "벤치에 자리를 맡아 뒀어요. 아직 비어 있어요."
+ ]
+ },
+ "drill": {
+ "title": "차렷, 훈련병!",
+ "lines": [
+ "근손실이 짐을 싸고 있다. 내일 {0}, 핑계는 없다!",
+ "{0}은(는) 저절로 되지 않는다, 훈련병. 움직여!",
+ "핑계는 무게를 들지 않는다. 내일 {0}에 집합!",
+ "근육들이 실종 신고를 냈다. {0}에 출석하라!"
+ ]
+ }
+ },
+ "pl": {
+ "friendly": {
+ "title": "Wszystko w porządku?",
+ "lines": [
+ "Trening „{0}” wciąż czeka. Co się dzieje?",
+ "Dziś bez treningu „{0}”? Jutro nawet krótka sesja się liczy.",
+ "Ciężki dzień? Trening „{0}” poczeka. Jutro nowy start.",
+ "Hej, trening „{0}” dziś nie wyszedł. Wszystko dobrze?"
+ ]
+ },
+ "guilt": {
+ "title": "Tęsknię za tobą",
+ "lines": [
+ "Trening „{0}” czekał na ciebie przy drzwiach cały wieczór. Właśnie na ciebie.",
+ "Sztanga pytała dziś o ciebie. Nie wiedziałem, co powiedzieć.",
+ "Czy to przez coś, co powiedziałem? Trening „{0}” tęskni za tobą.",
+ "Zająłem ci miejsce na ławce. Wciąż jest puste."
+ ]
+ },
+ "drill": {
+ "title": "Baczność, rekrucie!",
+ "lines": [
+ "Twoje postępy pakują walizki. Jutro „{0}”, bez wymówek!",
+ "Trening „{0}” sam się nie zrobi, rekrucie. Ruszaj się!",
+ "Wymówki nie podnoszą ciężarów. Jutro meldujesz się na „{0}”!",
+ "Twoje mięśnie zgłosiły twoje zaginięcie. Stawić się na „{0}”!"
+ ]
+ }
+ },
+ "pt": {
+ "friendly": {
+ "title": "Está tudo bem?",
+ "lines": [
+ "{0} ainda está à tua espera. Então?",
+ "Hoje não houve {0}? Amanhã até um treino curto conta.",
+ "Dia difícil? {0} pode esperar. Amanhã é um novo começo.",
+ "Olha, hoje não houve {0}. Está tudo bem?"
+ ]
+ },
+ "guilt": {
+ "title": "Tenho saudades tuas",
+ "lines": [
+ "{0} esperou por ti à porta a noite toda. Por ti.",
+ "A barra perguntou por ti hoje. Não soube o que lhe dizer.",
+ "Foi alguma coisa que eu disse? {0} tem saudades tuas.",
+ "Guardei-te um lugar no banco. Continua vazio."
+ ]
+ },
+ "drill": {
+ "title": "Sentido, recruta!",
+ "lines": [
+ "Os teus ganhos estão a fazer as malas. {0} amanhã, sem desculpas!",
+ "{0} não se faz sozinho, recruta. Mexe-te!",
+ "Desculpas não levantam pesos. Amanhã apresentas-te para {0}!",
+ "Os teus músculos deram-te como desaparecido. Apresenta-te para {0}!"
+ ]
+ }
+ },
+ "pt-BR": {
+ "friendly": {
+ "title": "Está tudo bem?",
+ "lines": [
+ "{0} ainda está esperando você. E aí?",
+ "Hoje não teve {0}? Amanhã até um treino curto conta.",
+ "Dia difícil? {0} pode esperar. Amanhã é um novo começo.",
+ "Ei, hoje não teve {0}. Tudo certo?"
+ ]
+ },
+ "guilt": {
+ "title": "Estou com saudade de você",
+ "lines": [
+ "{0} esperou você na porta a noite toda. Você.",
+ "A barra perguntou de você hoje. Não soube o que dizer.",
+ "Foi alguma coisa que eu disse? {0} está com saudade de você.",
+ "Guardei um lugar no banco para você. Continua vazio."
+ ]
+ },
+ "drill": {
+ "title": "Sentido, recruta!",
+ "lines": [
+ "Seus ganhos estão fazendo as malas. {0} amanhã, sem desculpas!",
+ "{0} não se faz sozinho, recruta. Mexa-se!",
+ "Desculpa não levanta peso. Amanhã você se apresenta para {0}!",
+ "Seus músculos registraram seu desaparecimento. Apresente-se para {0}!"
+ ]
+ }
+ },
+ "ru": {
+ "friendly": {
+ "title": "Всё в порядке?",
+ "lines": [
+ "Тренировка «{0}» всё ещё ждёт. Что случилось?",
+ "Сегодня без тренировки «{0}»? Завтра засчитается даже короткая.",
+ "Тяжёлый день? Тренировка «{0}» подождёт. Завтра — новый старт.",
+ "Эй, тренировка «{0}» сегодня не состоялась. Всё хорошо?"
+ ]
+ },
+ "guilt": {
+ "title": "Я скучаю по вам",
+ "lines": [
+ "Тренировка «{0}» весь вечер ждала вас у двери. Именно вас.",
+ "Штанга сегодня спрашивала о вас. Я не знал, что ответить.",
+ "Я что-то не то сказал? Тренировка «{0}» скучает по вам.",
+ "Я занял вам место на скамье. Оно всё ещё пустое."
+ ]
+ },
+ "drill": {
+ "title": "Смирно, новобранец!",
+ "lines": [
+ "Ваши достижения пакуют чемоданы. Завтра «{0}», без отговорок!",
+ "Тренировка «{0}» сама себя не сделает, новобранец. Шевелитесь!",
+ "Отговорки не поднимают веса. Завтра явиться на «{0}»!",
+ "Ваши мышцы подали заявление о пропаже. Явиться на «{0}»!"
+ ]
+ }
+ },
+ "th": {
+ "friendly": {
+ "title": "ทุกอย่างโอเคไหม?",
+ "lines": [
+ "{0} ยังรอคุณอยู่นะ เป็นอะไรหรือเปล่า?",
+ "วันนี้ไม่มี {0} เหรอ? พรุ่งนี้แค่เล่นสั้นๆ ก็นับแล้ว",
+ "วันนี้เหนื่อยเหรอ? {0} รอได้ พรุ่งนี้เริ่มใหม่",
+ "เฮ้ วันนี้ไม่ได้เล่น {0} ทุกอย่างโอเคไหม?"
+ ]
+ },
+ "guilt": {
+ "title": "คิดถึงคุณนะ",
+ "lines": [
+ "{0} รอคุณอยู่ที่ประตูทั้งคืน รอคุณคนเดียว",
+ "วันนี้บาร์เบลถามถึงคุณ ฉันไม่รู้จะตอบว่าอะไร",
+ "ฉันพูดอะไรผิดไปหรือเปล่า? {0} คิดถึงคุณนะ",
+ "ฉันจองที่บนม้านั่งไว้ให้คุณ ตอนนี้ยังว่างอยู่เลย"
+ ]
+ },
+ "drill": {
+ "title": "แถวตรง พลทหาร!",
+ "lines": [
+ "กล้ามของคุณกำลังเก็บกระเป๋าหนี พรุ่งนี้ {0} ห้ามมีข้ออ้าง!",
+ "{0} ไม่ทำตัวเองหรอก พลทหาร เคลื่อนไหว!",
+ "ข้ออ้างยกน้ำหนักไม่ได้ พรุ่งนี้มารายงานตัวที่ {0}!",
+ "กล้ามเนื้อของคุณแจ้งคนหายแล้ว มารายงานตัวที่ {0}!"
+ ]
+ }
+ },
+ "tr": {
+ "friendly": {
+ "title": "Her şey yolunda mı?",
+ "lines": [
+ "{0} hâlâ seni bekliyor. Ne oldu?",
+ "Bugün {0} yok mu? Yarın kısa bir seans bile sayılır.",
+ "Zor bir gün mü? {0} bekleyebilir. Yarın yeni bir başlangıç.",
+ "Hey, {0} bugün olmadı. Her şey yolunda mı?"
+ ]
+ },
+ "guilt": {
+ "title": "Seni özledim",
+ "lines": [
+ "{0} bütün akşam kapıda seni bekledi. Seni.",
+ "Halter bugün seni sordu. Ne diyeceğimi bilemedim.",
+ "Bir şey mi dedim? {0} seni özledi.",
+ "Sana sehpada yer ayırdım. Hâlâ boş."
+ ]
+ },
+ "drill": {
+ "title": "Hazır ol, acemi!",
+ "lines": [
+ "Kazanımların bavul topluyor. Yarın {0}, bahane yok!",
+ "{0} kendi kendine yapılmaz, acemi. Kımılda!",
+ "Bahaneler ağırlık kaldırmaz. Yarın {0} için hazır ol!",
+ "Kasların kayıp ilanı verdi. {0} için içtimaya gel!"
+ ]
+ }
+ },
+ "uk": {
+ "friendly": {
+ "title": "Усе гаразд?",
+ "lines": [
+ "Тренування «{0}» досі чекає. Що сталося?",
+ "Сьогодні без тренування «{0}»? Завтра зарахується навіть коротке.",
+ "Важкий день? Тренування «{0}» почекає. Завтра — новий старт.",
+ "Гей, тренування «{0}» сьогодні не відбулося. Усе добре?"
+ ]
+ },
+ "guilt": {
+ "title": "Я сумую за тобою",
+ "lines": [
+ "Тренування «{0}» весь вечір чекало на тебе біля дверей. Саме на тебе.",
+ "Штанга сьогодні питала про тебе. Я не знав, що сказати.",
+ "Я щось не те сказав? Тренування «{0}» сумує за тобою.",
+ "Я зайняв тобі місце на лаві. Воно досі порожнє."
+ ]
+ },
+ "drill": {
+ "title": "Струнко, новобранцю!",
+ "lines": [
+ "Твої здобутки пакують валізи. Завтра «{0}», без відмовок!",
+ "Тренування «{0}» саме себе не зробить, новобранцю. Ворушися!",
+ "Відмовки не піднімають ваги. Завтра з’явитися на «{0}»!",
+ "Твої м’язи заявили про твоє зникнення. З’явитися на «{0}»!"
+ ]
+ }
+ },
+ "zh": {
+ "friendly": {
+ "title": "一切还好吗?",
+ "lines": [
+ "{0}还在等你。怎么了?",
+ "今天没练{0}?明天哪怕练一小会儿也算数。",
+ "今天不顺?{0}可以等。明天重新开始。",
+ "嘿,今天的{0}没练成。一切都好吗?"
+ ]
+ },
+ "guilt": {
+ "title": "我想你了",
+ "lines": [
+ "{0}在门口等了你一整晚。就等你。",
+ "杠铃今天问起你了。我不知道该怎么说。",
+ "是我说错什么了吗?{0}想你了。",
+ "我在卧推凳上给你留了位置。现在还空着。"
+ ]
+ },
+ "drill": {
+ "title": "立正,新兵!",
+ "lines": [
+ "你的增肌成果正在收拾行李。明天{0},不许找借口!",
+ "{0}不会自己完成,新兵。动起来!",
+ "借口举不起重量。明天准时报到练{0}!",
+ "你的肌肉已经报了失踪。马上来练{0}!"
+ ]
+ }
+ },
+ "zh-TW": {
+ "friendly": {
+ "title": "一切還好嗎?",
+ "lines": [
+ "{0} 還在等你。怎麼了?",
+ "今天沒練 {0}?明天就算練一下下也算數。",
+ "今天不順?{0} 可以等。明天重新開始。",
+ "嘿,今天的 {0} 沒練到。一切都好嗎?"
+ ]
+ },
+ "guilt": {
+ "title": "我好想你",
+ "lines": [
+ "{0} 在門口等了你一整晚。就等你。",
+ "槓鈴今天問起你了。我不知道該怎麼回答。",
+ "是我說錯什麼了嗎?{0} 很想你。",
+ "我在臥推椅上幫你留了位置。現在還空著。"
+ ]
+ },
+ "drill": {
+ "title": "立正,菜鳥!",
+ "lines": [
+ "你的訓練成果正在打包行李。明天 {0},不准找藉口!",
+ "{0} 不會自己完成,菜鳥。動起來!",
+ "藉口舉不起重量。明天準時報到練 {0}!",
+ "你的肌肉已經報案協尋你了。馬上來練 {0}!"
+ ]
+ }
+ }
+};
diff --git a/api/nudge.js b/api/nudge.js
new file mode 100644
index 000000000..c260fb9fd
--- /dev/null
+++ b/api/nudge.js
@@ -0,0 +1,66 @@
+// Missed-workout nudge — the server half. Hand-copied (not imported) from
+// frontend/src/lib/nudge.js, as queue.js is from lib/queue.js: see there for the three rules
+// (WHEN 20:00, or 2 h after the reminder, until 21:30; WHICH day counts as missed; the back-off
+// after 3 missed days in a row). Kept out of server.js so it can be unit-tested without booting
+// the server; the tick in server.js adds what only it knows (the push subscription, a session
+// on screen right now, the once-a-day mark in db.json).
+import { effectiveRoutineId, queueLiveOn } from './queue.js';
+
+export const NUDGE_TONES = ['friendly', 'guilt', 'drill'];
+export const NUDGE_MAX_MISSES = 3;
+export const NUDGE_LOOKBACK_DAYS = 14;
+const EVENING = 20 * 60, LATEST = 21 * 60 + 30, AFTER_REMINDER = 120;
+
+export const toneOf = r => (NUDGE_TONES.includes(r?.tone) ? r.tone : 'friendly');
+
+const hhmmToMin = v => {
+ const m = /^(\d{2}):(\d{2})$/.exec(v || '');
+ return m ? Number(m[1]) * 60 + Number(m[2]) : NaN;
+};
+
+/** Minutes after midnight the nudge is owed from, or null when that would be after 21:30. */
+export function nudgeMinute(reminderTime) {
+ const r = hhmmToMin(reminderTime);
+ const at = Math.max(EVENING, Number.isNaN(r) ? 0 : r + AFTER_REMINDER);
+ return at > LATEST ? null : at;
+}
+
+/** Is `hhmm` inside today's nudge window for a reminder set at `reminderTime`? */
+export function nudgeWindowOpen(reminderTime, hhmm) {
+ const at = nudgeMinute(reminderTime);
+ const now = hhmmToMin(hhmm);
+ return at != null && now >= at && now <= LATEST;
+}
+
+// Calendar arithmetic on ISO dates at UTC noon: no zone or DST edge can move the day.
+const dayBefore = iso => new Date(Date.parse(iso + 'T12:00:00Z') - 86400000).toISOString().slice(0, 10);
+const records = v => (Array.isArray(v) ? v.filter(x => x && typeof x === 'object') : []);
+const logged = (S, iso) => S.workouts.some(w => w.d === iso);
+
+function missed(S, iso) {
+ if (logged(S, iso)) return null;
+ const rid = effectiveRoutineId(S, iso);
+ if (!rid) return null;
+ if (queueLiveOn(S, iso) && logged(S, dayBefore(iso))) return null;
+ return rid;
+}
+
+/**
+ * The routine id to nudge about on `iso`, or null: not a missed day, or 3 missed days in a row
+ * already since the last workout (back-off). Workouts dated after `iso` are not looked at.
+ */
+export function nudgeFor(state, iso) {
+ const S = { ...state, workouts: records(state?.workouts), routines: records(state?.routines) };
+ const rid = missed(S, iso);
+ if (!rid) return null;
+ const last = S.workouts.reduce((m, w) => (typeof w.d === 'string' && w.d < iso && w.d > m ? w.d : m), '');
+ let misses = 0;
+ let d = dayBefore(iso);
+ for (let i = 0; i < NUDGE_LOOKBACK_DAYS && d > last; i++, d = dayBefore(d)) {
+ if (missed(S, d) && ++misses >= NUDGE_MAX_MISSES) return null;
+ }
+ return rid;
+}
+
+/** The day's line index: by date, so a day keeps its line and consecutive days rotate. */
+export const lineIndex = (iso, n) => Math.floor(Date.parse(iso + 'T00:00:00Z') / 86400000) % n;
diff --git a/api/push-messages.js b/api/push-messages.js
index 56321fe50..1de80a99f 100644
--- a/api/push-messages.js
+++ b/api/push-messages.js
@@ -1,3 +1,6 @@
+import { NUDGE_COPY } from './nudge-copy.js';
+import { lineIndex } from './nudge.js';
+
const COPY = {
en: {
restTitle: 'Rest over 💪',
@@ -38,3 +41,21 @@ export function dayReminderPush(lang, routine) {
tag: 'day-reminder',
};
}
+
+// The missed-workout nudge (nudge.js). Its copy is translated in the frontend packs and generated
+// into nudge-copy.js, so every language the app speaks has it — unlike the strings above, which
+// predate that and fall back to English. de-CH is de with ß written ss, as in the frontend
+// (lib/i18n-core.js DERIVED_LOCALES).
+const nudgeCopyFor = lang => {
+ if (lang === 'de-CH') {
+ const ch = s => s.replace(/ß/g, 'ss');
+ return Object.fromEntries(Object.entries(NUDGE_COPY.de).map(([k, c]) => [k, { title: ch(c.title), lines: c.lines.map(ch) }]));
+ }
+ return NUDGE_COPY[lang] || NUDGE_COPY.en;
+};
+export function nudgePush(lang, tone, routine, iso) {
+ const copy = nudgeCopyFor(lang)[NUDGE_COPY.en[tone] ? tone : 'friendly'];
+ const line = copy.lines[lineIndex(iso, copy.lines.length)];
+ const name = routine?.name || 'openGym';
+ return { title: copy.title, body: line.replace('{0}', () => name), tag: 'nudge' };
+}
diff --git a/api/queue.js b/api/queue.js
index 6b654f6b5..8d858b1f5 100644
--- a/api/queue.js
+++ b/api/queue.js
@@ -107,7 +107,7 @@ export function effectiveRoutineId(S, iso) {
// Is `iso` a day the queue speaks for, with sessions still to do? (`today === iso` here, so
// "the queue's day" is any day from startsOn on.)
-function queueLiveOn(S, iso) {
+export function queueLiveOn(S, iso) {
const q = queueOf(S);
return !!q && iso >= q.startsOn && q.ids.some(id => !queueDone(S, id, q.startsOn));
}
diff --git a/api/scripts/build-nudge-copy.mjs b/api/scripts/build-nudge-copy.mjs
new file mode 100644
index 000000000..608e12c6b
--- /dev/null
+++ b/api/scripts/build-nudge-copy.mjs
@@ -0,0 +1,41 @@
+#!/usr/bin/env node
+// Writes api/nudge-copy.js — the server's copy of the missed-workout nudge text — from the source
+// of truth in the frontend: the English pool in frontend/src/lib/nudge.js and its translations in
+// frontend/src/locales. The api image carries no frontend, so the text has to live here too;
+// this keeps the two from drifting (test/nudge-copy.test.js fails when they have).
+//
+// node scripts/build-nudge-copy.mjs # rewrite nudge-copy.js
+// node scripts/build-nudge-copy.mjs --check # exit 1 if it is out of date
+import fs from 'node:fs';
+import path from 'node:path';
+import { fileURLToPath, pathToFileURL } from 'node:url';
+
+const API = path.join(path.dirname(fileURLToPath(import.meta.url)), '..');
+const FRONT = path.join(API, '..', 'frontend', 'src');
+const OUT = path.join(API, 'nudge-copy.js');
+
+export async function buildNudgeCopy() {
+ const { NUDGE_COPY } = await import(pathToFileURL(path.join(FRONT, 'lib', 'nudge.js')));
+ const langs = fs.readdirSync(path.join(FRONT, 'locales')).filter(f => /^[a-zA-Z-]+\.js$/.test(f)).map(f => f.slice(0, -3)).sort();
+ const copy = { en: NUDGE_COPY };
+ for (const lang of langs) {
+ const pack = (await import(pathToFileURL(path.join(FRONT, 'locales', lang + '.js')))).default;
+ const tr = s => pack[s] || s;
+ copy[lang] = Object.fromEntries(Object.entries(NUDGE_COPY).map(([tone, c]) => [tone, { title: tr(c.title), lines: c.lines.map(tr) }]));
+ }
+ return '// GENERATED by scripts/build-nudge-copy.mjs from frontend/src/lib/nudge.js and frontend/src/locales.\n'
+ + '// Do not edit by hand: change the frontend strings and run the script again.\n'
+ + 'export const NUDGE_COPY = ' + JSON.stringify(copy, null, 2) + ';\n';
+}
+
+if (import.meta.url === pathToFileURL(process.argv[1]).href) {
+ const text = await buildNudgeCopy();
+ if (process.argv.includes('--check')) {
+ const cur = fs.existsSync(OUT) ? fs.readFileSync(OUT, 'utf8') : '';
+ if (cur !== text) { console.error('api/nudge-copy.js is out of date: run node scripts/build-nudge-copy.mjs'); process.exit(1); }
+ console.log('api/nudge-copy.js is up to date.');
+ } else {
+ fs.writeFileSync(OUT, text);
+ console.log('wrote', path.relative(process.cwd(), OUT));
+ }
+}
diff --git a/api/server.js b/api/server.js
index 3bf362d04..b84fb761c 100644
--- a/api/server.js
+++ b/api/server.js
@@ -18,7 +18,7 @@ import * as coachJobs from './coach/jobs.js';
import { coachRoutes } from './coach/routes.js';
import { startCadence } from './coach/cadence.js';
import { startWarmup } from './coach/warmup.js';
-import { dayReminderPush, restTimerPush, testPush } from './push-messages.js';
+import { dayReminderPush, nudgePush, restTimerPush, testPush } from './push-messages.js';
import { verifyError } from './verify-error.js';
import {
hashPassword, verifyPassword, needsRehash, passwordProblem, passwordLength, nameKey, BusyError,
@@ -32,6 +32,7 @@ import {
import { createDeviceLink, findDeviceLink, burnDeviceLink, dropDeviceLinks } from './device-link.js';
import { createMediaStore, mediaLimits, mediaConfig, MediaError, HASH_RE } from './media.js';
import { effectiveRoutineId } from './queue.js';
+import { nudgeFor, nudgeWindowOpen, toneOf } from './nudge.js';
const PORT = +(process.env.PORT || 3000);
const DATA = process.env.DATA_DIR || '/data';
@@ -396,6 +397,23 @@ function readStateCached(uid) {
while (stateCache.size > STATE_CACHE_MAX) stateCache.delete(stateCache.keys().next().value);
return S;
}
+// Missed-workout nudge (nudge.js): opt-in on top of the reminder, so it needs everything the
+// reminder does (a push subscription, the reminder on, a zone). Owed from 20:00 — or 2 h after the
+// reminder — until 21:30 on the user's clock, the same catch-up idea as the reminder's window: a
+// restart inside the evening still sends it. Once per local date (`user.lastNudge`), never while
+// a workout is on screen, and nudgeFor() decides the day and the back-off.
+function nudgeTick(user, S, now) {
+ if (!S.reminder.nudge || user.lastNudge === now.date) return;
+ if (!nudgeWindowOpen(S.reminder.time, now.hhmm)) return;
+ if (livePresence(user.id)) return; // a session is under way — today's workout in the making
+ const rid = nudgeFor(S, now.date);
+ if (!rid) return;
+ const routine = (S.routines || []).find(r => r?.id === rid);
+ console.log('nudge firing', user.id, rid);
+ user.lastNudge = now.date;
+ saveDb();
+ sendPush(user.id, nudgePush(S.lang, toneOf(S.reminder), routine, now.date));
+}
setInterval(() => {
for (const user of db.users) {
if (!db.subs.some(s => s.userId === user.id)) continue;
@@ -407,6 +425,7 @@ setInterval(() => {
if (!S?.reminder?.on) continue;
const now = userNow(S.reminder.tz || 'UTC');
if (!now) continue;
+ nudgeTick(user, S, now);
const late = minutesLate(S.reminder.time, now);
if (!(late >= 0 && late <= REMINDER_WINDOW_MIN)) continue;
if (user.lastReminder === now.date) continue;
diff --git a/api/test/nudge-copy.test.js b/api/test/nudge-copy.test.js
new file mode 100644
index 000000000..4f148508d
--- /dev/null
+++ b/api/test/nudge-copy.test.js
@@ -0,0 +1,16 @@
+// nudge-copy.js is generated from the frontend's English pool and locale packs (the api image has
+// no frontend to read them from at runtime). A string changed on one side only fails here.
+import { test } from 'node:test';
+import assert from 'node:assert/strict';
+import fs from 'node:fs';
+import path from 'node:path';
+import { fileURLToPath } from 'node:url';
+
+const API = path.join(path.dirname(fileURLToPath(import.meta.url)), '..');
+
+test('api/nudge-copy.js matches the frontend strings (node scripts/build-nudge-copy.mjs)', async t => {
+ if (!fs.existsSync(path.join(API, '..', 'frontend', 'src', 'lib', 'nudge.js'))) return t.skip('no frontend next to the api');
+ const { buildNudgeCopy } = await import('../scripts/build-nudge-copy.mjs');
+ assert.equal(fs.readFileSync(path.join(API, 'nudge-copy.js'), 'utf8'), await buildNudgeCopy(),
+ 'api/nudge-copy.js is out of date: run node scripts/build-nudge-copy.mjs in api/');
+});
diff --git a/api/test/nudge.test.js b/api/test/nudge.test.js
new file mode 100644
index 000000000..f280bcb10
--- /dev/null
+++ b/api/test/nudge.test.js
@@ -0,0 +1,100 @@
+// Missed-workout nudge — the pure half (nudge.js) and its push text (push-messages.js). The tick
+// in server.js is covered end to end in server-nudge.test.js; the rules themselves are here.
+import { test } from 'node:test';
+import assert from 'node:assert/strict';
+import { nudgeFor, nudgeMinute, nudgeWindowOpen, toneOf, lineIndex } from '../nudge.js';
+import { nudgePush } from '../push-messages.js';
+import { NUDGE_COPY } from '../nudge-copy.js';
+
+const routines = [{ id: 'push', name: 'Push Day' }, { id: 'pull', name: 'Pull Day' }];
+// 2026-09-07 is a Monday. Push on Mon/Wed/Fri, nothing else.
+const S = (over = {}) => ({ routines, week: { 1: 'push', 3: 'push', 5: 'push' }, dayPlan: {}, workouts: [], reminder: { on: true, nudge: true, time: '08:00' }, ...over });
+const w = d => ({ id: 'w' + d, d, routineId: 'push' });
+
+test('when: 20:00, or 2 hours after a late reminder, and never after 21:30', () => {
+ assert.equal(nudgeMinute('08:00'), 20 * 60);
+ assert.equal(nudgeMinute('19:00'), 21 * 60);
+ assert.equal(nudgeMinute('19:30'), 21 * 60 + 30);
+ assert.equal(nudgeMinute('19:31'), null, 'a reminder this late leaves no evening for a nudge');
+ assert.equal(nudgeMinute(undefined), 20 * 60);
+ assert.equal(nudgeWindowOpen('08:00', '19:59'), false);
+ assert.equal(nudgeWindowOpen('08:00', '20:00'), true);
+ assert.equal(nudgeWindowOpen('08:00', '21:30'), true);
+ assert.equal(nudgeWindowOpen('08:00', '21:31'), false);
+ assert.equal(nudgeWindowOpen('19:00', '20:30'), false);
+ assert.equal(nudgeWindowOpen('21:00', '21:15'), false);
+});
+
+test('which: a planned day with nothing logged; not a rest day, not a trained day', () => {
+ assert.equal(nudgeFor(S({ workouts: [w('2026-09-04')] }), '2026-09-07'), 'push'); // Monday, missed
+ assert.equal(nudgeFor(S(), '2026-09-08'), null); // Tuesday, rest
+ assert.equal(nudgeFor(S({ workouts: [w('2026-09-07')] }), '2026-09-07'), null); // trained
+ assert.equal(nudgeFor(S({ dayPlan: { '2026-09-07': 'rest' }, workouts: [w('2026-09-04')] }), '2026-09-07'), null); // moved to rest
+ assert.equal(nudgeFor(S({ dayPlan: { '2026-09-08': 'pull' }, workouts: [w('2026-09-07')] }), '2026-09-08'), 'pull'); // moved onto Tuesday
+});
+
+test('back-off: quiet after 3 missed days in a row, back after the next workout', () => {
+ // last workout Fri 09-04; missed Mon 07, Wed 09, Fri 11 -> nudged on each of those three
+ const s = S({ workouts: [w('2026-09-04')] });
+ assert.equal(nudgeFor(s, '2026-09-07'), 'push');
+ assert.equal(nudgeFor(s, '2026-09-09'), 'push');
+ assert.equal(nudgeFor(s, '2026-09-11'), 'push');
+ // the fourth missed day in a row: silent, and so is every one after it
+ assert.equal(nudgeFor(s, '2026-09-14'), null);
+ assert.equal(nudgeFor(s, '2026-09-16'), null);
+ // a workout resets the count
+ const back = S({ workouts: [w('2026-09-04'), w('2026-09-15')] });
+ assert.equal(nudgeFor(back, '2026-09-16'), 'push');
+ // rest days in between are not misses
+ assert.equal(nudgeFor(S({ week: { 1: 'push' }, workouts: [w('2026-08-31')] }), '2026-09-14'), 'push');
+});
+
+test('back-off: a profile with no workouts at all is not nagged for ever', () => {
+ const every = S({ week: { 0: 'push', 1: 'push', 2: 'push', 3: 'push', 4: 'push', 5: 'push', 6: 'push' } });
+ assert.equal(nudgeFor(every, '2026-09-07'), null, 'the 14 days looked back on are all misses');
+});
+
+test('coach week / rotation: the day right after a workout is rest, the second day off is a miss', () => {
+ const queue = { ids: ['push', 'pull'], since: 0, startsOn: '2026-09-07' };
+ const s = S({ week: {}, queue, workouts: [{ id: 'a', d: '2026-09-07', routineId: 'push', start: 1 }] });
+ assert.equal(nudgeFor(s, '2026-09-08'), null, 'the day after a session');
+ assert.equal(nudgeFor(s, '2026-09-09'), 'pull', 'two days off in a row');
+});
+
+test('a malformed state reads as nothing to nudge about', () => {
+ assert.equal(nudgeFor({}, '2026-09-07'), null);
+ assert.equal(nudgeFor({ workouts: 'x', routines: null, week: { 1: 'push' } }, '2026-09-07'), null);
+ assert.equal(nudgeFor(S({ workouts: [null, w('2026-09-04')] }), '2026-09-07'), 'push');
+ assert.equal(toneOf({ tone: 'mean' }), 'friendly');
+ assert.equal(toneOf(undefined), 'friendly');
+ assert.equal(toneOf({ tone: 'drill' }), 'drill');
+});
+
+test('push text: by tone, one line per date, routine name filled in, localized', () => {
+ const iso = '2026-09-07';
+ const i = lineIndex(iso, 4);
+ const en = nudgePush('en', 'guilt', { name: 'Push Day' }, iso);
+ assert.equal(en.title, 'I miss you');
+ assert.equal(en.body, NUDGE_COPY.en.guilt.lines[i].replace('{0}', 'Push Day'));
+ assert.equal(en.tag, 'nudge');
+ // the next day takes the next line
+ assert.notEqual(nudgePush('en', 'guilt', { name: 'Push Day' }, '2026-09-08').body, en.body);
+ // every tone, every language: a title and the routine's name where the line has a slot
+ for (const lang of Object.keys(NUDGE_COPY)) {
+ for (const tone of ['friendly', 'guilt', 'drill']) {
+ for (let d = 0; d < 4; d++) {
+ const p = nudgePush(lang, tone, { name: 'Ω' }, `2026-09-0${d + 1}`);
+ assert.ok(p.title && p.body && !p.body.includes('{0}'), `${lang}/${tone}`);
+ }
+ }
+ }
+ assert.equal(nudgePush('de', 'drill', null, iso).title, 'Achtung, Rekrut!');
+ assert.equal(nudgePush('pt-BR', 'friendly', null, iso).title, 'Está tudo bem?');
+ // unknown language and tone fall back to English and friendly; de-CH writes ss
+ assert.deepEqual(nudgePush('xx', 'mean', { name: 'A' }, iso), nudgePush('en', 'friendly', { name: 'A' }, iso));
+ for (const tone of ['friendly', 'guilt', 'drill']) {
+ for (let d = 0; d < 4; d++) assert.doesNotMatch(nudgePush('de-CH', tone, { name: 'A' }, `2026-09-0${d + 1}`).body, /ß/);
+ }
+ // a name with $-patterns is inserted literally
+ assert.match(nudgePush('en', 'friendly', { name: '$& $1' }, '2026-09-04').body + nudgePush('en', 'friendly', { name: '$& $1' }, '2026-09-05').body, /\$& \$1/);
+});
diff --git a/api/test/server-nudge.test.js b/api/test/server-nudge.test.js
new file mode 100644
index 000000000..4a9e4d714
--- /dev/null
+++ b/api/test/server-nudge.test.js
@@ -0,0 +1,129 @@
+/* The missed-workout nudge, end to end through the real reminder tick (server.js in a child,
+ REMINDER_TICK_MS shortened). The nudge is owed from 20:00 to 21:30 on the user's clock, so
+ instead of faking the time each test picks the zone where it is 20:xx right now — which also
+ makes every test a timezone test: the server's own clock is never 20:xx by assumption.
+ nudge.test.js covers the rules themselves (back-off, coach week, copy). */
+import { test } from 'node:test';
+import assert from 'node:assert/strict';
+import crypto from 'node:crypto';
+import fs from 'node:fs';
+import os from 'node:os';
+import path from 'node:path';
+import { spawn } from 'node:child_process';
+import { fileURLToPath } from 'node:url';
+import { boundPort } from './helpers.mjs';
+
+const API = path.join(path.dirname(fileURLToPath(import.meta.url)), '..');
+const SECRET = crypto.randomBytes(32).toString('hex');
+const UID = 'u_nudge_1';
+const USERS = [{ id: UID, name: 'One', created: new Date().toISOString() }];
+const sub = { userId: UID, endpoint: 'https://localhost/x', keys: { p256dh: 'p', auth: 'a' }, created: new Date().toISOString() };
+
+function mintSession(uid) {
+ const payload = `${uid}:${Date.now() + 86400000}:0`;
+ return payload + '.' + crypto.createHmac('sha256', SECRET).update(payload).digest('base64url');
+}
+
+async function startServer(t, subs = [sub]) {
+ const dataDir = fs.mkdtempSync(path.join(os.tmpdir(), 'gym-nudge-'));
+ fs.writeFileSync(path.join(dataDir, 'secret'), SECRET, { mode: 0o600 });
+ fs.writeFileSync(path.join(dataDir, 'db.json'), JSON.stringify({ users: USERS, creds: [], subs, invites: [] }));
+ const child = spawn(process.execPath, ['server.js'], {
+ cwd: API, stdio: ['ignore', 'pipe', 'pipe'],
+ env: { ...process.env, PORT: '0', DATA_DIR: dataDir, ORIGIN: 'http://localhost:8080', RP_ID: 'localhost', REMINDER_TICK_MS: '200' }
+ });
+ const h = { dataDir, child, log: '' };
+ child.stdout.on('data', d => h.log += d);
+ child.stderr.on('data', d => h.log += d);
+ t.after(() => { child.kill('SIGKILL'); fs.rmSync(dataDir, { recursive: true, force: true }); });
+ h.port = await boundPort(child, () => h.log);
+ h.api = `http://127.0.0.1:${h.port}`;
+ h.write = state => fs.writeFileSync(path.join(dataDir, 'state-' + UID + '.json'), JSON.stringify(state));
+ h.db = () => JSON.parse(fs.readFileSync(path.join(dataDir, 'db.json'), 'utf8'));
+ return h;
+}
+
+// An Etc/GMT zone whose local hour is `hour` right now (POSIX sign: Etc/GMT-5 is UTC+5).
+function zoneAt(hour) {
+ let off = (hour - new Date().getUTCHours() + 48) % 24;
+ if (off > 14) off -= 24;
+ return off === 0 ? 'UTC' : off > 0 ? `Etc/GMT-${off}` : `Etc/GMT+${-off}`;
+}
+const dateIn = (tz, ms = Date.now()) =>
+ new Intl.DateTimeFormat('en-CA', { timeZone: tz, year: 'numeric', month: '2-digit', day: '2-digit' }).format(new Date(ms));
+const daysAgo = (tz, n) => dateIn(tz, Date.now() - n * 86400000);
+
+const routines = [{ id: 'r1', name: 'Push Day', emoji: '💪', ex: [] }];
+const everyDay = { 0: 'r1', 1: 'r1', 2: 'r1', 3: 'r1', 4: 'r1', 5: 'r1', 6: 'r1' };
+// Trained yesterday, today planned and not logged: a missed day, nothing to back off from.
+const missedToday = (tz, over = {}) => ({
+ reminder: { on: true, time: '08:00', tz, nudge: true, tone: 'drill' },
+ routines, week: everyDay, workouts: [{ id: 'w1', d: daysAgo(tz, 1), routineId: 'r1' }], ...over
+});
+const firings = log => (log.match(new RegExp(`nudge firing ${UID} r1`, 'g')) || []).length;
+const wait = ms => new Promise(r => setTimeout(r, ms));
+async function until(pred, ms = 15000) {
+ const end = Date.now() + ms;
+ while (Date.now() < end && !pred()) await wait(100);
+}
+
+test('fires once on the evening of a missed planned day, in the user\'s zone', async t => {
+ const tz = zoneAt(20);
+ const h = await startServer(t);
+ h.write(missedToday(tz));
+ await until(() => firings(h.log) > 0);
+ assert.equal(firings(h.log), 1, h.log);
+ await wait(1200); // several more ticks: once per local date
+ assert.equal(firings(h.log), 1, 'fired twice in one evening');
+ assert.equal(h.db().users[0].lastNudge, dateIn(tz));
+ // the plain reminder (08:00 there) is long past its window and stays out of it
+ assert.doesNotMatch(h.log, /reminder firing/);
+});
+
+test('silent outside the evening, on a rest day, on a trained day, and when switched off', async t => {
+ const h = await startServer(t);
+ const eve = zoneAt(20);
+ const cases = [
+ ['morning in that zone', missedToday(zoneAt(10))],
+ ['22:00 in that zone, past 21:30', missedToday(zoneAt(22))],
+ ['rest day', missedToday(eve, { week: {} })],
+ ['rest override today', missedToday(eve, { dayPlan: { [dateIn(eve)]: 'rest' } })],
+ ['workout logged today', missedToday(eve, { workouts: [{ id: 'w2', d: dateIn(eve), routineId: 'r1' }] })],
+ ['nudge off', missedToday(eve, { reminder: { on: true, time: '08:00', tz: eve, nudge: false } })],
+ ['reminder off', missedToday(eve, { reminder: { on: false, time: '08:00', tz: eve, nudge: true } })],
+ ['reminder too late for an evening nudge', missedToday(eve, { reminder: { on: true, time: '20:00', tz: eve, nudge: true } })],
+ ['back-off: 3 missed days in a row already', missedToday(eve, { workouts: [{ id: 'w0', d: daysAgo(eve, 4), routineId: 'r1' }] })],
+ ];
+ for (const [name, state] of cases) {
+ h.write(state);
+ await wait(700);
+ assert.equal(firings(h.log), 0, `${name}:\n${h.log}`);
+ }
+ assert.equal(h.db().users[0].lastNudge, undefined);
+ // …and the same server does fire once the day really is a missed one
+ h.write(missedToday(eve));
+ await until(() => firings(h.log) > 0);
+ assert.equal(firings(h.log), 1, h.log);
+});
+
+test('no push subscription, or a workout on screen right now: no nudge', async t => {
+ const tz = zoneAt(20);
+ const bare = await startServer(t, []);
+ bare.write(missedToday(tz));
+ await wait(1000);
+ assert.equal(firings(bare.log), 0, bare.log);
+
+ const h = await startServer(t);
+ const live = await fetch(`${h.api}/api/activity`, {
+ method: 'POST', headers: { Cookie: `gymsid=${mintSession(UID)}` },
+ body: JSON.stringify({ active: true, name: 'Push Day', startedAt: Date.now() })
+ });
+ assert.equal(live.status, 200);
+ h.write(missedToday(tz));
+ await wait(1000);
+ assert.equal(firings(h.log), 0, `a session is under way:\n${h.log}`);
+ // the session ends without a workout being saved: the nudge is owed again
+ await fetch(`${h.api}/api/activity`, { method: 'POST', headers: { Cookie: `gymsid=${mintSession(UID)}` }, body: JSON.stringify({ active: false }) });
+ await until(() => firings(h.log) > 0);
+ assert.equal(firings(h.log), 1, h.log);
+});
diff --git a/docs/MOBILE.md b/docs/MOBILE.md
index 5afe6f67c..19bf7c213 100644
--- a/docs/MOBILE.md
+++ b/docs/MOBILE.md
@@ -273,7 +273,10 @@ membership, the distribution certificate and profile as protected file variables
- The app requests notification permission when the workout-day reminder is switched on,
and again at the first rest if it is still unanswered. On Android it declares
`SCHEDULE_EXACT_ALARM` so the reminder fires to the minute where the user allows exact
- alarms (Android 14 no longer grants it at install). The rest countdown does not depend on
+ alarms (Android 14 no longer grants it at install). The opt-in missed-workout nudge is
+ scheduled the same way, beside the reminder: one notification on the evening (20:00–21:30) of
+ each upcoming planned day, at most 3 past the last workout, rescheduled whenever a workout is
+ logged. The rest countdown does not depend on
it: a foreground service (`specialUse`) keeps the countdown in the notification and holds a
wake lock until the end, so the end of a rest sounds on time with the screen locked; the
rest-over alarm is only its fallback.
diff --git a/docs/SELF_HOSTING.md b/docs/SELF_HOSTING.md
index 8e45a7698..8aa2a4305 100644
--- a/docs/SELF_HOSTING.md
+++ b/docs/SELF_HOSTING.md
@@ -563,6 +563,14 @@ first run and saved to `./data/vapid.json`, and each user's browser reports its
automatically when they turn the reminder on — it fires at their local time, and follows them if
they travel, regardless of what timezone the server itself runs in.
+Under the reminder there is an opt-in **missed-workout nudge** ("Nudge me when I skip a planned
+workout", with a tone: Friendly, Guilt trip or Drill sergeant). It is one push on the evening of a
+planned day with no workout logged: from 20:00 on the user's clock (or 2 hours after the reminder,
+if that is later) until 21:30, and not while a workout is on screen. A rest day never gets one, a
+coach week or rotation only counts the second day off in a row, and after 3 missed days in a row
+it goes quiet until the next workout is logged. Like the reminder it needs the push subscription
+and the reminder switched on; the text is localized from the user's app language.
+
Where it works: any desktop browser, Android Chrome, and on iOS only the app **added to the Home
Screen** (Safari in a tab has no Web Push). The Android APK's day reminder is a local
notification. Its rest timer is a local alarm: the notification shade shows the time left as a
diff --git a/frontend/src/lib/mobile.js b/frontend/src/lib/mobile.js
index b4deceec9..f452d602b 100644
--- a/frontend/src/lib/mobile.js
+++ b/frontend/src/lib/mobile.js
@@ -12,6 +12,7 @@
import { t, tn } from './i18n-core.js'
import { isoOf, todayISO } from './format.js'
import { effectiveRoutineIds } from './history.js'
+import { NUDGE_COPY, lineIndex, nudgeFor, nudgeMinute, toneOf } from './nudge.js'
export const MOBILE = import.meta.env.VITE_MOBILE === '1'
@@ -127,6 +128,45 @@ export function buildReminderNotifications(S, now = new Date()) {
return notifications
}
+// The missed-workout nudge (lib/nudge.js) as native notifications: one per future date that would
+// be a missed day if nothing gets logged before its evening. nudgeFor() reads only workouts up to
+// that date, so asking about tomorrow and the day after already applies the back-off of a break
+// that goes on — at most 3 of these are ever queued past the last workout. Logging a workout
+// resyncs (every persist does), which drops the day and resets the count.
+export const NUDGE_WINDOW_DAYS = 7
+const NUDGE_ID_BASE = 2000
+export function buildNudgeNotifications(S, now = new Date()) {
+ const r = S?.reminder
+ if (!r?.on || !r.nudge) return []
+ const at = nudgeMinute(r.time || '08:00')
+ if (at == null) return []
+ const routines = Array.isArray(S.routines) ? S.routines : []
+ const copy = NUDGE_COPY[toneOf(r)]
+ const date = new Date(now.getFullYear(), now.getMonth(), now.getDate(), 12)
+ const notifications = []
+ for (let offset = 0; offset < NUDGE_WINDOW_DAYS; offset++) {
+ const day = new Date(date)
+ day.setDate(date.getDate() + offset)
+ const iso = isoOf(day)
+ // a session on screen right now is today's workout in the making, not a miss
+ if (offset === 0 && S.active) continue
+ const ids = nudgeFor(S, iso)
+ if (!ids) continue
+ const names = ids.map(id => routines.find(x => x.id === id)?.name).filter(Boolean)
+ const label = names.length && names.length <= 2 ? names.join(' + ') : tn('{0} routine', '{0} routines', ids.length)
+ const when = new Date(day)
+ when.setHours(Math.floor(at / 60), at % 60, 0, 0)
+ if (when <= now) continue
+ notifications.push({
+ id: NUDGE_ID_BASE + offset,
+ title: t(copy.title),
+ body: t(copy.lines[lineIndex(iso, copy.lines.length)], label),
+ schedule: { at: when, allowWhileIdle: true },
+ })
+ }
+ return notifications
+}
+
// (Re)schedule the workout-day reminder: one one-off notification per future calendar date in
// the bounded window. Cheap enough to run after any state change — the plan or the reminder time
// may just have been edited. `interactive` gates the OS permission prompt to the Settings toggle;
@@ -137,13 +177,14 @@ export async function syncReminder(S, interactive = false) {
await LocalNotifications.cancel({ notifications: [
...LEGACY_REMINDER_IDS,
...Array.from({ length: REMINDER_WINDOW_DAYS }, (_, d) => ({ id: REMINDER_ID_BASE + d })),
+ ...Array.from({ length: NUDGE_WINDOW_DAYS }, (_, d) => ({ id: NUDGE_ID_BASE + d })),
] }).catch(() => {})
const r = S.reminder
if (!r?.on) return true
let perm = await LocalNotifications.checkPermissions()
if (perm.display !== 'granted' && interactive) perm = await LocalNotifications.requestPermissions()
if (perm.display !== 'granted') return false
- const notifications = buildReminderNotifications(S)
+ const notifications = [...buildReminderNotifications(S), ...buildNudgeNotifications(S)]
if (notifications.length) await LocalNotifications.schedule({ notifications })
return true
} catch (e) { return false }
diff --git a/frontend/src/lib/nudge.js b/frontend/src/lib/nudge.js
new file mode 100644
index 000000000..f34fecfd0
--- /dev/null
+++ b/frontend/src/lib/nudge.js
@@ -0,0 +1,115 @@
+// Missed-workout nudge — one playful notification on the evening of a planned day that went by
+// without a workout. Opt-in, under the workout-day reminder (S.reminder.nudge, S.reminder.tone).
+//
+// The self-hosted app sends it as a web push from the server (api/nudge.js, a hand copy of the
+// rules below, as api/queue.js is of lib/queue.js); the mobile build schedules it as a native
+// local notification (lib/mobile.js). Both answer the same three questions the same way:
+//
+// WHEN — at 20:00 on the user's clock, or 2 hours after the reminder when that is later, and
+// never after 21:30: a nudge is owed from that time until 21:30, once per day.
+// WHICH — a day is a MISSED day when it has a routine planned (the same plan the reminder
+// reads, coach week/rotation included) and no workout dated on it. A floating coach
+// week or rotation names a session every day until it is done, so on such a day the
+// day right after a workout is a rest day, not a miss — only the second day off in a
+// row counts.
+// HOW OFTEN — back-off: the missed days since the last workout are counted (14 days back at
+// most). After 3 of them the nudge goes quiet until the next workout is logged, so a
+// break never turns into a daily nag. No counter is stored anywhere: it is read off
+// the plan and the log, so the server and the phone agree without syncing anything.
+//
+// Copy: three tones, one title and four lines each. The line is chosen by the date, so a day
+// always gets the same one and consecutive days rotate. Keys are the English source strings;
+// api/nudge-copy.js carries the server's copy of their translations (a test keeps the two equal).
+import { isoOf } from './format.js'
+import { effectiveRoutineIds } from './history.js'
+import { queueLiveOn } from './queue.js'
+
+export const NUDGE_TONES = ['friendly', 'guilt', 'drill']
+export const NUDGE_MAX_MISSES = 3
+export const NUDGE_LOOKBACK_DAYS = 14
+const EVENING = 20 * 60, LATEST = 21 * 60 + 30, AFTER_REMINDER = 120
+
+export const NUDGE_COPY = {
+ friendly: {
+ title: 'Everything okay?',
+ lines: [
+ '{0} is still waiting. What’s up?',
+ 'No {0} today? Even a short session tomorrow counts.',
+ 'Rough day? {0} will keep. Tomorrow is a fresh start.',
+ 'Hey, {0} didn’t happen today. All good?',
+ ],
+ },
+ guilt: {
+ title: 'I miss you',
+ lines: [
+ '{0} waited by the door all evening. For you.',
+ 'The barbell asked about you today. I didn’t know what to say.',
+ 'Was it something I said? {0} misses you.',
+ 'I saved you a spot on the bench. It’s still empty.',
+ ],
+ },
+ drill: {
+ title: 'Attention, recruit!',
+ lines: [
+ 'Your gains are packing their bags. {0} tomorrow, no excuses!',
+ '{0} doesn’t do itself, recruit. Move it!',
+ 'Excuses don’t lift weights. Report for {0} tomorrow!',
+ 'Your muscles filed a missing-person report. Show up for {0}!',
+ ],
+ },
+}
+
+export const toneOf = r => (NUDGE_TONES.includes(r?.tone) ? r.tone : 'friendly')
+
+const hhmmToMin = v => {
+ const m = /^(\d{2}):(\d{2})$/.exec(v || '')
+ return m ? Number(m[1]) * 60 + Number(m[2]) : NaN
+}
+
+/** Minutes after midnight the nudge is owed from, or null when that would be after 21:30. */
+export function nudgeMinute(reminderTime) {
+ const r = hhmmToMin(reminderTime)
+ const at = Math.max(EVENING, Number.isNaN(r) ? 0 : r + AFTER_REMINDER)
+ return at > LATEST ? null : at
+}
+export const NUDGE_LATEST_MINUTE = LATEST
+
+const dayBefore = iso => { const d = new Date(iso + 'T12:00:00'); d.setDate(d.getDate() - 1); return isoOf(d) }
+const logged = (S, iso) => (S.workouts || []).some(w => w?.d === iso)
+const norm = S => ({
+ ...S,
+ routines: Array.isArray(S?.routines) ? S.routines.filter(Boolean) : [],
+ workouts: Array.isArray(S?.workouts) ? S.workouts.filter(Boolean) : [],
+ week: S?.week || {}, dayPlan: S?.dayPlan || {},
+})
+
+// The routine ids `iso` missed, or [] when it is not a missed day. Each date is asked as if it
+// were today, as the reminder does: a coach week's session is due every day until it is done.
+function missed(S, iso) {
+ if (logged(S, iso)) return []
+ const ids = effectiveRoutineIds(S, iso, iso)
+ if (!ids.length) return []
+ if (queueLiveOn(S, iso, iso) && logged(S, dayBefore(iso))) return []
+ return ids
+}
+
+/**
+ * The routine ids to nudge about on `iso`, or null: not a missed day, or already 3 missed days in
+ * a row since the last workout (back-off). Workouts dated after `iso` are not looked at, so the
+ * phone can ask about future dates and get the back-off of a break that simply goes on.
+ */
+export function nudgeFor(state, iso) {
+ const S = norm(state)
+ const ids = missed(S, iso)
+ if (!ids.length) return null
+ const last = S.workouts.reduce((m, w) => (typeof w.d === 'string' && w.d < iso && w.d > m ? w.d : m), '')
+ let misses = 0
+ let d = dayBefore(iso)
+ for (let i = 0; i < NUDGE_LOOKBACK_DAYS && d > last; i++, d = dayBefore(d)) {
+ if (missed(S, d).length && ++misses >= NUDGE_MAX_MISSES) return null
+ }
+ return ids
+}
+
+/** The day's line index: by date, so a day keeps its line and consecutive days rotate. */
+export const lineIndex = (iso, n) => Math.floor(Date.parse(iso + 'T00:00:00Z') / 86400000) % n
diff --git a/frontend/src/lib/nudge.test.js b/frontend/src/lib/nudge.test.js
new file mode 100644
index 000000000..ca129237f
--- /dev/null
+++ b/frontend/src/lib/nudge.test.js
@@ -0,0 +1,74 @@
+import { describe, expect, it } from 'vitest'
+import { NUDGE_COPY, NUDGE_TONES, lineIndex, nudgeFor, nudgeMinute, toneOf } from './nudge.js'
+import { buildNudgeNotifications } from './mobile.js'
+
+// The same rules as api/nudge.js (api/test/nudge.test.js holds the mirror of these cases):
+// a planned day with nothing logged is a miss; 3 misses in a row since the last workout and it
+// goes quiet. 2026-09-07 is a Monday; Push on Mon/Wed/Fri.
+const routines = [{ id: 'push', name: 'Push' }, { id: 'pull', name: 'Pull' }]
+const S = (over = {}) => ({
+ routines, week: { 1: 'push', 3: 'push', 5: 'push' }, dayPlan: {}, workouts: [],
+ reminder: { on: true, time: '08:00', nudge: true, tone: 'friendly' }, ...over,
+})
+const w = d => ({ id: 'w' + d, d, routineId: 'push' })
+
+describe('nudgeFor', () => {
+ it('nudges a missed planned day, not a rest day or a trained one', () => {
+ expect(nudgeFor(S({ workouts: [w('2026-09-04')] }), '2026-09-07')).toEqual(['push'])
+ expect(nudgeFor(S({ workouts: [w('2026-09-04')] }), '2026-09-08')).toBeNull()
+ expect(nudgeFor(S({ workouts: [w('2026-09-07')] }), '2026-09-07')).toBeNull()
+ expect(nudgeFor(S({ workouts: [w('2026-09-04')], dayPlan: { '2026-09-07': 'rest' } }), '2026-09-07')).toBeNull()
+ })
+
+ it('backs off after 3 missed days in a row until the next workout', () => {
+ const s = S({ workouts: [w('2026-09-04')] })
+ expect(['2026-09-07', '2026-09-09', '2026-09-11', '2026-09-14'].map(d => !!nudgeFor(s, d))).toEqual([true, true, true, false])
+ expect(nudgeFor(S({ workouts: [w('2026-09-04'), w('2026-09-15')] }), '2026-09-16')).toEqual(['push'])
+ })
+
+ it('in a coach week the day after a session is rest; the second day off is a miss', () => {
+ const queue = { ids: ['push', 'pull'], since: 0, startsOn: '2026-09-07' }
+ const s = S({ week: {}, queue, workouts: [{ id: 'a', d: '2026-09-07', routineId: 'push', start: 1 }] })
+ expect(nudgeFor(s, '2026-09-08')).toBeNull()
+ expect(nudgeFor(s, '2026-09-09')).toEqual(['pull'])
+ })
+
+ it('times the evening and reads the tone tolerantly', () => {
+ expect(nudgeMinute('08:00')).toBe(1200)
+ expect(nudgeMinute('19:15')).toBe(1275)
+ expect(nudgeMinute('20:00')).toBeNull()
+ expect(toneOf({ tone: 'guilt' })).toBe('guilt')
+ expect(toneOf({ tone: 'nope' })).toBe('friendly')
+ for (const k of NUDGE_TONES) expect(NUDGE_COPY[k].lines.length).toBeGreaterThanOrEqual(3)
+ })
+})
+
+describe('buildNudgeNotifications (mobile)', () => {
+ const now = new Date(2026, 8, 7, 12, 0) // Monday noon
+ it('schedules the evening of each upcoming missed day, at most 3 past the last workout', () => {
+ const n = buildNudgeNotifications(S({ workouts: [w('2026-09-04')] }), now)
+ expect(n.map(x => [x.schedule.at.getDate(), x.schedule.at.getHours(), x.schedule.at.getMinutes()]))
+ .toEqual([[7, 20, 0], [9, 20, 0], [11, 20, 0]])
+ expect(n[0].title).toBe(NUDGE_COPY.friendly.title)
+ expect(n[0].body).toBe(NUDGE_COPY.friendly.lines[lineIndex('2026-09-07', 4)].replace('{0}', 'Push'))
+ expect(new Set(n.map(x => x.id)).size).toBe(3)
+ })
+ it('is off unless both the reminder and the nudge are on', () => {
+ expect(buildNudgeNotifications(S({ reminder: { on: true, time: '08:00' } }), now)).toEqual([])
+ expect(buildNudgeNotifications(S({ reminder: { on: false, nudge: true } }), now)).toEqual([])
+ expect(buildNudgeNotifications(S({ workouts: [w('2026-09-04')], reminder: { on: true, nudge: true, time: '20:30' } }), now)).toEqual([])
+ })
+ it('skips today when it is trained, past its evening, or a session is on screen', () => {
+ const trained = buildNudgeNotifications(S({ workouts: [w('2026-09-07')] }), now)
+ expect(trained[0].schedule.at.getDate()).toBe(9)
+ const late = buildNudgeNotifications(S({ workouts: [w('2026-09-04')] }), new Date(2026, 8, 7, 21, 0))
+ expect(late[0].schedule.at.getDate()).toBe(9)
+ const live = buildNudgeNotifications(S({ workouts: [w('2026-09-04')], active: { rid: 'push' } }), now)
+ expect(live[0].schedule.at.getDate()).toBe(9)
+ })
+ it('takes the tone, and runs 2 hours after a late reminder', () => {
+ const n = buildNudgeNotifications(S({ workouts: [w('2026-09-04')], reminder: { on: true, time: '19:00', nudge: true, tone: 'drill' } }), now)
+ expect(n[0].title).toBe(NUDGE_COPY.drill.title)
+ expect([n[0].schedule.at.getHours(), n[0].schedule.at.getMinutes()]).toEqual([21, 0])
+ })
+})
diff --git a/frontend/src/lib/pt-br-locale.test.js b/frontend/src/lib/pt-br-locale.test.js
index e1cb538b9..6fc1e112b 100644
--- a/frontend/src/lib/pt-br-locale.test.js
+++ b/frontend/src/lib/pt-br-locale.test.js
@@ -41,7 +41,7 @@ describe('Brazilian Portuguese locale', () => {
// has to be taught is a number nobody reads. What the numbers stood for is asserted above.
// If the hash fails, review the changed keys and wording before accepting a new one. From
// frontend/: node scripts/pt-br-inheritance-fingerprint.mjs --list
- expect(fingerprint, 'pt-PT inheritance changed; review the inherited pt-BR wording').toBe('135c43ff734c243db89c050010b74ef031731e4d560492bc3b66db874bffb989')
+ expect(fingerprint, 'pt-PT inheritance changed; review the inherited pt-BR wording').toBe('89856def4b3d5e08b446d1cfb289f1b99fb39ef3788760ad1f9a9fbb57623164')
})
test('does not leak European Portuguese UI terms', () => {
diff --git a/frontend/src/locales/ar.js b/frontend/src/locales/ar.js
index 16eddc98d..4f556ca61 100644
--- a/frontend/src/locales/ar.js
+++ b/frontend/src/locales/ar.js
@@ -1833,4 +1833,26 @@ export default {
'This folder can’t be used for backups.': 'لا يمكن استخدام هذا المجلد للنسخ الاحتياطية.',
'openGym can no longer write to “{0}” — the copies go to Documents/openGym again. Choose the folder again to go back to it.': 'لم يعد بإمكان openGym الكتابة في «{0}» — تُحفظ النسخ في Documents/openGym من جديد. اختر المجلد مرة أخرى للعودة إليه.',
'openGym can no longer write to the chosen folder — the copies go to Documents/openGym again. Choose the folder again to go back to it.': 'لم يعد بإمكان openGym الكتابة في المجلد المختار — تُحفظ النسخ في Documents/openGym من جديد. اختر المجلد مرة أخرى للعودة إليه.',
+ // --- missed-workout nudge (lib/nudge.js; the push copy is mirrored in api/nudge-copy.js) ---
+ 'Nudge me when I skip a planned workout': 'نبّهني عندما أفوّت تمرينًا مخططًا',
+ 'Nudge tone': 'نبرة التنبيه',
+ 'Friendly': 'ودود',
+ 'Guilt trip': 'تأنيب الضمير',
+ 'Drill sergeant': 'رقيب التدريب',
+ 'One nudge in the evening of a planned day with nothing logged, between 20:00 and 21:30. After 3 missed days in a row it goes quiet until your next workout.': 'تنبيه واحد مساء يوم مخطط لم يُسجَّل فيه شيء، بين 20:00 و21:30. بعد 3 أيام فائتة متتالية يصمت حتى تمرينك التالي.',
+ 'Everything okay?': 'هل كل شيء على ما يرام؟',
+ '{0} is still waiting. What’s up?': '{0} ما زال ينتظرك. ما الأمر؟',
+ 'No {0} today? Even a short session tomorrow counts.': 'لا {0} اليوم؟ حتى جلسة قصيرة غدًا تُحسب.',
+ 'Rough day? {0} will keep. Tomorrow is a fresh start.': 'يوم صعب؟ {0} يمكنه الانتظار. غدًا بداية جديدة.',
+ 'Hey, {0} didn’t happen today. All good?': 'مرحبًا، لم يحدث {0} اليوم. هل كل شيء بخير؟',
+ 'I miss you': 'اشتقت إليك',
+ '{0} waited by the door all evening. For you.': '{0} انتظرك عند الباب طوال المساء. أنت بالذات.',
+ 'The barbell asked about you today. I didn’t know what to say.': 'سأل عنك البار اليوم. لم أعرف ماذا أقول.',
+ 'Was it something I said? {0} misses you.': 'هل قلت شيئًا أزعجك؟ {0} مشتاق إليك.',
+ 'I saved you a spot on the bench. It’s still empty.': 'حجزت لك مكانًا على المقعد. ما زال فارغًا.',
+ 'Attention, recruit!': 'انتباه أيها المجنّد!',
+ 'Your gains are packing their bags. {0} tomorrow, no excuses!': 'مكاسبك تحزم حقائبها. {0} غدًا، بلا أعذار!',
+ '{0} doesn’t do itself, recruit. Move it!': '{0} لن ينجز نفسه أيها المجنّد. تحرّك!',
+ 'Excuses don’t lift weights. Report for {0} tomorrow!': 'الأعذار لا ترفع الأوزان. احضر غدًا إلى {0}!',
+ 'Your muscles filed a missing-person report. Show up for {0}!': 'عضلاتك أبلغت عن فقدانك. احضر إلى {0}!',
}
diff --git a/frontend/src/locales/de.js b/frontend/src/locales/de.js
index 3f5de3961..93cc71a49 100644
--- a/frontend/src/locales/de.js
+++ b/frontend/src/locales/de.js
@@ -1800,4 +1800,26 @@ export default {
'This folder can’t be used for backups.': 'Dieser Ordner kann nicht für Backups verwendet werden.',
'openGym can no longer write to “{0}” — the copies go to Documents/openGym again. Choose the folder again to go back to it.': 'openGym kann nicht mehr in „{0}“ schreiben — die Kopien landen wieder in Documents/openGym. Wähle den Ordner erneut, um zu ihm zurückzukehren.',
'openGym can no longer write to the chosen folder — the copies go to Documents/openGym again. Choose the folder again to go back to it.': 'openGym kann nicht mehr in den gewählten Ordner schreiben — die Kopien landen wieder in Documents/openGym. Wähle den Ordner erneut, um zu ihm zurückzukehren.',
+ // --- missed-workout nudge (lib/nudge.js; the push copy is mirrored in api/nudge-copy.js) ---
+ 'Nudge me when I skip a planned workout': 'Stups mich an, wenn ich ein geplantes Training auslasse',
+ 'Nudge tone': 'Tonfall',
+ 'Friendly': 'Freundlich',
+ 'Guilt trip': 'Schlechtes Gewissen',
+ 'Drill sergeant': 'Drill-Sergeant',
+ 'One nudge in the evening of a planned day with nothing logged, between 20:00 and 21:30. After 3 missed days in a row it goes quiet until your next workout.': 'Ein Stups am Abend eines geplanten Tages ohne Eintrag, zwischen 20:00 und 21:30. Nach 3 verpassten Tagen in Folge ist Ruhe bis zu deinem nächsten Training.',
+ 'Everything okay?': 'Alles okay?',
+ '{0} is still waiting. What’s up?': '{0} wartet noch auf dich. Was ist los?',
+ 'No {0} today? Even a short session tomorrow counts.': 'Heute kein {0}? Auch eine kurze Einheit morgen zählt.',
+ 'Rough day? {0} will keep. Tomorrow is a fresh start.': 'Harter Tag? {0} läuft nicht weg. Morgen ist ein neuer Anfang.',
+ 'Hey, {0} didn’t happen today. All good?': 'Hey, {0} ist heute ausgefallen. Alles gut?',
+ 'I miss you': 'Ich vermisse dich',
+ '{0} waited by the door all evening. For you.': '{0} hat den ganzen Abend an der Tür gewartet. Auf dich.',
+ 'The barbell asked about you today. I didn’t know what to say.': 'Die Langhantel hat heute nach dir gefragt. Ich wusste nicht, was ich sagen soll.',
+ 'Was it something I said? {0} misses you.': 'War es etwas, das ich gesagt habe? {0} vermisst dich.',
+ 'I saved you a spot on the bench. It’s still empty.': 'Ich habe dir einen Platz auf der Bank freigehalten. Er ist immer noch leer.',
+ 'Attention, recruit!': 'Achtung, Rekrut!',
+ 'Your gains are packing their bags. {0} tomorrow, no excuses!': 'Deine Gains packen schon die Koffer. {0} morgen, keine Ausreden!',
+ '{0} doesn’t do itself, recruit. Move it!': '{0} macht sich nicht von allein, Rekrut. Bewegung!',
+ 'Excuses don’t lift weights. Report for {0} tomorrow!': 'Ausreden stemmen keine Gewichte. Morgen trittst du zu {0} an!',
+ 'Your muscles filed a missing-person report. Show up for {0}!': 'Deine Muskeln haben eine Vermisstenanzeige aufgegeben. Antreten zu {0}!',
}
diff --git a/frontend/src/locales/es.js b/frontend/src/locales/es.js
index 9eef4261a..a7c3cc433 100644
--- a/frontend/src/locales/es.js
+++ b/frontend/src/locales/es.js
@@ -1780,4 +1780,26 @@ export default {
'This folder can’t be used for backups.': 'Esta carpeta no se puede usar para las copias.',
'openGym can no longer write to “{0}” — the copies go to Documents/openGym again. Choose the folder again to go back to it.': 'openGym ya no puede escribir en «{0}»: las copias vuelven a Documents/openGym. Elige la carpeta otra vez para volver a usarla.',
'openGym can no longer write to the chosen folder — the copies go to Documents/openGym again. Choose the folder again to go back to it.': 'openGym ya no puede escribir en la carpeta elegida: las copias vuelven a Documents/openGym. Elige la carpeta otra vez para volver a usarla.',
+ // --- missed-workout nudge (lib/nudge.js; the push copy is mirrored in api/nudge-copy.js) ---
+ 'Nudge me when I skip a planned workout': 'Avísame cuando me salte un entrenamiento planificado',
+ 'Nudge tone': 'Tono del aviso',
+ 'Friendly': 'Amistoso',
+ 'Guilt trip': 'Chantaje emocional',
+ 'Drill sergeant': 'Sargento instructor',
+ 'One nudge in the evening of a planned day with nothing logged, between 20:00 and 21:30. After 3 missed days in a row it goes quiet until your next workout.': 'Un aviso por la noche de un día planificado sin nada registrado, entre las 20:00 y las 21:30. Tras 3 días seguidos sin entrenar, se calla hasta tu próximo entrenamiento.',
+ 'Everything okay?': '¿Todo bien?',
+ '{0} is still waiting. What’s up?': '{0} sigue esperando. ¿Qué pasa?',
+ 'No {0} today? Even a short session tomorrow counts.': '¿Hoy no hubo {0}? Mañana, hasta una sesión corta cuenta.',
+ 'Rough day? {0} will keep. Tomorrow is a fresh start.': '¿Día difícil? {0} puede esperar. Mañana empiezas de nuevo.',
+ 'Hey, {0} didn’t happen today. All good?': 'Oye, hoy no hubo {0}. ¿Todo bien?',
+ 'I miss you': 'Te echo de menos',
+ '{0} waited by the door all evening. For you.': '{0} te esperó en la puerta toda la tarde. A ti.',
+ 'The barbell asked about you today. I didn’t know what to say.': 'La barra preguntó por ti hoy. No supe qué decirle.',
+ 'Was it something I said? {0} misses you.': '¿Fue algo que dije? {0} te echa de menos.',
+ 'I saved you a spot on the bench. It’s still empty.': 'Te guardé un sitio en el banco. Sigue vacío.',
+ 'Attention, recruit!': '¡Atención, recluta!',
+ 'Your gains are packing their bags. {0} tomorrow, no excuses!': 'Tus ganancias están haciendo las maletas. ¡{0} mañana, sin excusas!',
+ '{0} doesn’t do itself, recruit. Move it!': '{0} no se hace solo, recluta. ¡Muévete!',
+ 'Excuses don’t lift weights. Report for {0} tomorrow!': 'Las excusas no levantan pesas. ¡Mañana te presentas a {0}!',
+ 'Your muscles filed a missing-person report. Show up for {0}!': 'Tus músculos pusieron una denuncia por desaparición. ¡Preséntate a {0}!',
}
diff --git a/frontend/src/locales/fr.js b/frontend/src/locales/fr.js
index cead0e98e..7b592e845 100644
--- a/frontend/src/locales/fr.js
+++ b/frontend/src/locales/fr.js
@@ -1780,4 +1780,26 @@ export default {
'This folder can’t be used for backups.': 'Ce dossier ne peut pas servir aux sauvegardes.',
'openGym can no longer write to “{0}” — the copies go to Documents/openGym again. Choose the folder again to go back to it.': 'openGym ne peut plus écrire dans « {0} » — les copies vont de nouveau dans Documents/openGym. Choisis à nouveau le dossier pour y revenir.',
'openGym can no longer write to the chosen folder — the copies go to Documents/openGym again. Choose the folder again to go back to it.': 'openGym ne peut plus écrire dans le dossier choisi — les copies vont de nouveau dans Documents/openGym. Choisis à nouveau le dossier pour y revenir.',
+ // --- missed-workout nudge (lib/nudge.js; the push copy is mirrored in api/nudge-copy.js) ---
+ 'Nudge me when I skip a planned workout': 'Me relancer quand je saute un entraînement prévu',
+ 'Nudge tone': 'Ton de la relance',
+ 'Friendly': 'Amical',
+ 'Guilt trip': 'Culpabilisant',
+ 'Drill sergeant': 'Sergent instructeur',
+ 'One nudge in the evening of a planned day with nothing logged, between 20:00 and 21:30. After 3 missed days in a row it goes quiet until your next workout.': 'Une relance le soir d’un jour prévu sans séance enregistrée, entre 20:00 et 21:30. Après 3 jours manqués d’affilée, elle se tait jusqu’à votre prochaine séance.',
+ 'Everything okay?': 'Tout va bien ?',
+ '{0} is still waiting. What’s up?': '{0} vous attend toujours. Que se passe-t-il ?',
+ 'No {0} today? Even a short session tomorrow counts.': 'Pas de {0} aujourd’hui ? Même une courte séance demain compte.',
+ 'Rough day? {0} will keep. Tomorrow is a fresh start.': 'Journée difficile ? {0} peut attendre. Demain est un nouveau départ.',
+ 'Hey, {0} didn’t happen today. All good?': 'Hé, {0} n’a pas eu lieu aujourd’hui. Tout va bien ?',
+ 'I miss you': 'Vous me manquez',
+ '{0} waited by the door all evening. For you.': '{0} vous a attendu à la porte toute la soirée. Vous.',
+ 'The barbell asked about you today. I didn’t know what to say.': 'La barre a demandé de vos nouvelles aujourd’hui. Je n’ai pas su quoi lui dire.',
+ 'Was it something I said? {0} misses you.': 'C’est quelque chose que j’ai dit ? {0} s’ennuie de vous.',
+ 'I saved you a spot on the bench. It’s still empty.': 'Je vous ai gardé une place sur le banc. Elle est toujours vide.',
+ 'Attention, recruit!': 'Garde-à-vous, recrue !',
+ 'Your gains are packing their bags. {0} tomorrow, no excuses!': 'Vos gains font leurs valises. {0} demain, sans excuses !',
+ '{0} doesn’t do itself, recruit. Move it!': '{0} ne va pas se faire tout seul, recrue. Au pas de course !',
+ 'Excuses don’t lift weights. Report for {0} tomorrow!': 'Les excuses ne soulèvent pas de poids. Présentez-vous demain pour {0} !',
+ 'Your muscles filed a missing-person report. Show up for {0}!': 'Vos muscles ont signalé votre disparition. Présentez-vous pour {0} !',
}
diff --git a/frontend/src/locales/hi.js b/frontend/src/locales/hi.js
index 277d07b33..2b91e5028 100644
--- a/frontend/src/locales/hi.js
+++ b/frontend/src/locales/hi.js
@@ -1780,4 +1780,26 @@ export default {
'This folder can’t be used for backups.': 'इस फ़ोल्डर को बैकअप के लिए इस्तेमाल नहीं किया जा सकता।',
'openGym can no longer write to “{0}” — the copies go to Documents/openGym again. Choose the folder again to go back to it.': 'openGym अब “{0}” में नहीं लिख सकता — कॉपियाँ फिर से Documents/openGym में जाती हैं। उसमें वापस जाने के लिए फ़ोल्डर फिर से चुनें।',
'openGym can no longer write to the chosen folder — the copies go to Documents/openGym again. Choose the folder again to go back to it.': 'openGym अब चुने गए फ़ोल्डर में नहीं लिख सकता — कॉपियाँ फिर से Documents/openGym में जाती हैं। उसमें वापस जाने के लिए फ़ोल्डर फिर से चुनें।',
+ // --- missed-workout nudge (lib/nudge.js; the push copy is mirrored in api/nudge-copy.js) ---
+ 'Nudge me when I skip a planned workout': 'जब मैं प्लान किया हुआ वर्कआउट छोड़ूँ तो मुझे याद दिलाएँ',
+ 'Nudge tone': 'संदेश का अंदाज़',
+ 'Friendly': 'दोस्ताना',
+ 'Guilt trip': 'भावुक ताना',
+ 'Drill sergeant': 'ड्रिल सार्जेंट',
+ 'One nudge in the evening of a planned day with nothing logged, between 20:00 and 21:30. After 3 missed days in a row it goes quiet until your next workout.': 'प्लान किए गए दिन, जब कुछ दर्ज न हो, शाम 20:00 से 21:30 के बीच एक संदेश। लगातार 3 दिन छूटने के बाद यह आपके अगले वर्कआउट तक चुप रहता है।',
+ 'Everything okay?': 'सब ठीक है?',
+ '{0} is still waiting. What’s up?': '{0} अब भी इंतज़ार कर रहा है। क्या हुआ?',
+ 'No {0} today? Even a short session tomorrow counts.': 'आज {0} नहीं हुआ? कल एक छोटा सेशन भी गिना जाएगा।',
+ 'Rough day? {0} will keep. Tomorrow is a fresh start.': 'मुश्किल दिन था? {0} इंतज़ार कर लेगा। कल नई शुरुआत है।',
+ 'Hey, {0} didn’t happen today. All good?': 'अरे, आज {0} नहीं हुआ। सब ठीक है?',
+ 'I miss you': 'आपकी याद आ रही है',
+ '{0} waited by the door all evening. For you.': '{0} पूरी शाम दरवाज़े पर आपका इंतज़ार करता रहा।',
+ 'The barbell asked about you today. I didn’t know what to say.': 'आज बारबेल ने आपके बारे में पूछा। मुझे समझ नहीं आया क्या कहूँ।',
+ 'Was it something I said? {0} misses you.': 'क्या मैंने कुछ गलत कहा? {0} को आपकी याद आ रही है।',
+ 'I saved you a spot on the bench. It’s still empty.': 'मैंने बेंच पर आपके लिए जगह रखी थी। वह अब भी खाली है।',
+ 'Attention, recruit!': 'सावधान, रंगरूट!',
+ 'Your gains are packing their bags. {0} tomorrow, no excuses!': 'आपके गेन्स बोरिया-बिस्तर बाँध रहे हैं। कल {0}, कोई बहाना नहीं!',
+ '{0} doesn’t do itself, recruit. Move it!': '{0} अपने आप नहीं होगा, रंगरूट। चलो, हिलो!',
+ 'Excuses don’t lift weights. Report for {0} tomorrow!': 'बहाने वज़न नहीं उठाते। कल {0} के लिए हाज़िर हो!',
+ 'Your muscles filed a missing-person report. Show up for {0}!': 'आपकी मांसपेशियों ने गुमशुदगी की रिपोर्ट लिखाई है। {0} के लिए हाज़िर हो!',
}
diff --git a/frontend/src/locales/hu.js b/frontend/src/locales/hu.js
index 35cf2b643..a0a81e317 100644
--- a/frontend/src/locales/hu.js
+++ b/frontend/src/locales/hu.js
@@ -1783,4 +1783,26 @@ export default {
'This folder can’t be used for backups.': 'Ez a mappa nem használható mentésekhez.',
'openGym can no longer write to “{0}” — the copies go to Documents/openGym again. Choose the folder again to go back to it.': 'Az openGym már nem tud írni ide: „{0}” — a másolatok ismét a Documents/openGym mappába kerülnek. Válaszd ki újra a mappát, hogy visszatérj hozzá.',
'openGym can no longer write to the chosen folder — the copies go to Documents/openGym again. Choose the folder again to go back to it.': 'Az openGym már nem tud írni a választott mappába — a másolatok ismét a Documents/openGym mappába kerülnek. Válaszd ki újra a mappát, hogy visszatérj hozzá.',
+ // --- missed-workout nudge (lib/nudge.js; the push copy is mirrored in api/nudge-copy.js) ---
+ 'Nudge me when I skip a planned workout': 'Bökj meg, ha kihagyok egy tervezett edzést',
+ 'Nudge tone': 'Bökés hangneme',
+ 'Friendly': 'Barátságos',
+ 'Guilt trip': 'Lelkiismeret-furdalás',
+ 'Drill sergeant': 'Kiképző őrmester',
+ 'One nudge in the evening of a planned day with nothing logged, between 20:00 and 21:30. After 3 missed days in a row it goes quiet until your next workout.': 'Egy bökés egy tervezett nap estéjén, ha nincs rögzítve semmi, 20:00 és 21:30 között. 3 egymás után kihagyott nap után elhallgat a következő edzésedig.',
+ 'Everything okay?': 'Minden rendben?',
+ '{0} is still waiting. What’s up?': 'A(z) {0} még mindig vár. Mi a helyzet?',
+ 'No {0} today? Even a short session tomorrow counts.': 'Ma nem volt {0}? Holnap egy rövid edzés is számít.',
+ 'Rough day? {0} will keep. Tomorrow is a fresh start.': 'Nehéz nap? A(z) {0} megvár. Holnap új kezdet.',
+ 'Hey, {0} didn’t happen today. All good?': 'Hé, ma elmaradt a(z) {0}. Minden oké?',
+ 'I miss you': 'Hiányzol',
+ '{0} waited by the door all evening. For you.': 'A(z) {0} egész este az ajtóban várt. Rád.',
+ 'The barbell asked about you today. I didn’t know what to say.': 'A rúd ma rólad kérdezett. Nem tudtam, mit mondjak.',
+ 'Was it something I said? {0} misses you.': 'Valami rosszat mondtam? A(z) {0} hiányol téged.',
+ 'I saved you a spot on the bench. It’s still empty.': 'Foglaltam neked helyet a padon. Még mindig üres.',
+ 'Attention, recruit!': 'Vigyázz, újonc!',
+ 'Your gains are packing their bags. {0} tomorrow, no excuses!': 'Az eredményeid már pakolnak. Holnap {0}, nincs kifogás!',
+ '{0} doesn’t do itself, recruit. Move it!': 'A(z) {0} nem csinálja meg magát, újonc. Mozgás!',
+ 'Excuses don’t lift weights. Report for {0} tomorrow!': 'A kifogások nem emelnek súlyt. Holnap jelentkezel: {0}!',
+ 'Your muscles filed a missing-person report. Show up for {0}!': 'Az izmaid eltűntként jelentettek. Jelentkezz: {0}!',
}
diff --git a/frontend/src/locales/it.js b/frontend/src/locales/it.js
index d847be0dd..de4a9fceb 100644
--- a/frontend/src/locales/it.js
+++ b/frontend/src/locales/it.js
@@ -1780,4 +1780,26 @@ export default {
'This folder can’t be used for backups.': 'Questa cartella non si può usare per i backup.',
'openGym can no longer write to “{0}” — the copies go to Documents/openGym again. Choose the folder again to go back to it.': 'openGym non può più scrivere in «{0}»: le copie tornano in Documents/openGym. Scegli di nuovo la cartella per tornarci.',
'openGym can no longer write to the chosen folder — the copies go to Documents/openGym again. Choose the folder again to go back to it.': 'openGym non può più scrivere nella cartella scelta: le copie tornano in Documents/openGym. Scegli di nuovo la cartella per tornarci.',
+ // --- missed-workout nudge (lib/nudge.js; the push copy is mirrored in api/nudge-copy.js) ---
+ 'Nudge me when I skip a planned workout': 'Avvisami quando salto un allenamento pianificato',
+ 'Nudge tone': 'Tono dell’avviso',
+ 'Friendly': 'Amichevole',
+ 'Guilt trip': 'Senso di colpa',
+ 'Drill sergeant': 'Sergente istruttore',
+ 'One nudge in the evening of a planned day with nothing logged, between 20:00 and 21:30. After 3 missed days in a row it goes quiet until your next workout.': 'Un avviso la sera di un giorno pianificato senza niente registrato, tra le 20:00 e le 21:30. Dopo 3 giorni saltati di fila tace fino al tuo prossimo allenamento.',
+ 'Everything okay?': 'Tutto bene?',
+ '{0} is still waiting. What’s up?': '{0} ti sta ancora aspettando. Che succede?',
+ 'No {0} today? Even a short session tomorrow counts.': 'Niente {0} oggi? Anche una sessione breve domani conta.',
+ 'Rough day? {0} will keep. Tomorrow is a fresh start.': 'Giornata dura? {0} può aspettare. Domani si ricomincia.',
+ 'Hey, {0} didn’t happen today. All good?': 'Ehi, oggi {0} è saltato. Tutto a posto?',
+ 'I miss you': 'Mi manchi',
+ '{0} waited by the door all evening. For you.': '{0} ti ha aspettato alla porta tutta la sera. Proprio te.',
+ 'The barbell asked about you today. I didn’t know what to say.': 'Il bilanciere oggi ha chiesto di te. Non sapevo cosa dirgli.',
+ 'Was it something I said? {0} misses you.': 'Ho detto qualcosa di sbagliato? {0} sente la tua mancanza.',
+ 'I saved you a spot on the bench. It’s still empty.': 'Ti ho tenuto un posto sulla panca. È ancora vuoto.',
+ 'Attention, recruit!': 'Attenti, recluta!',
+ 'Your gains are packing their bags. {0} tomorrow, no excuses!': 'I tuoi progressi stanno facendo le valigie. {0} domani, niente scuse!',
+ '{0} doesn’t do itself, recruit. Move it!': '{0} non si fa da solo, recluta. Muoviti!',
+ 'Excuses don’t lift weights. Report for {0} tomorrow!': 'Le scuse non sollevano pesi. Domani ti presenti a {0}!',
+ 'Your muscles filed a missing-person report. Show up for {0}!': 'I tuoi muscoli hanno denunciato la tua scomparsa. Presentati a {0}!',
}
diff --git a/frontend/src/locales/ko.js b/frontend/src/locales/ko.js
index 4e75598e6..1738eb3f3 100644
--- a/frontend/src/locales/ko.js
+++ b/frontend/src/locales/ko.js
@@ -1780,4 +1780,26 @@ export default {
'This folder can’t be used for backups.': '이 폴더는 백업에 사용할 수 없습니다.',
'openGym can no longer write to “{0}” — the copies go to Documents/openGym again. Choose the folder again to go back to it.': 'openGym이 더 이상 “{0}”에 쓸 수 없습니다 — 사본은 다시 Documents/openGym에 저장됩니다. 그 폴더로 돌아가려면 다시 선택하세요.',
'openGym can no longer write to the chosen folder — the copies go to Documents/openGym again. Choose the folder again to go back to it.': 'openGym이 더 이상 선택한 폴더에 쓸 수 없습니다 — 사본은 다시 Documents/openGym에 저장됩니다. 그 폴더로 돌아가려면 다시 선택하세요.',
+ // --- missed-workout nudge (lib/nudge.js; the push copy is mirrored in api/nudge-copy.js) ---
+ 'Nudge me when I skip a planned workout': '계획된 운동을 건너뛰면 알려 주기',
+ 'Nudge tone': '알림 말투',
+ 'Friendly': '다정하게',
+ 'Guilt trip': '죄책감 자극',
+ 'Drill sergeant': '훈련 교관',
+ 'One nudge in the evening of a planned day with nothing logged, between 20:00 and 21:30. After 3 missed days in a row it goes quiet until your next workout.': '계획된 날에 기록이 없으면 저녁 20:00~21:30 사이에 한 번 알려 드립니다. 3일 연속으로 건너뛰면 다음 운동까지 조용히 있습니다.',
+ 'Everything okay?': '괜찮으세요?',
+ '{0} is still waiting. What’s up?': '{0}이(가) 아직 기다리고 있어요. 무슨 일 있어요?',
+ 'No {0} today? Even a short session tomorrow counts.': '오늘은 {0} 안 했나요? 내일은 짧게라도 하면 돼요.',
+ 'Rough day? {0} will keep. Tomorrow is a fresh start.': '힘든 하루였나요? {0}은(는) 기다려 줄 거예요. 내일 다시 시작해요.',
+ 'Hey, {0} didn’t happen today. All good?': '저기요, 오늘 {0}을(를) 못 했네요. 괜찮아요?',
+ 'I miss you': '보고 싶어요',
+ '{0} waited by the door all evening. For you.': '{0}이(가) 저녁 내내 문 앞에서 기다렸어요. 당신을요.',
+ 'The barbell asked about you today. I didn’t know what to say.': '오늘 바벨이 당신 안부를 물었어요. 뭐라고 해야 할지 몰랐어요.',
+ 'Was it something I said? {0} misses you.': '제가 뭐 잘못 말했나요? {0}이(가) 당신을 보고 싶어 해요.',
+ 'I saved you a spot on the bench. It’s still empty.': '벤치에 자리를 맡아 뒀어요. 아직 비어 있어요.',
+ 'Attention, recruit!': '차렷, 훈련병!',
+ 'Your gains are packing their bags. {0} tomorrow, no excuses!': '근손실이 짐을 싸고 있다. 내일 {0}, 핑계는 없다!',
+ '{0} doesn’t do itself, recruit. Move it!': '{0}은(는) 저절로 되지 않는다, 훈련병. 움직여!',
+ 'Excuses don’t lift weights. Report for {0} tomorrow!': '핑계는 무게를 들지 않는다. 내일 {0}에 집합!',
+ 'Your muscles filed a missing-person report. Show up for {0}!': '근육들이 실종 신고를 냈다. {0}에 출석하라!',
}
diff --git a/frontend/src/locales/pl.js b/frontend/src/locales/pl.js
index ca2f81c61..c8649fa60 100644
--- a/frontend/src/locales/pl.js
+++ b/frontend/src/locales/pl.js
@@ -1780,4 +1780,26 @@ export default {
'This folder can’t be used for backups.': 'Tego folderu nie można użyć do kopii zapasowych.',
'openGym can no longer write to “{0}” — the copies go to Documents/openGym again. Choose the folder again to go back to it.': 'openGym nie może już zapisywać w „{0}” — kopie znów trafiają do Documents/openGym. Wybierz folder ponownie, aby do niego wrócić.',
'openGym can no longer write to the chosen folder — the copies go to Documents/openGym again. Choose the folder again to go back to it.': 'openGym nie może już zapisywać w wybranym folderze — kopie znów trafiają do Documents/openGym. Wybierz folder ponownie, aby do niego wrócić.',
+ // --- missed-workout nudge (lib/nudge.js; the push copy is mirrored in api/nudge-copy.js) ---
+ 'Nudge me when I skip a planned workout': 'Szturchnij mnie, gdy opuszczę zaplanowany trening',
+ 'Nudge tone': 'Ton szturchnięcia',
+ 'Friendly': 'Przyjazny',
+ 'Guilt trip': 'Wyrzuty sumienia',
+ 'Drill sergeant': 'Sierżant musztry',
+ 'One nudge in the evening of a planned day with nothing logged, between 20:00 and 21:30. After 3 missed days in a row it goes quiet until your next workout.': 'Jedno szturchnięcie wieczorem w zaplanowany dzień bez zapisanego treningu, między 20:00 a 21:30. Po 3 opuszczonych dniach z rzędu milknie aż do twojego następnego treningu.',
+ 'Everything okay?': 'Wszystko w porządku?',
+ '{0} is still waiting. What’s up?': 'Trening „{0}” wciąż czeka. Co się dzieje?',
+ 'No {0} today? Even a short session tomorrow counts.': 'Dziś bez treningu „{0}”? Jutro nawet krótka sesja się liczy.',
+ 'Rough day? {0} will keep. Tomorrow is a fresh start.': 'Ciężki dzień? Trening „{0}” poczeka. Jutro nowy start.',
+ 'Hey, {0} didn’t happen today. All good?': 'Hej, trening „{0}” dziś nie wyszedł. Wszystko dobrze?',
+ 'I miss you': 'Tęsknię za tobą',
+ '{0} waited by the door all evening. For you.': 'Trening „{0}” czekał na ciebie przy drzwiach cały wieczór. Właśnie na ciebie.',
+ 'The barbell asked about you today. I didn’t know what to say.': 'Sztanga pytała dziś o ciebie. Nie wiedziałem, co powiedzieć.',
+ 'Was it something I said? {0} misses you.': 'Czy to przez coś, co powiedziałem? Trening „{0}” tęskni za tobą.',
+ 'I saved you a spot on the bench. It’s still empty.': 'Zająłem ci miejsce na ławce. Wciąż jest puste.',
+ 'Attention, recruit!': 'Baczność, rekrucie!',
+ 'Your gains are packing their bags. {0} tomorrow, no excuses!': 'Twoje postępy pakują walizki. Jutro „{0}”, bez wymówek!',
+ '{0} doesn’t do itself, recruit. Move it!': 'Trening „{0}” sam się nie zrobi, rekrucie. Ruszaj się!',
+ 'Excuses don’t lift weights. Report for {0} tomorrow!': 'Wymówki nie podnoszą ciężarów. Jutro meldujesz się na „{0}”!',
+ 'Your muscles filed a missing-person report. Show up for {0}!': 'Twoje mięśnie zgłosiły twoje zaginięcie. Stawić się na „{0}”!',
}
diff --git a/frontend/src/locales/pt-BR.js b/frontend/src/locales/pt-BR.js
index d2eb06e0e..b869f4104 100644
--- a/frontend/src/locales/pt-BR.js
+++ b/frontend/src/locales/pt-BR.js
@@ -1093,6 +1093,21 @@ export const PT_BR_OVERRIDES = {
'This folder can’t be used for backups.': 'Esta pasta não pode ser usada para backups.',
'openGym can no longer write to “{0}” — the copies go to Documents/openGym again. Choose the folder again to go back to it.': 'O openGym não consegue mais gravar em “{0}” — as cópias voltam para Documents/openGym. Escolha a pasta de novo para voltar a ela.',
'openGym can no longer write to the chosen folder — the copies go to Documents/openGym again. Choose the folder again to go back to it.': 'O openGym não consegue mais gravar na pasta escolhida — as cópias voltam para Documents/openGym. Escolha a pasta de novo para voltar a ela.',
+ // --- missed-workout nudge (lib/nudge.js; the push copy is mirrored in api/nudge-copy.js) ---
+ 'Nudge me when I skip a planned workout': 'Me avise quando eu pular um treino planejado',
+ 'One nudge in the evening of a planned day with nothing logged, between 20:00 and 21:30. After 3 missed days in a row it goes quiet until your next workout.': 'Um aviso à noite em um dia planejado sem nada registrado, entre 20:00 e 21:30. Depois de 3 dias perdidos seguidos ele fica quieto até o seu próximo treino.',
+ '{0} is still waiting. What’s up?': '{0} ainda está esperando você. E aí?',
+ 'No {0} today? Even a short session tomorrow counts.': 'Hoje não teve {0}? Amanhã até um treino curto conta.',
+ 'Hey, {0} didn’t happen today. All good?': 'Ei, hoje não teve {0}. Tudo certo?',
+ 'I miss you': 'Estou com saudade de você',
+ '{0} waited by the door all evening. For you.': '{0} esperou você na porta a noite toda. Você.',
+ 'The barbell asked about you today. I didn’t know what to say.': 'A barra perguntou de você hoje. Não soube o que dizer.',
+ 'Was it something I said? {0} misses you.': 'Foi alguma coisa que eu disse? {0} está com saudade de você.',
+ 'I saved you a spot on the bench. It’s still empty.': 'Guardei um lugar no banco para você. Continua vazio.',
+ 'Your gains are packing their bags. {0} tomorrow, no excuses!': 'Seus ganhos estão fazendo as malas. {0} amanhã, sem desculpas!',
+ '{0} doesn’t do itself, recruit. Move it!': '{0} não se faz sozinho, recruta. Mexa-se!',
+ 'Excuses don’t lift weights. Report for {0} tomorrow!': 'Desculpa não levanta peso. Amanhã você se apresenta para {0}!',
+ 'Your muscles filed a missing-person report. Show up for {0}!': 'Seus músculos registraram seu desaparecimento. Apresente-se para {0}!',
}
export default { ...pt, ...PT_BR_OVERRIDES }
diff --git a/frontend/src/locales/pt.js b/frontend/src/locales/pt.js
index 933e1f082..16c53e5dd 100644
--- a/frontend/src/locales/pt.js
+++ b/frontend/src/locales/pt.js
@@ -1780,4 +1780,26 @@ export default {
'This folder can’t be used for backups.': 'Esta pasta não pode ser usada para cópias de segurança.',
'openGym can no longer write to “{0}” — the copies go to Documents/openGym again. Choose the folder again to go back to it.': 'O openGym já não consegue escrever em «{0}» — as cópias voltam a ir para Documents/openGym. Escolhe a pasta de novo para voltar a ela.',
'openGym can no longer write to the chosen folder — the copies go to Documents/openGym again. Choose the folder again to go back to it.': 'O openGym já não consegue escrever na pasta escolhida — as cópias voltam a ir para Documents/openGym. Escolhe a pasta de novo para voltar a ela.',
+ // --- missed-workout nudge (lib/nudge.js; the push copy is mirrored in api/nudge-copy.js) ---
+ 'Nudge me when I skip a planned workout': 'Avisa-me quando eu falhar um treino planeado',
+ 'Nudge tone': 'Tom do aviso',
+ 'Friendly': 'Amigável',
+ 'Guilt trip': 'Chantagem emocional',
+ 'Drill sergeant': 'Sargento instrutor',
+ 'One nudge in the evening of a planned day with nothing logged, between 20:00 and 21:30. After 3 missed days in a row it goes quiet until your next workout.': 'Um aviso à noite num dia planeado sem nada registado, entre as 20:00 e as 21:30. Depois de 3 dias falhados seguidos fica calado até ao teu próximo treino.',
+ 'Everything okay?': 'Está tudo bem?',
+ '{0} is still waiting. What’s up?': '{0} ainda está à tua espera. Então?',
+ 'No {0} today? Even a short session tomorrow counts.': 'Hoje não houve {0}? Amanhã até um treino curto conta.',
+ 'Rough day? {0} will keep. Tomorrow is a fresh start.': 'Dia difícil? {0} pode esperar. Amanhã é um novo começo.',
+ 'Hey, {0} didn’t happen today. All good?': 'Olha, hoje não houve {0}. Está tudo bem?',
+ 'I miss you': 'Tenho saudades tuas',
+ '{0} waited by the door all evening. For you.': '{0} esperou por ti à porta a noite toda. Por ti.',
+ 'The barbell asked about you today. I didn’t know what to say.': 'A barra perguntou por ti hoje. Não soube o que lhe dizer.',
+ 'Was it something I said? {0} misses you.': 'Foi alguma coisa que eu disse? {0} tem saudades tuas.',
+ 'I saved you a spot on the bench. It’s still empty.': 'Guardei-te um lugar no banco. Continua vazio.',
+ 'Attention, recruit!': 'Sentido, recruta!',
+ 'Your gains are packing their bags. {0} tomorrow, no excuses!': 'Os teus ganhos estão a fazer as malas. {0} amanhã, sem desculpas!',
+ '{0} doesn’t do itself, recruit. Move it!': '{0} não se faz sozinho, recruta. Mexe-te!',
+ 'Excuses don’t lift weights. Report for {0} tomorrow!': 'Desculpas não levantam pesos. Amanhã apresentas-te para {0}!',
+ 'Your muscles filed a missing-person report. Show up for {0}!': 'Os teus músculos deram-te como desaparecido. Apresenta-te para {0}!',
}
diff --git a/frontend/src/locales/ru.js b/frontend/src/locales/ru.js
index 18b1398d1..592b68d5b 100644
--- a/frontend/src/locales/ru.js
+++ b/frontend/src/locales/ru.js
@@ -1784,4 +1784,26 @@ export default {
'This folder can’t be used for backups.': 'Эту папку нельзя использовать для резервных копий.',
'openGym can no longer write to “{0}” — the copies go to Documents/openGym again. Choose the folder again to go back to it.': 'openGym больше не может записывать в «{0}» — копии снова сохраняются в Documents/openGym. Выбери папку заново, чтобы вернуться к ней.',
'openGym can no longer write to the chosen folder — the copies go to Documents/openGym again. Choose the folder again to go back to it.': 'openGym больше не может записывать в выбранную папку — копии снова сохраняются в Documents/openGym. Выбери папку заново, чтобы вернуться к ней.',
+ // --- missed-workout nudge (lib/nudge.js; the push copy is mirrored in api/nudge-copy.js) ---
+ 'Nudge me when I skip a planned workout': 'Напоминать, если я пропускаю запланированную тренировку',
+ 'Nudge tone': 'Тон напоминания',
+ 'Friendly': 'Дружелюбный',
+ 'Guilt trip': 'Давить на совесть',
+ 'Drill sergeant': 'Сержант-инструктор',
+ 'One nudge in the evening of a planned day with nothing logged, between 20:00 and 21:30. After 3 missed days in a row it goes quiet until your next workout.': 'Одно напоминание вечером запланированного дня без записанной тренировки, с 20:00 до 21:30. После 3 пропущенных дней подряд оно замолкает до вашей следующей тренировки.',
+ 'Everything okay?': 'Всё в порядке?',
+ '{0} is still waiting. What’s up?': 'Тренировка «{0}» всё ещё ждёт. Что случилось?',
+ 'No {0} today? Even a short session tomorrow counts.': 'Сегодня без тренировки «{0}»? Завтра засчитается даже короткая.',
+ 'Rough day? {0} will keep. Tomorrow is a fresh start.': 'Тяжёлый день? Тренировка «{0}» подождёт. Завтра — новый старт.',
+ 'Hey, {0} didn’t happen today. All good?': 'Эй, тренировка «{0}» сегодня не состоялась. Всё хорошо?',
+ 'I miss you': 'Я скучаю по вам',
+ '{0} waited by the door all evening. For you.': 'Тренировка «{0}» весь вечер ждала вас у двери. Именно вас.',
+ 'The barbell asked about you today. I didn’t know what to say.': 'Штанга сегодня спрашивала о вас. Я не знал, что ответить.',
+ 'Was it something I said? {0} misses you.': 'Я что-то не то сказал? Тренировка «{0}» скучает по вам.',
+ 'I saved you a spot on the bench. It’s still empty.': 'Я занял вам место на скамье. Оно всё ещё пустое.',
+ 'Attention, recruit!': 'Смирно, новобранец!',
+ 'Your gains are packing their bags. {0} tomorrow, no excuses!': 'Ваши достижения пакуют чемоданы. Завтра «{0}», без отговорок!',
+ '{0} doesn’t do itself, recruit. Move it!': 'Тренировка «{0}» сама себя не сделает, новобранец. Шевелитесь!',
+ 'Excuses don’t lift weights. Report for {0} tomorrow!': 'Отговорки не поднимают веса. Завтра явиться на «{0}»!',
+ 'Your muscles filed a missing-person report. Show up for {0}!': 'Ваши мышцы подали заявление о пропаже. Явиться на «{0}»!',
}
diff --git a/frontend/src/locales/th.js b/frontend/src/locales/th.js
index ef3f48a94..9fa60cfa8 100644
--- a/frontend/src/locales/th.js
+++ b/frontend/src/locales/th.js
@@ -1791,4 +1791,26 @@ export default {
'This folder can’t be used for backups.': 'ใช้โฟลเดอร์นี้สำหรับสำรองข้อมูลไม่ได้',
'openGym can no longer write to “{0}” — the copies go to Documents/openGym again. Choose the folder again to go back to it.': 'openGym เขียนลงใน “{0}” ไม่ได้แล้ว — สำเนาจะกลับไปเก็บที่ Documents/openGym เลือกโฟลเดอร์อีกครั้งเพื่อกลับไปใช้',
'openGym can no longer write to the chosen folder — the copies go to Documents/openGym again. Choose the folder again to go back to it.': 'openGym เขียนลงในโฟลเดอร์ที่เลือกไม่ได้แล้ว — สำเนาจะกลับไปเก็บที่ Documents/openGym เลือกโฟลเดอร์อีกครั้งเพื่อกลับไปใช้',
+ // --- missed-workout nudge (lib/nudge.js; the push copy is mirrored in api/nudge-copy.js) ---
+ 'Nudge me when I skip a planned workout': 'สะกิดฉันเมื่อข้ามการออกกำลังกายที่วางแผนไว้',
+ 'Nudge tone': 'น้ำเสียงการสะกิด',
+ 'Friendly': 'เป็นมิตร',
+ 'Guilt trip': 'ทำให้รู้สึกผิด',
+ 'Drill sergeant': 'ครูฝึกทหาร',
+ 'One nudge in the evening of a planned day with nothing logged, between 20:00 and 21:30. After 3 missed days in a row it goes quiet until your next workout.': 'สะกิดหนึ่งครั้งในตอนเย็นของวันที่วางแผนไว้แต่ยังไม่มีการบันทึก ระหว่าง 20:00 ถึง 21:30 หลังพลาดติดกัน 3 วันจะเงียบไปจนกว่าคุณจะออกกำลังกายครั้งถัดไป',
+ 'Everything okay?': 'ทุกอย่างโอเคไหม?',
+ '{0} is still waiting. What’s up?': '{0} ยังรอคุณอยู่นะ เป็นอะไรหรือเปล่า?',
+ 'No {0} today? Even a short session tomorrow counts.': 'วันนี้ไม่มี {0} เหรอ? พรุ่งนี้แค่เล่นสั้นๆ ก็นับแล้ว',
+ 'Rough day? {0} will keep. Tomorrow is a fresh start.': 'วันนี้เหนื่อยเหรอ? {0} รอได้ พรุ่งนี้เริ่มใหม่',
+ 'Hey, {0} didn’t happen today. All good?': 'เฮ้ วันนี้ไม่ได้เล่น {0} ทุกอย่างโอเคไหม?',
+ 'I miss you': 'คิดถึงคุณนะ',
+ '{0} waited by the door all evening. For you.': '{0} รอคุณอยู่ที่ประตูทั้งคืน รอคุณคนเดียว',
+ 'The barbell asked about you today. I didn’t know what to say.': 'วันนี้บาร์เบลถามถึงคุณ ฉันไม่รู้จะตอบว่าอะไร',
+ 'Was it something I said? {0} misses you.': 'ฉันพูดอะไรผิดไปหรือเปล่า? {0} คิดถึงคุณนะ',
+ 'I saved you a spot on the bench. It’s still empty.': 'ฉันจองที่บนม้านั่งไว้ให้คุณ ตอนนี้ยังว่างอยู่เลย',
+ 'Attention, recruit!': 'แถวตรง พลทหาร!',
+ 'Your gains are packing their bags. {0} tomorrow, no excuses!': 'กล้ามของคุณกำลังเก็บกระเป๋าหนี พรุ่งนี้ {0} ห้ามมีข้ออ้าง!',
+ '{0} doesn’t do itself, recruit. Move it!': '{0} ไม่ทำตัวเองหรอก พลทหาร เคลื่อนไหว!',
+ 'Excuses don’t lift weights. Report for {0} tomorrow!': 'ข้ออ้างยกน้ำหนักไม่ได้ พรุ่งนี้มารายงานตัวที่ {0}!',
+ 'Your muscles filed a missing-person report. Show up for {0}!': 'กล้ามเนื้อของคุณแจ้งคนหายแล้ว มารายงานตัวที่ {0}!',
}
diff --git a/frontend/src/locales/tr.js b/frontend/src/locales/tr.js
index 393a3862f..c92d79baa 100644
--- a/frontend/src/locales/tr.js
+++ b/frontend/src/locales/tr.js
@@ -1780,4 +1780,26 @@ export default {
'This folder can’t be used for backups.': 'Bu klasör yedekler için kullanılamıyor.',
'openGym can no longer write to “{0}” — the copies go to Documents/openGym again. Choose the folder again to go back to it.': 'openGym artık “{0}” klasörüne yazamıyor — kopyalar yeniden Documents/openGym klasörüne gidiyor. Ona dönmek için klasörü yeniden seç.',
'openGym can no longer write to the chosen folder — the copies go to Documents/openGym again. Choose the folder again to go back to it.': 'openGym artık seçilen klasöre yazamıyor — kopyalar yeniden Documents/openGym klasörüne gidiyor. Ona dönmek için klasörü yeniden seç.',
+ // --- missed-workout nudge (lib/nudge.js; the push copy is mirrored in api/nudge-copy.js) ---
+ 'Nudge me when I skip a planned workout': 'Planlı bir antrenmanı atladığımda beni dürt',
+ 'Nudge tone': 'Dürtme tonu',
+ 'Friendly': 'Samimi',
+ 'Guilt trip': 'Vicdan azabı',
+ 'Drill sergeant': 'Eğitim çavuşu',
+ 'One nudge in the evening of a planned day with nothing logged, between 20:00 and 21:30. After 3 missed days in a row it goes quiet until your next workout.': 'Kayıt girilmemiş planlı bir günün akşamında, 20:00 ile 21:30 arasında tek bir dürtme. Üst üste 3 kaçırılan günden sonra bir sonraki antrenmanına kadar sessiz kalır.',
+ 'Everything okay?': 'Her şey yolunda mı?',
+ '{0} is still waiting. What’s up?': '{0} hâlâ seni bekliyor. Ne oldu?',
+ 'No {0} today? Even a short session tomorrow counts.': 'Bugün {0} yok mu? Yarın kısa bir seans bile sayılır.',
+ 'Rough day? {0} will keep. Tomorrow is a fresh start.': 'Zor bir gün mü? {0} bekleyebilir. Yarın yeni bir başlangıç.',
+ 'Hey, {0} didn’t happen today. All good?': 'Hey, {0} bugün olmadı. Her şey yolunda mı?',
+ 'I miss you': 'Seni özledim',
+ '{0} waited by the door all evening. For you.': '{0} bütün akşam kapıda seni bekledi. Seni.',
+ 'The barbell asked about you today. I didn’t know what to say.': 'Halter bugün seni sordu. Ne diyeceğimi bilemedim.',
+ 'Was it something I said? {0} misses you.': 'Bir şey mi dedim? {0} seni özledi.',
+ 'I saved you a spot on the bench. It’s still empty.': 'Sana sehpada yer ayırdım. Hâlâ boş.',
+ 'Attention, recruit!': 'Hazır ol, acemi!',
+ 'Your gains are packing their bags. {0} tomorrow, no excuses!': 'Kazanımların bavul topluyor. Yarın {0}, bahane yok!',
+ '{0} doesn’t do itself, recruit. Move it!': '{0} kendi kendine yapılmaz, acemi. Kımılda!',
+ 'Excuses don’t lift weights. Report for {0} tomorrow!': 'Bahaneler ağırlık kaldırmaz. Yarın {0} için hazır ol!',
+ 'Your muscles filed a missing-person report. Show up for {0}!': 'Kasların kayıp ilanı verdi. {0} için içtimaya gel!',
}
diff --git a/frontend/src/locales/uk.js b/frontend/src/locales/uk.js
index deeba4054..47850db83 100644
--- a/frontend/src/locales/uk.js
+++ b/frontend/src/locales/uk.js
@@ -1777,4 +1777,26 @@ export default {
'This folder can’t be used for backups.': 'Цю папку не можна використовувати для резервних копій.',
'openGym can no longer write to “{0}” — the copies go to Documents/openGym again. Choose the folder again to go back to it.': 'openGym більше не може записувати в «{0}» — копії знову зберігаються в Documents/openGym. Вибери папку ще раз, щоб повернутися до неї.',
'openGym can no longer write to the chosen folder — the copies go to Documents/openGym again. Choose the folder again to go back to it.': 'openGym більше не може записувати у вибрану папку — копії знову зберігаються в Documents/openGym. Вибери папку ще раз, щоб повернутися до неї.',
+ // --- missed-workout nudge (lib/nudge.js; the push copy is mirrored in api/nudge-copy.js) ---
+ 'Nudge me when I skip a planned workout': 'Нагадувати, якщо я пропускаю заплановане тренування',
+ 'Nudge tone': 'Тон нагадування',
+ 'Friendly': 'Дружній',
+ 'Guilt trip': 'Тиснути на совість',
+ 'Drill sergeant': 'Сержант-інструктор',
+ 'One nudge in the evening of a planned day with nothing logged, between 20:00 and 21:30. After 3 missed days in a row it goes quiet until your next workout.': 'Одне нагадування ввечері запланованого дня без записаного тренування, з 20:00 до 21:30. Після 3 пропущених днів поспіль воно замовкає до твого наступного тренування.',
+ 'Everything okay?': 'Усе гаразд?',
+ '{0} is still waiting. What’s up?': 'Тренування «{0}» досі чекає. Що сталося?',
+ 'No {0} today? Even a short session tomorrow counts.': 'Сьогодні без тренування «{0}»? Завтра зарахується навіть коротке.',
+ 'Rough day? {0} will keep. Tomorrow is a fresh start.': 'Важкий день? Тренування «{0}» почекає. Завтра — новий старт.',
+ 'Hey, {0} didn’t happen today. All good?': 'Гей, тренування «{0}» сьогодні не відбулося. Усе добре?',
+ 'I miss you': 'Я сумую за тобою',
+ '{0} waited by the door all evening. For you.': 'Тренування «{0}» весь вечір чекало на тебе біля дверей. Саме на тебе.',
+ 'The barbell asked about you today. I didn’t know what to say.': 'Штанга сьогодні питала про тебе. Я не знав, що сказати.',
+ 'Was it something I said? {0} misses you.': 'Я щось не те сказав? Тренування «{0}» сумує за тобою.',
+ 'I saved you a spot on the bench. It’s still empty.': 'Я зайняв тобі місце на лаві. Воно досі порожнє.',
+ 'Attention, recruit!': 'Струнко, новобранцю!',
+ 'Your gains are packing their bags. {0} tomorrow, no excuses!': 'Твої здобутки пакують валізи. Завтра «{0}», без відмовок!',
+ '{0} doesn’t do itself, recruit. Move it!': 'Тренування «{0}» саме себе не зробить, новобранцю. Ворушися!',
+ 'Excuses don’t lift weights. Report for {0} tomorrow!': 'Відмовки не піднімають ваги. Завтра з’явитися на «{0}»!',
+ 'Your muscles filed a missing-person report. Show up for {0}!': 'Твої м’язи заявили про твоє зникнення. З’явитися на «{0}»!',
}
diff --git a/frontend/src/locales/zh-TW.js b/frontend/src/locales/zh-TW.js
index b56d2c263..dc926fa6c 100644
--- a/frontend/src/locales/zh-TW.js
+++ b/frontend/src/locales/zh-TW.js
@@ -1773,4 +1773,26 @@ export default {
'This folder can’t be used for backups.': '此資料夾無法用於備份。',
'openGym can no longer write to “{0}” — the copies go to Documents/openGym again. Choose the folder again to go back to it.': 'openGym 已無法寫入「{0}」——副本會重新儲存到 Documents/openGym。重新選擇該資料夾即可改回。',
'openGym can no longer write to the chosen folder — the copies go to Documents/openGym again. Choose the folder again to go back to it.': 'openGym 已無法寫入所選資料夾——副本會重新儲存到 Documents/openGym。重新選擇該資料夾即可改回。',
+ // --- missed-workout nudge (lib/nudge.js; the push copy is mirrored in api/nudge-copy.js) ---
+ 'Nudge me when I skip a planned workout': '跳過計畫訓練時提醒我',
+ 'Nudge tone': '提醒語氣',
+ 'Friendly': '友善',
+ 'Guilt trip': '情感勒索',
+ 'Drill sergeant': '魔鬼教官',
+ 'One nudge in the evening of a planned day with nothing logged, between 20:00 and 21:30. After 3 missed days in a row it goes quiet until your next workout.': '在排定訓練的日子沒有紀錄時,於晚上 20:00 到 21:30 之間提醒一次。連續錯過 3 天後會保持安靜,直到你下次訓練。',
+ 'Everything okay?': '一切還好嗎?',
+ '{0} is still waiting. What’s up?': '{0} 還在等你。怎麼了?',
+ 'No {0} today? Even a short session tomorrow counts.': '今天沒練 {0}?明天就算練一下下也算數。',
+ 'Rough day? {0} will keep. Tomorrow is a fresh start.': '今天不順?{0} 可以等。明天重新開始。',
+ 'Hey, {0} didn’t happen today. All good?': '嘿,今天的 {0} 沒練到。一切都好嗎?',
+ 'I miss you': '我好想你',
+ '{0} waited by the door all evening. For you.': '{0} 在門口等了你一整晚。就等你。',
+ 'The barbell asked about you today. I didn’t know what to say.': '槓鈴今天問起你了。我不知道該怎麼回答。',
+ 'Was it something I said? {0} misses you.': '是我說錯什麼了嗎?{0} 很想你。',
+ 'I saved you a spot on the bench. It’s still empty.': '我在臥推椅上幫你留了位置。現在還空著。',
+ 'Attention, recruit!': '立正,菜鳥!',
+ 'Your gains are packing their bags. {0} tomorrow, no excuses!': '你的訓練成果正在打包行李。明天 {0},不准找藉口!',
+ '{0} doesn’t do itself, recruit. Move it!': '{0} 不會自己完成,菜鳥。動起來!',
+ 'Excuses don’t lift weights. Report for {0} tomorrow!': '藉口舉不起重量。明天準時報到練 {0}!',
+ 'Your muscles filed a missing-person report. Show up for {0}!': '你的肌肉已經報案協尋你了。馬上來練 {0}!',
}
diff --git a/frontend/src/locales/zh.js b/frontend/src/locales/zh.js
index e981591c0..3cd832832 100644
--- a/frontend/src/locales/zh.js
+++ b/frontend/src/locales/zh.js
@@ -1780,4 +1780,26 @@ export default {
'This folder can’t be used for backups.': '此文件夹无法用于备份。',
'openGym can no longer write to “{0}” — the copies go to Documents/openGym again. Choose the folder again to go back to it.': 'openGym 无法再写入“{0}”——副本会重新保存到 Documents/openGym。重新选择该文件夹即可改回。',
'openGym can no longer write to the chosen folder — the copies go to Documents/openGym again. Choose the folder again to go back to it.': 'openGym 无法再写入所选文件夹——副本会重新保存到 Documents/openGym。重新选择该文件夹即可改回。',
+ // --- missed-workout nudge (lib/nudge.js; the push copy is mirrored in api/nudge-copy.js) ---
+ 'Nudge me when I skip a planned workout': '跳过计划训练时提醒我',
+ 'Nudge tone': '提醒语气',
+ 'Friendly': '友好',
+ 'Guilt trip': '情感攻势',
+ 'Drill sergeant': '魔鬼教官',
+ 'One nudge in the evening of a planned day with nothing logged, between 20:00 and 21:30. After 3 missed days in a row it goes quiet until your next workout.': '在计划训练日没有记录时,于晚上 20:00 到 21:30 之间提醒一次。连续错过 3 天后会保持安静,直到你下次训练。',
+ 'Everything okay?': '一切还好吗?',
+ '{0} is still waiting. What’s up?': '{0}还在等你。怎么了?',
+ 'No {0} today? Even a short session tomorrow counts.': '今天没练{0}?明天哪怕练一小会儿也算数。',
+ 'Rough day? {0} will keep. Tomorrow is a fresh start.': '今天不顺?{0}可以等。明天重新开始。',
+ 'Hey, {0} didn’t happen today. All good?': '嘿,今天的{0}没练成。一切都好吗?',
+ 'I miss you': '我想你了',
+ '{0} waited by the door all evening. For you.': '{0}在门口等了你一整晚。就等你。',
+ 'The barbell asked about you today. I didn’t know what to say.': '杠铃今天问起你了。我不知道该怎么说。',
+ 'Was it something I said? {0} misses you.': '是我说错什么了吗?{0}想你了。',
+ 'I saved you a spot on the bench. It’s still empty.': '我在卧推凳上给你留了位置。现在还空着。',
+ 'Attention, recruit!': '立正,新兵!',
+ 'Your gains are packing their bags. {0} tomorrow, no excuses!': '你的增肌成果正在收拾行李。明天{0},不许找借口!',
+ '{0} doesn’t do itself, recruit. Move it!': '{0}不会自己完成,新兵。动起来!',
+ 'Excuses don’t lift weights. Report for {0} tomorrow!': '借口举不起重量。明天准时报到练{0}!',
+ 'Your muscles filed a missing-person report. Show up for {0}!': '你的肌肉已经报了失踪。马上来练{0}!',
}
diff --git a/frontend/src/store/useStore.js b/frontend/src/store/useStore.js
index 1c46a3bf3..f05a47c74 100644
--- a/frontend/src/store/useStore.js
+++ b/frontend/src/store/useStore.js
@@ -102,7 +102,8 @@ export const DEF = {
// that a profile which never chose (loaded state is overlaid on DEF, on every path: local,
// server pull, backup import) still falls back to the `showRir` boolean this replaced and
// keeps the column it had. See effortOf.
- reminder: { on: false, time: '08:00', tz: null }, effort: null, autoBackup: false,
+ // nudge/tone: the missed-workout nudge (lib/nudge.js), opt-in, rides on the reminder.
+ reminder: { on: false, time: '08:00', tz: null, nudge: false, tone: 'friendly' }, effort: null, autoBackup: false,
// Equipment profiles (issue: filter Library/picker/routines by what you actually own —
// e.g. "Home" vs "Gym" — building on the session-only equipment filter from issue #6).
equipProfiles: [], activeEquipId: null, equipFilterOn: false,
diff --git a/frontend/src/views/Settings.jsx b/frontend/src/views/Settings.jsx
index f239661bc..eff1804c9 100644
--- a/frontend/src/views/Settings.jsx
+++ b/frontend/src/views/Settings.jsx
@@ -18,6 +18,7 @@ import { t, tn, LANGS, INSTR_LANGS, EXERCISE_NAME_LANGS, baseLang } from '../lib
import { effectiveLang } from '../lib/default-lang.js'
import { DEMO, REPO } from '../lib/demo.js'
import { MOBILE, isAndroid, shareExport, shareExportBlob, syncReminder } from '../lib/mobile.js'
+import { NUDGE_COPY, NUDGE_TONES, toneOf } from '../lib/nudge.js'
import { referencedFiles } from '../lib/media-refs.js'
import { mediaStore } from '../lib/media-store.js'
import { syncMedia, fetchToStore } from '../lib/media-sync.js'
@@ -784,7 +785,7 @@ function MobileReminderCard({ S, update, toast }) {
}
return (
<Section title={t('Notifications')}
- footer={S.reminder?.on ? t('Reminds you at this time on days that have a routine planned.') : null}>
+ footer={S.reminder?.on ? t('Reminds you at this time on days that have a routine planned.') + nudgeNote(S) : null}>
<Row icon="calendar" iconTint="var(--orange)" title={t('Workout day reminder')}>
<Switch checked={!!S.reminder?.on} onChange={toggle} />
</Row>
@@ -794,10 +795,31 @@ function MobileReminderCard({ S, update, toast }) {
onChange={e => setReminder({ time: e.target.value })} />
</Row>
)}
+ {S.reminder?.on && <NudgeRows S={S} setReminder={setReminder} />}
</Section>
)
}
+// The missed-workout nudge (lib/nudge.js): a switch and its tone, under the reminder they ride
+// on — the server sends it with the same push (or the phone schedules it beside the reminder).
+function NudgeRows({ S, setReminder }) {
+ const r = S.reminder || {}
+ return <>
+ <Row icon="flame" iconTint="var(--red)" title={t('Nudge me when I skip a planned workout')}>
+ <Switch checked={!!r.nudge} onChange={() => setReminder({ nudge: !r.nudge })} />
+ </Row>
+ {r.nudge && (
+ <SelectRow icon="sparkles" iconTint="var(--blue)" title={t('Nudge tone')}
+ value={toneOf(r)} onChange={v => setReminder({ tone: v })}
+ options={NUDGE_TONES.map(k => ({ value: k, label: toneLabel(k), subtitle: t(NUDGE_COPY[k].title) }))} />
+ )}
+ </>
+}
+const toneLabel = k => k === 'guilt' ? t('Guilt trip') : k === 'drill' ? t('Drill sergeant') : t('Friendly')
+const nudgeNote = S => S.reminder?.nudge
+ ? ' ' + t('One nudge in the evening of a planned day with nothing logged, between 20:00 and 21:30. After 3 missed days in a row it goes quiet until your next workout.')
+ : ''
+
function PushCard({ S, update, toast }) {
const [on, setOn] = useState(false)
const [busy, setBusy] = useState(false)
@@ -840,7 +862,8 @@ function PushCard({ S, update, toast }) {
title={t('Notifications')}
footer={on && S.reminder?.on
? t("Only sent on days you have a routine planned and haven't logged a workout yet.") +
- (S.reminder?.tz ? ' ' + t('Timezone: {0} (auto-detected, updates if you travel).', S.reminder.tz) : '')
+ (S.reminder?.tz ? ' ' + t('Timezone: {0} (auto-detected, updates if you travel).', S.reminder.tz) : '') +
+ nudgeNote(S)
: null}
>
<Row icon="bell" iconTint="var(--red)" title={t('Push notifications')} subtitle={t('Rest-timer alerts, even if openGym is closed.')}>
@@ -857,6 +880,9 @@ function PushCard({ S, update, toast }) {
onChange={e => update(s => { s.reminder = { ...(s.reminder || DEF.reminder), time: e.target.value, tz: localTZ() } })} />
</Row>
)}
+ {on && S.reminder?.on && (
+ <NudgeRows S={S} setReminder={patch => update(s => { s.reminder = { ...(s.reminder || DEF.reminder), ...patch, tz: localTZ() } })} />
+ )}
</Section>
{on && <div style={{ marginTop: -12, marginBottom: 22 }}><Button size="sm" icon="bell" onClick={test}>{t('Send test notification')}</Button></div>}
</>
diff --git a/frontend/src/views/Settings.nudge.test.jsx b/frontend/src/views/Settings.nudge.test.jsx
new file mode 100644
index 000000000..67e5eacd1
--- /dev/null
+++ b/frontend/src/views/Settings.nudge.test.jsx
@@ -0,0 +1,136 @@
+// @vitest-environment happy-dom
+import React, { act } from 'react'
+import { createRoot } from 'react-dom/client'
+import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'
+import Settings from './Settings.jsx'
+import { bindUI } from '../components/ui.jsx'
+
+globalThis.IS_REACT_ACT_ENVIRONMENT = true
+
+// The missed-workout nudge lives under the workout-day reminder in Settings → Notifications: a
+// switch, and once it is on, a tone. Both the self-hosted card (web push) and the mobile card
+// (native notifications) carry it, and only while the reminder itself is on.
+const mocks = vi.hoisted(() => {
+ const state = { S: null, MOBILE: false }
+ state.snapshot = () => ({
+ S: state.S,
+ user: { id: 'u1', name: 'One' },
+ update: mut => {
+ const next = structuredClone(state.S)
+ mut(next)
+ state.S = next
+ },
+ replaceState: vi.fn(), setUser: vi.fn(), pullState: vi.fn(), pushState: vi.fn(),
+ signOut: vi.fn(), signOutAll: vi.fn(), resetDemo: vi.fn(), disconnectServer: vi.fn(),
+ })
+ return state
+})
+vi.mock('../store/useStore.js', () => {
+ const useStore = selector => selector ? selector(mocks.snapshot()) : mocks.snapshot()
+ useStore.getState = mocks.snapshot
+ return { useStore, DEF: { reminder: { on: false, time: '08:00', tz: null, nudge: false, tone: 'friendly' } }, hasData: () => false }
+})
+vi.mock('../store/useUI.js', () => {
+ const snap = () => ({ toast: vi.fn(), openSheet: vi.fn() })
+ const useUI = selector => selector ? selector(snap()) : snap()
+ useUI.getState = snap
+ return { useUI }
+})
+vi.mock('react-router-dom', () => ({ useNavigate: () => () => {} }))
+vi.mock('../lib/api.js', () => ({
+ api: vi.fn(() => Promise.resolve({})), webauthnOK: () => false, passkeyLogin: vi.fn(), passkeyRegister: vi.fn(), IS_ANDROID: false,
+}))
+vi.mock('../lib/push.js', () => ({
+ pushSupported: () => true, syncPushSubscription: () => Promise.resolve(true),
+ enablePush: vi.fn(), disablePush: vi.fn(), sendTestPush: vi.fn(),
+}))
+vi.mock('../lib/wakelock.js', () => ({ wakeLockSupported: () => false }))
+vi.mock('../lib/mobile.js', () => ({
+ get MOBILE() { return mocks.MOBILE }, isAndroid: () => Promise.resolve(false), shareExport: vi.fn(),
+ syncReminder: vi.fn(() => Promise.resolve(true)),
+}))
+vi.mock('./MobileOnboarding.jsx', () => ({ ConnectSheet: () => null }))
+vi.mock('../sheets.jsx', () => ({
+ loadStarterPlan: vi.fn(), starterPlanSheet: vi.fn(), confirmSheet: vi.fn(), importFromApp: vi.fn(),
+ importFromHevy: vi.fn(), equipmentProfileSheet: vi.fn(),
+}))
+
+globalThis.__APP_VERSION__ ??= 'test'
+
+let sheet = null
+bindUI({ getState: () => ({ openSheet: render => { sheet = render; return { close: () => {} } } }) })
+
+let host, root
+beforeEach(() => {
+ sheet = null
+ mocks.MOBILE = false
+ mocks.S = {
+ unit: 'kg', restSec: 90, restPauseSec: 15, sound: false, effort: 'none',
+ gifSize: 'full', workouts: [], routines: [], exWeights: {},
+ reminder: { on: true, time: '08:00', tz: 'Europe/Zurich' },
+ }
+ host = document.createElement('div')
+ document.body.appendChild(host)
+ root = createRoot(host)
+})
+afterEach(() => {
+ act(() => root.unmount())
+ host.remove()
+})
+
+const mount = async () => { await act(async () => { root.render(<Settings />) }) }
+const row = text => [...host.querySelectorAll('.lrow')].find(r => r.textContent.includes(text))
+const nudgeRow = () => row('Nudge me when I skip a planned workout')
+const toneRow = () => row('Nudge tone')
+const toggleNudge = async () => {
+ const sw = nudgeRow().querySelector('input[type=checkbox], button, [role=switch]')
+ await act(async () => { sw.click() })
+ await mount()
+}
+const choose = async label => {
+ act(() => { toneRow().click() })
+ expect(sheet).toBeTypeOf('function')
+ const box = document.createElement('div')
+ document.body.appendChild(box)
+ const sheetRoot = createRoot(box)
+ act(() => sheetRoot.render(sheet(() => {})))
+ const option = [...box.querySelectorAll('button.lrow')].find(b => b.querySelector('.lrow-t')?.textContent === label)
+ expect(option).toBeTruthy()
+ act(() => { option.click() })
+ act(() => sheetRoot.unmount())
+ box.remove()
+ await mount()
+}
+
+describe.each([['self-hosted (web push)', false], ['mobile (native)', true]])('Settings — missed-workout nudge, %s', (_, mobile) => {
+ beforeEach(() => { mocks.MOBILE = mobile })
+
+ it('is off by default, under the reminder, with no tone until it is on', async () => {
+ await mount()
+ expect(nudgeRow()).toBeTruthy()
+ expect(toneRow()).toBeFalsy()
+ expect(host.textContent).not.toContain('After 3 missed days in a row')
+ })
+
+ it('switches on, keeps the reminder as it was, and offers the three tones', async () => {
+ await mount()
+ await toggleNudge()
+ expect(mocks.S.reminder).toMatchObject({ on: true, time: '08:00', nudge: true })
+ expect(toneRow().textContent).toContain('Friendly')
+ expect(host.textContent).toContain('After 3 missed days in a row it goes quiet until your next workout.')
+ await choose('Drill sergeant')
+ expect(mocks.S.reminder.tone).toBe('drill')
+ expect(toneRow().textContent).toContain('Drill sergeant')
+ await choose('Guilt trip')
+ expect(mocks.S.reminder.tone).toBe('guilt')
+ await toggleNudge()
+ expect(mocks.S.reminder.nudge).toBe(false)
+ expect(toneRow()).toBeFalsy()
+ })
+
+ it('is not offered while the reminder is off', async () => {
+ mocks.S.reminder = { on: false, time: '08:00', nudge: true }
+ await mount()
+ expect(nudgeRow()).toBeFalsy()
+ })
+})
diff --git a/website/docs.html b/website/docs.html
index 9cb432ba7..40cafc600 100644
--- a/website/docs.html
+++ b/website/docs.html
@@ -242,7 +242,7 @@
<p>The app requests notification permission only when you switch the workout-day reminder
on, and declares <code>SCHEDULE_EXACT_ALARM</code> so reminders fire to the minute.
Reminders are scheduled per calendar date — a day you already trained, or rescheduled
- away, stays quiet.</p>
+ away, stays quiet. The missed-workout nudge, when switched on, is scheduled the same way.</p>
<h2 id="iphone">Use on iPhone</h2>
<p>Apple does not allow installing apps outside the App Store, so there is no iOS download —
@@ -458,6 +458,10 @@
<li><b>Workout-day reminder:</b> an optional notification on days you have a workout
planned but haven't logged one. It fires at <i>your</i> local time — each device
reports its own timezone — and follows you if you travel.</li>
+ <li><b>Missed-workout nudge:</b> opt-in, under the reminder. Skip a planned workout and you
+ get one nudge that evening, in the tone you picked: <i>Friendly</i>, <i>Guilt trip</i>
+ (&ldquo;I miss you&rdquo;) or <i>Drill sergeant</i>. Rest days stay quiet, and after
+ three missed days in a row it stops until your next workout.</li>
<li><b>Installable PWA</b> (self-hosted): add it to your home screen from any browser and
it opens full-screen with its own icon.</li>
</ul>
@@ -534,6 +538,9 @@ docker compose up -d # restart alone does NOT re-read .env</code></pre>
re-registers its subscription with the server on every signed-in start, so one the server
lost heals itself; and a rest-timer alert belongs to the device that started the rest, so
finishing a rest on the desktop no longer silences the phone.</p>
+ <p>The optional <b>missed-workout nudge</b> rides on the reminder: one push between 20:00 and
+ 21:30 (or from 2 hours after a late reminder) on a planned day with nothing logged and no
+ workout on screen, at most three missed days in a row, then quiet until the next workout.</p>
<h3 id="sh-sync">Sync between devices</h3>
<p>Signed in, <b>the profile on the server is the truth</b>. Signing in on a device adopts it