Skip to content

Offline gym log for Android. No account, no ads, no internet.

Pause timed sets, bar weight per exercise, Strava export, secondary muscles for custom exercises, scrolling long titles and smoother scrolling

InlitX1f7c963d0f34
diff --git a/lib/app/app_shell.dart b/lib/app/app_shell.dart
index f1eba93..b0c5885 100644
--- a/lib/app/app_shell.dart
+++ b/lib/app/app_shell.dart
@@ -472,7 +472,11 @@ class _ParkedPill extends StatelessWidget {
),
),
const SizedBox(width: 12),
- Text(fit.elapsedLabel, style: AppTheme.f(14, weight: FontWeight.w700, color: gc.textSecondary)),
+ ValueListenableBuilder<int>(
+ valueListenable: fit.clock,
+ builder: (_, _, _) =>
+ Text(fit.elapsedLabel, style: AppTheme.f(14, weight: FontWeight.w700, color: gc.textSecondary)),
+ ),
const SizedBox(width: 12),
Container(
width: 40,
diff --git a/lib/app/gymmane_app.dart b/lib/app/gymmane_app.dart
index 0002583..144a869 100644
--- a/lib/app/gymmane_app.dart
+++ b/lib/app/gymmane_app.dart
@@ -7,22 +7,44 @@ import '../theme/app_colors.dart';
import '../theme/app_theme.dart';
import 'app_shell.dart';
-class GymManeApp extends StatelessWidget {
+class GymManeApp extends StatefulWidget {
const GymManeApp({super.key});
static const maxTextScale = 1.15;
+ @override
+ State<GymManeApp> createState() => _GymManeAppState();
+}
+
+class _GymManeAppState extends State<GymManeApp> {
+ var _look = (fit.themeMode, fit.locale);
+
+ @override
+ void initState() {
+ super.initState();
+ fit.addListener(_watch);
+ }
+
+ @override
+ void dispose() {
+ fit.removeListener(_watch);
+ super.dispose();
+ }
+
+ void _watch() {
+ final look = (fit.themeMode, fit.locale);
+ if (look != _look) setState(() => _look = look);
+ }
+
@override
Widget build(BuildContext context) {
- return AnimatedBuilder(
- animation: fit,
- builder: (context, _) => MaterialApp(
+ return MaterialApp(
title: 'GymMane',
debugShowCheckedModeBanner: false,
theme: AppTheme.light,
darkTheme: AppTheme.dark,
- themeMode: fit.themeMode,
- locale: fit.locale,
+ themeMode: _look.$1,
+ locale: _look.$2,
supportedLocales: AppLocalizations.supportedLocales,
localizationsDelegates: const [
AppLocalizations.delegate,
@@ -31,11 +53,10 @@ class GymManeApp extends StatelessWidget {
GlobalCupertinoLocalizations.delegate,
],
builder: (context, child) => MediaQuery.withClampedTextScaling(
- maxScaleFactor: maxTextScale,
+ maxScaleFactor: GymManeApp.maxTextScale,
child: _ButtonNavScrim(child: child!),
),
home: const AppShell(),
- ),
);
}
}
diff --git a/lib/l10n/app_ar.arb b/lib/l10n/app_ar.arb
index b459cad..384751e 100644
--- a/lib/l10n/app_ar.arb
+++ b/lib/l10n/app_ar.arb
@@ -347,7 +347,7 @@
}
},
"newRoutineName": "روتين جديد",
- "dragToReorder": "اضغط مطولًا واسحب لإعادة الترتيب — هذا هو ترتيب تمرينك.",
+ "dragToReorder": "اسحب المقبض المنقّط لإعادة الترتيب — هذا هو ترتيب تمرينك.",
"reorderHandle": "إعادة ترتيب {name}",
"@reorderHandle": {
"placeholders": {
@@ -1114,7 +1114,6 @@
"tplAbcde": "خمسة أيام، مجموعة عضلية لكل يوم: صدر، ظهر، أرجل، أكتاف، ذراعان.",
"elapsedCaps": "المنقضي",
"tapToSkip": "اضغط للتخطي",
- "tapToStop": "اضغط للإيقاف",
"screenLocked": "الشاشة مقفلة",
"lockedHint": "اضغط مطولًا على البصمة في الأعلى لفتح القفل",
"liveDoneSet": "انتهت المجموعة",
@@ -1198,5 +1197,21 @@
"planHistory": "{n, plural, =1{تمرين واحد في آخر 30 يومًا.} other{{n} تمارين في آخر 30 يومًا.}}",
"planBestLifts": "أفضل المجموعات الأخيرة",
"planAskFirst": "إذا لم تكن تعرف هدفي (قوة أو عضل أو خسارة دهون أو لياقة عامة) أو مدة كل حصة، فاسألني أولًا برسالة قصيرة. بعدها أجب بـ JSON فقط.",
- "backToTop": "العودة للأعلى"
+ "backToTop": "العودة للأعلى",
+ "deleteExerciseTitle": "حذف هذا التمرين؟",
+ "deleteExerciseBody": "سيُزال «{name}» من مكتبتك ومن روتيناتك. تبقى مجموعاتك السابقة محفوظة.",
+ "exportForStravaHint": "ارفعه من المتصفح على strava.com/upload/select (تطبيق Strava لا يستورد الملفات). سيظهر كتمرين أوزان مع مجموعاتك.",
+ "manualStartTime": "وقت البدء",
+ "manualDuration": "المدة",
+ "manualDurationUnset": "أضف المدة",
+ "stravaRow": "تصدير إلى Strava (تجريبي)",
+ "stravaBeta": "تجريبي",
+ "stravaIntro": "اختر تمرينًا لنقله إلى Strava. ستحصل على ملف .fit: ارفعه من المتصفح على strava.com/upload/select وسيظهر كتمرين أوزان مع مجموعاتك.",
+ "stravaEmpty": "لا توجد تمارين للتصدير بعد.",
+ "tapToPause": "اضغط للإيقاف المؤقت",
+ "holdPausedHint": "متوقف مؤقتًا · اضغط للمتابعة",
+ "finishHoldNow": "أنهِ المجموعة الآن",
+ "barWeight": "وزن البار أو المزلجة",
+ "barWeightHint": "تستخدمه حاسبة الأقراص",
+ "barWeightCustom": "مخصص · اضغط لإعادة الضبط"
}
diff --git a/lib/l10n/app_de.arb b/lib/l10n/app_de.arb
index 90c6c03..90dbac4 100644
--- a/lib/l10n/app_de.arb
+++ b/lib/l10n/app_de.arb
@@ -384,7 +384,7 @@
"setDay": "{day} FESTLEGEN",
"@setDay": { "placeholders": { "day": { "type": "String" } } },
"newRoutineName": "Neuer Trainingsplan",
- "dragToReorder": "Gedrückt halten und ziehen zum Sortieren — dies ist die Reihenfolge deines Trainings.",
+ "dragToReorder": "Zieh am Punkte-Griff, um die Reihenfolge zu ändern — so trainierst du.",
"reorderHandle": "{name} neu sortieren",
"@reorderHandle": { "placeholders": { "name": { "type": "String" } } },
"removeFromRoutine": "Aus Trainingsplan entfernen",
@@ -977,7 +977,6 @@
"elapsedCaps": "VERSTRICHEN",
"tapToSkip": "Tippen zum Überspringen",
- "tapToStop": "Tippen zum Stoppen",
"screenLocked": "Bildschirm gesperrt",
"lockedHint": "Halte den Fingerabdruck oben gedrückt, um zu entsperren",
@@ -1065,5 +1064,21 @@
"planHistory": "{n, plural, =1{1 Training in den letzten 30 Tagen.} other{{n} Trainings in den letzten 30 Tagen.}}",
"planBestLifts": "Beste Sätze zuletzt",
"planAskFirst": "Wenn du mein Ziel (Kraft, Muskeln, Fettabbau oder allgemeine Fitness) oder die Dauer einer Einheit nicht kennst, frag mich zuerst in einer kurzen Nachricht. Danach antworte nur mit JSON.",
- "backToTop": "Nach oben"
+ "backToTop": "Nach oben",
+ "deleteExerciseTitle": "Diese Übung löschen?",
+ "deleteExerciseBody": "„{name}“ wird aus deiner Bibliothek und deinen Plänen entfernt. Deine bisherigen Sätze bleiben erhalten.",
+ "exportForStravaHint": "Lade die Datei im Browser auf strava.com/upload/select hoch (die Strava-App kann keine Dateien importieren). Sie erscheint als Krafttraining mit deinen Sätzen.",
+ "manualStartTime": "Startzeit",
+ "manualDuration": "Dauer",
+ "manualDurationUnset": "Dauer eintragen",
+ "stravaRow": "Zu Strava exportieren (Beta)",
+ "stravaBeta": "BETA",
+ "stravaIntro": "Wähle ein Training für Strava. Du bekommst eine .fit-Datei: Lade sie im Browser auf strava.com/upload/select hoch, dann erscheint sie als Krafttraining mit deinen Sätzen.",
+ "stravaEmpty": "Noch keine Trainings zum Exportieren.",
+ "tapToPause": "Tippen zum Pausieren",
+ "holdPausedHint": "Pausiert · tippen zum Fortsetzen",
+ "finishHoldNow": "Satz jetzt beenden",
+ "barWeight": "Gewicht von Stange oder Schlitten",
+ "barWeightHint": "Wird vom Scheibenrechner genutzt",
+ "barWeightCustom": "Eigenes · tippen zum Zurücksetzen"
}
diff --git a/lib/l10n/app_en.arb b/lib/l10n/app_en.arb
index 0e89242..55128e9 100644
--- a/lib/l10n/app_en.arb
+++ b/lib/l10n/app_en.arb
@@ -386,7 +386,7 @@
"setDay": "SET {day}",
"@setDay": { "placeholders": { "day": { "type": "String" } } },
"newRoutineName": "New routine",
- "dragToReorder": "Hold and drag to reorder — this is the order you train in.",
+ "dragToReorder": "Drag the dotted handle to reorder — this is the order you train in.",
"reorderHandle": "Reorder {name}",
"@reorderHandle": { "placeholders": { "name": { "type": "String" } } },
"removeFromRoutine": "Remove from routine",
@@ -988,7 +988,6 @@
"elapsedCaps": "ELAPSED",
"tapToSkip": "Tap to skip",
- "tapToStop": "Tap to stop",
"screenLocked": "Screen locked",
"lockedHint": "Press and hold the fingerprint at the top to unlock",
@@ -1085,5 +1084,22 @@
"@planBody": {"placeholders": {"sex": {"type": "String"}, "age": {"type": "int"}, "height": {"type": "String"}, "weight": {"type": "String"}}},
"@planDays": {"placeholders": {"n": {"type": "int"}}},
"@planHistory": {"placeholders": {"n": {"type": "int"}}},
- "backToTop": "Back to top"
+ "backToTop": "Back to top",
+ "deleteExerciseTitle": "Delete this exercise?",
+ "deleteExerciseBody": "\"{name}\" will be removed from your library and routines. Your past sets are kept.",
+ "@deleteExerciseBody": {"placeholders": {"name": {"type": "String"}}},
+ "exportForStravaHint": "Upload it in a browser at strava.com/upload/select (the Strava app can't import files). It shows up as a Weight Training with your sets.",
+ "manualStartTime": "Start time",
+ "manualDuration": "Duration",
+ "manualDurationUnset": "Add duration",
+ "stravaRow": "Export to Strava (beta)",
+ "stravaBeta": "BETA",
+ "stravaIntro": "Pick a workout to take it to Strava. You get a .fit file: upload it in a browser at strava.com/upload/select and it shows up as a Weight Training with your sets.",
+ "stravaEmpty": "No workouts to export yet.",
+ "tapToPause": "Tap to pause",
+ "holdPausedHint": "Paused · tap to resume",
+ "finishHoldNow": "Finish set now",
+ "barWeight": "Bar or sled weight",
+ "barWeightHint": "Used by the plate calculator",
+ "barWeightCustom": "Your own · tap to reset"
}
diff --git a/lib/l10n/app_es.arb b/lib/l10n/app_es.arb
index 86e38e1..052b9c0 100644
--- a/lib/l10n/app_es.arb
+++ b/lib/l10n/app_es.arb
@@ -352,7 +352,7 @@
"exercisesWithCount": "EJERCICIOS · {n}",
"setDay": "PONER {day}",
"newRoutineName": "Rutina nueva",
- "dragToReorder": "Mantén y arrastra para reordenar — es el orden en que entrenas.",
+ "dragToReorder": "Arrastra el asa de puntos para reordenar: es el orden en que entrenas.",
"reorderHandle": "Reordenar {name}",
"removeFromRoutine": "Quitar de la rutina",
@@ -917,7 +917,6 @@
"elapsedCaps": "TRANSCURRIDO",
"tapToSkip": "Toca para saltar",
- "tapToStop": "Toca para parar",
"screenLocked": "Pantalla bloqueada",
"lockedHint": "Mantén pulsada la huella de arriba para desbloquear",
@@ -1005,5 +1004,21 @@
"planHistory": "{n, plural, =1{1 entreno registrado en los últimos 30 días.} other{{n} entrenos registrados en los últimos 30 días.}}",
"planBestLifts": "Mejores series recientes",
"planAskFirst": "Si no sabes mi objetivo (fuerza, músculo, perder grasa o forma general) o cuánto puede durar cada sesión, pregúntamelo primero en un mensaje corto. Cuando lo tengas, responde solo con JSON.",
- "backToTop": "Volver arriba"
+ "backToTop": "Volver arriba",
+ "deleteExerciseTitle": "¿Borrar este ejercicio?",
+ "deleteExerciseBody": "\"{name}\" se quitará de tu biblioteca y de tus rutinas. Tus series anteriores se conservan.",
+ "exportForStravaHint": "Súbelo desde el navegador en strava.com/upload/select (la app de Strava no importa archivos). Aparece como Entrenamiento con pesas, con tus series.",
+ "manualStartTime": "Hora de inicio",
+ "manualDuration": "Duración",
+ "manualDurationUnset": "Añadir duración",
+ "stravaRow": "Exportar a Strava (beta)",
+ "stravaBeta": "BETA",
+ "stravaIntro": "Elige un entreno para llevarlo a Strava. Te llevas un archivo .fit: súbelo desde el navegador en strava.com/upload/select y aparece como Entrenamiento con pesas, con tus series.",
+ "stravaEmpty": "Aún no hay entrenos para exportar.",
+ "tapToPause": "Toca para pausar",
+ "holdPausedHint": "En pausa · toca para seguir",
+ "finishHoldNow": "Terminar la serie ya",
+ "barWeight": "Peso de la barra o carro",
+ "barWeightHint": "Lo usa la calculadora de discos",
+ "barWeightCustom": "Propio · toca para quitarlo"
}
diff --git a/lib/l10n/app_fr.arb b/lib/l10n/app_fr.arb
index dab27dc..1f306a6 100644
--- a/lib/l10n/app_fr.arb
+++ b/lib/l10n/app_fr.arb
@@ -347,7 +347,7 @@
}
},
"newRoutineName": "Nouveau programme",
- "dragToReorder": "Maintiens et fais glisser pour réorganiser — c’est l’ordre de ta séance.",
+ "dragToReorder": "Fais glisser la poignée à points pour réordonner : c’est l’ordre de ta séance.",
"reorderHandle": "Réorganiser {name}",
"@reorderHandle": {
"placeholders": {
@@ -1114,7 +1114,6 @@
"tplAbcde": "Cinq jours, un groupe par jour : pecs, dos, jambes, épaules, bras.",
"elapsedCaps": "ÉCOULÉ",
"tapToSkip": "Touche pour passer",
- "tapToStop": "Touche pour arrêter",
"screenLocked": "Écran verrouillé",
"lockedHint": "Maintiens l'empreinte en haut pour déverrouiller",
"liveDoneSet": "Série faite",
@@ -1198,5 +1197,21 @@
"planHistory": "{n, plural, =1{1 séance enregistrée ces 30 derniers jours.} other{{n} séances enregistrées ces 30 derniers jours.}}",
"planBestLifts": "Meilleures séries récentes",
"planAskFirst": "Si tu ne connais pas mon objectif (force, muscle, perte de gras ou forme générale) ou la durée possible d’une séance, demande-le-moi d’abord en un court message. Ensuite, réponds uniquement en JSON.",
- "backToTop": "Revenir en haut"
+ "backToTop": "Revenir en haut",
+ "deleteExerciseTitle": "Supprimer cet exercice ?",
+ "deleteExerciseBody": "« {name} » sera retiré de ta bibliothèque et de tes programmes. Tes séries passées sont conservées.",
+ "exportForStravaHint": "Importe-le depuis un navigateur sur strava.com/upload/select (l’app Strava n’importe pas de fichiers). Il apparaît comme musculation avec tes séries.",
+ "manualStartTime": "Heure de début",
+ "manualDuration": "Durée",
+ "manualDurationUnset": "Ajouter la durée",
+ "stravaRow": "Exporter vers Strava (bêta)",
+ "stravaBeta": "BÊTA",
+ "stravaIntro": "Choisis une séance à envoyer sur Strava. Tu obtiens un fichier .fit : importe-le depuis un navigateur sur strava.com/upload/select, il apparaît comme musculation avec tes séries.",
+ "stravaEmpty": "Aucune séance à exporter pour l’instant.",
+ "tapToPause": "Touche pour mettre en pause",
+ "holdPausedHint": "En pause · touche pour reprendre",
+ "finishHoldNow": "Finir la série maintenant",
+ "barWeight": "Poids de la barre ou du chariot",
+ "barWeightHint": "Utilisé par le calculateur de disques",
+ "barWeightCustom": "Personnalisé · touche pour réinitialiser"
}
diff --git a/lib/l10n/app_it.arb b/lib/l10n/app_it.arb
index a71f3a1..a67f141 100644
--- a/lib/l10n/app_it.arb
+++ b/lib/l10n/app_it.arb
@@ -386,7 +386,7 @@
"setDay": "IMPOSTA {day}",
"@setDay": { "placeholders": { "day": { "type": "String" } } },
"newRoutineName": "Nuova routine",
- "dragToReorder": "Tieni premuto e trascina per riordinare — è l'ordine in cui ti alleni.",
+ "dragToReorder": "Trascina la maniglia a puntini per riordinare: è l’ordine in cui ti alleni.",
"reorderHandle": "Riordina {name}",
"@reorderHandle": { "placeholders": { "name": { "type": "String" } } },
"removeFromRoutine": "Rimuovi dalla routine",
@@ -957,7 +957,6 @@
"elapsedCaps": "TRASCORSO",
"tapToSkip": "Tocca per saltare",
- "tapToStop": "Tocca per fermare",
"screenLocked": "Schermo bloccato",
"lockedHint": "Tieni premuta l'impronta in alto per sbloccare",
@@ -1045,5 +1044,21 @@
"planHistory": "{n, plural, =1{1 allenamento negli ultimi 30 giorni.} other{{n} allenamenti negli ultimi 30 giorni.}}",
"planBestLifts": "Migliori serie recenti",
"planAskFirst": "Se non conosci il mio obiettivo (forza, massa, dimagrimento o forma generale) o quanto può durare una sessione, chiedimelo prima con un breve messaggio. Poi rispondi solo in JSON.",
- "backToTop": "Torna su"
+ "backToTop": "Torna su",
+ "deleteExerciseTitle": "Eliminare questo esercizio?",
+ "deleteExerciseBody": "«{name}» verrà tolto dalla libreria e dalle schede. Le serie passate restano.",
+ "exportForStravaHint": "Caricalo dal browser su strava.com/upload/select (l’app di Strava non importa file). Compare come allenamento con i pesi, con le tue serie.",
+ "manualStartTime": "Ora di inizio",
+ "manualDuration": "Durata",
+ "manualDurationUnset": "Aggiungi durata",
+ "stravaRow": "Esporta su Strava (beta)",
+ "stravaBeta": "BETA",
+ "stravaIntro": "Scegli un allenamento da portare su Strava. Ottieni un file .fit: caricalo dal browser su strava.com/upload/select e compare come allenamento con i pesi, con le tue serie.",
+ "stravaEmpty": "Ancora nessun allenamento da esportare.",
+ "tapToPause": "Tocca per mettere in pausa",
+ "holdPausedHint": "In pausa · tocca per riprendere",
+ "finishHoldNow": "Chiudi la serie ora",
+ "barWeight": "Peso del bilanciere o della slitta",
+ "barWeightHint": "Usato dal calcolatore dei dischi",
+ "barWeightCustom": "Personalizzato · tocca per azzerare"
}
diff --git a/lib/l10n/app_ja.arb b/lib/l10n/app_ja.arb
index fb1d62e..3e7c1b2 100644
--- a/lib/l10n/app_ja.arb
+++ b/lib/l10n/app_ja.arb
@@ -347,7 +347,7 @@
}
},
"newRoutineName": "新しいルーティン",
- "dragToReorder": "長押ししてドラッグで並べ替え — この順番でトレーニングします。",
+ "dragToReorder": "点のハンドルをドラッグして並べ替え。この順番でトレーニングします。",
"reorderHandle": "{name} を並べ替え",
"@reorderHandle": {
"placeholders": {
@@ -1114,7 +1114,6 @@
"tplAbcde": "5日、1日1部位:胸、背中、脚、肩、腕。",
"elapsedCaps": "経過",
"tapToSkip": "タップでスキップ",
- "tapToStop": "タップで停止",
"screenLocked": "画面ロック中",
"lockedHint": "上の指紋マークを長押しして解除します",
"liveDoneSet": "セット完了",
@@ -1198,5 +1197,21 @@
"planHistory": "{n, plural, =1{直近30日のトレーニングは1回。} other{直近30日のトレーニングは{n}回。}}",
"planBestLifts": "最近のベストセット",
"planAskFirst": "目標(筋力、筋肥大、減量、体力づくり)や1回の時間が分からなければ、まず短いメッセージで質問してください。分かったらJSONだけで答えてください。",
- "backToTop": "先頭へ戻る"
+ "backToTop": "先頭へ戻る",
+ "deleteExerciseTitle": "この種目を削除しますか?",
+ "deleteExerciseBody": "「{name}」をライブラリとルーティンから削除します。これまでのセットは残ります。",
+ "exportForStravaHint": "ブラウザで strava.com/upload/select からアップロード(Stravaアプリはファイルを取り込めません)。セット付きのウェイトトレーニングとして表示されます。",
+ "manualStartTime": "開始時刻",
+ "manualDuration": "時間",
+ "manualDurationUnset": "時間を入力",
+ "stravaRow": "Stravaへ書き出し(ベータ)",
+ "stravaBeta": "ベータ",
+ "stravaIntro": "Stravaに送るトレーニングを選んでください。.fitファイルができるので、ブラウザで strava.com/upload/select からアップロードすると、セット付きのウェイトトレーニングとして表示されます。",
+ "stravaEmpty": "書き出せるトレーニングはまだありません。",
+ "tapToPause": "タップで一時停止",
+ "holdPausedHint": "一時停止中 · タップで再開",
+ "finishHoldNow": "今すぐセットを終える",
+ "barWeight": "バーまたはスレッドの重さ",
+ "barWeightHint": "プレート計算に使われます",
+ "barWeightCustom": "自分で設定 · タップでリセット"
}
diff --git a/lib/l10n/app_ko.arb b/lib/l10n/app_ko.arb
index 9ae730e..d708beb 100644
--- a/lib/l10n/app_ko.arb
+++ b/lib/l10n/app_ko.arb
@@ -347,7 +347,7 @@
}
},
"newRoutineName": "새 루틴",
- "dragToReorder": "길게 눌러 드래그해 순서를 바꾸세요 — 이 순서로 운동합니다.",
+ "dragToReorder": "점 손잡이를 끌어 순서를 바꾸세요. 이 순서대로 운동해요.",
"reorderHandle": "{name} 순서 변경",
"@reorderHandle": {
"placeholders": {
@@ -1114,7 +1114,6 @@
"tplAbcde": "5일, 하루 한 부위: 가슴, 등, 하체, 어깨, 팔.",
"elapsedCaps": "경과",
"tapToSkip": "탭해서 건너뛰기",
- "tapToStop": "탭해서 정지",
"screenLocked": "화면 잠김",
"lockedHint": "위쪽 지문 아이콘을 길게 눌러 잠금 해제",
"liveDoneSet": "세트 완료",
@@ -1198,5 +1197,21 @@
"planHistory": "{n, plural, =1{최근 30일 운동 1회.} other{최근 30일 운동 {n}회.}}",
"planBestLifts": "최근 최고 세트",
"planAskFirst": "내 목표(근력, 근육, 체지방 감량, 전반적 체력)나 한 번에 운동할 수 있는 시간을 모르면 먼저 짧게 물어봐 주세요. 알게 되면 JSON으로만 답해 주세요.",
- "backToTop": "맨 위로"
+ "backToTop": "맨 위로",
+ "deleteExerciseTitle": "이 운동을 삭제할까요?",
+ "deleteExerciseBody": "\"{name}\"이(가) 라이브러리와 루틴에서 삭제돼요. 지난 세트 기록은 남아요.",
+ "exportForStravaHint": "브라우저에서 strava.com/upload/select 로 올리세요(Strava 앱은 파일을 가져올 수 없어요). 세트와 함께 웨이트 트레이닝으로 표시돼요.",
+ "manualStartTime": "시작 시간",
+ "manualDuration": "운동 시간",
+ "manualDurationUnset": "시간 추가",
+ "stravaRow": "Strava로 내보내기 (베타)",
+ "stravaBeta": "베타",
+ "stravaIntro": "Strava로 보낼 운동을 고르세요. .fit 파일이 만들어지면 브라우저에서 strava.com/upload/select 로 올리세요. 세트와 함께 웨이트 트레이닝으로 표시돼요.",
+ "stravaEmpty": "아직 내보낼 운동이 없어요.",
+ "tapToPause": "탭하면 일시정지",
+ "holdPausedHint": "일시정지됨 · 탭하면 계속",
+ "finishHoldNow": "지금 세트 끝내기",
+ "barWeight": "바 또는 슬레드 무게",
+ "barWeightHint": "원판 계산기에 사용돼요",
+ "barWeightCustom": "직접 설정 · 탭하면 초기화"
}
diff --git a/lib/l10n/app_localizations.dart b/lib/l10n/app_localizations.dart
index 447cfb5..c821005 100644
--- a/lib/l10n/app_localizations.dart
+++ b/lib/l10n/app_localizations.dart
@@ -2021,7 +2021,7 @@ abstract class AppLocalizations {
/// No description provided for @dragToReorder.
///
/// In en, this message translates to:
- /// **'Hold and drag to reorder — this is the order you train in.'**
+ /// **'Drag the dotted handle to reorder — this is the order you train in.'**
String get dragToReorder;
/// No description provided for @reorderHandle.
@@ -2579,7 +2579,7 @@ abstract class AppLocalizations {
/// No description provided for @barWeight.
///
/// In en, this message translates to:
- /// **'BAR WEIGHT'**
+ /// **'Bar or sled weight'**
String get barWeight;
/// No description provided for @perSide.
@@ -5114,12 +5114,6 @@ abstract class AppLocalizations {
/// **'Tap to skip'**
String get tapToSkip;
- /// No description provided for @tapToStop.
- ///
- /// In en, this message translates to:
- /// **'Tap to stop'**
- String get tapToStop;
-
/// No description provided for @screenLocked.
///
/// In en, this message translates to:
@@ -5587,6 +5581,96 @@ abstract class AppLocalizations {
/// In en, this message translates to:
/// **'Back to top'**
String get backToTop;
+
+ /// No description provided for @deleteExerciseTitle.
+ ///
+ /// In en, this message translates to:
+ /// **'Delete this exercise?'**
+ String get deleteExerciseTitle;
+
+ /// No description provided for @deleteExerciseBody.
+ ///
+ /// In en, this message translates to:
+ /// **'\"{name}\" will be removed from your library and routines. Your past sets are kept.'**
+ String deleteExerciseBody(String name);
+
+ /// No description provided for @exportForStravaHint.
+ ///
+ /// In en, this message translates to:
+ /// **'Upload it in a browser at strava.com/upload/select (the Strava app can\'t import files). It shows up as a Weight Training with your sets.'**
+ String get exportForStravaHint;
+
+ /// No description provided for @manualStartTime.
+ ///
+ /// In en, this message translates to:
+ /// **'Start time'**
+ String get manualStartTime;
+
+ /// No description provided for @manualDuration.
+ ///
+ /// In en, this message translates to:
+ /// **'Duration'**
+ String get manualDuration;
+
+ /// No description provided for @manualDurationUnset.
+ ///
+ /// In en, this message translates to:
+ /// **'Add duration'**
+ String get manualDurationUnset;
+
+ /// No description provided for @stravaRow.
+ ///
+ /// In en, this message translates to:
+ /// **'Export to Strava (beta)'**
+ String get stravaRow;
+
+ /// No description provided for @stravaBeta.
+ ///
+ /// In en, this message translates to:
+ /// **'BETA'**
+ String get stravaBeta;
+
+ /// No description provided for @stravaIntro.
+ ///
+ /// In en, this message translates to:
+ /// **'Pick a workout to take it to Strava. You get a .fit file: upload it in a browser at strava.com/upload/select and it shows up as a Weight Training with your sets.'**
+ String get stravaIntro;
+
+ /// No description provided for @stravaEmpty.
+ ///
+ /// In en, this message translates to:
+ /// **'No workouts to export yet.'**
+ String get stravaEmpty;
+
+ /// No description provided for @tapToPause.
+ ///
+ /// In en, this message translates to:
+ /// **'Tap to pause'**
+ String get tapToPause;
+
+ /// No description provided for @holdPausedHint.
+ ///
+ /// In en, this message translates to:
+ /// **'Paused · tap to resume'**
+ String get holdPausedHint;
+
+ /// No description provided for @finishHoldNow.
+ ///
+ /// In en, this message translates to:
+ /// **'Finish set now'**
+ String get finishHoldNow;
+
+ /// No description provided for @barWeightHint.
+ ///
+ /// In en, this message translates to:
+ /// **'Used by the plate calculator'**
+ String get barWeightHint;
+
+ /// No description provided for @barWeightCustom.
+ ///
+ /// In en, this message translates to:
+ /// **'Your own · tap to reset'**
+ String get barWeightCustom;
}
class _AppLocalizationsDelegate extends LocalizationsDelegate<AppLocalizations> {
diff --git a/lib/l10n/app_localizations_ar.dart b/lib/l10n/app_localizations_ar.dart
index 9c8fb2c..0be6284 100644
--- a/lib/l10n/app_localizations_ar.dart
+++ b/lib/l10n/app_localizations_ar.dart
@@ -1125,7 +1125,7 @@ class AppLocalizationsAr extends AppLocalizations {
String get newRoutineName => 'روتين جديد';
@override
- String get dragToReorder => 'اضغط مطولًا واسحب لإعادة الترتيب — هذا هو ترتيب تمرينك.';
+ String get dragToReorder => 'اسحب المقبض المنقّط لإعادة الترتيب — هذا هو ترتيب تمرينك.';
@override
String reorderHandle(String name) {
@@ -1430,7 +1430,7 @@ class AppLocalizationsAr extends AppLocalizations {
String get activityLevel => 'مستوى النشاط';
@override
- String get barWeight => 'وزن البار';
+ String get barWeight => 'وزن البار أو المزلجة';
@override
String get perSide => 'لكل جانب';
@@ -2854,9 +2854,6 @@ class AppLocalizationsAr extends AppLocalizations {
@override
String get tapToSkip => 'اضغط للتخطي';
- @override
- String get tapToStop => 'اضغط للإيقاف';
-
@override
String get screenLocked => 'الشاشة مقفلة';
@@ -3125,4 +3122,53 @@ class AppLocalizationsAr extends AppLocalizations {
@override
String get backToTop => 'العودة للأعلى';
+
+ @override
+ String get deleteExerciseTitle => 'حذف هذا التمرين؟';
+
+ @override
+ String deleteExerciseBody(String name) {
+ return 'سيُزال «$name» من مكتبتك ومن روتيناتك. تبقى مجموعاتك السابقة محفوظة.';
+ }
+
+ @override
+ String get exportForStravaHint =>
+ 'ارفعه من المتصفح على strava.com/upload/select (تطبيق Strava لا يستورد الملفات). سيظهر كتمرين أوزان مع مجموعاتك.';
+
+ @override
+ String get manualStartTime => 'وقت البدء';
+
+ @override
+ String get manualDuration => 'المدة';
+
+ @override
+ String get manualDurationUnset => 'أضف المدة';
+
+ @override
+ String get stravaRow => 'تصدير إلى Strava (تجريبي)';
+
+ @override
+ String get stravaBeta => 'تجريبي';
+
+ @override
+ String get stravaIntro =>
+ 'اختر تمرينًا لنقله إلى Strava. ستحصل على ملف .fit: ارفعه من المتصفح على strava.com/upload/select وسيظهر كتمرين أوزان مع مجموعاتك.';
+
+ @override
+ String get stravaEmpty => 'لا توجد تمارين للتصدير بعد.';
+
+ @override
+ String get tapToPause => 'اضغط للإيقاف المؤقت';
+
+ @override
+ String get holdPausedHint => 'متوقف مؤقتًا · اضغط للمتابعة';
+
+ @override
+ String get finishHoldNow => 'أنهِ المجموعة الآن';
+
+ @override
+ String get barWeightHint => 'تستخدمه حاسبة الأقراص';
+
+ @override
+ String get barWeightCustom => 'مخصص · اضغط لإعادة الضبط';
}
diff --git a/lib/l10n/app_localizations_de.dart b/lib/l10n/app_localizations_de.dart
index 777b591..9dc4e11 100644
--- a/lib/l10n/app_localizations_de.dart
+++ b/lib/l10n/app_localizations_de.dart
@@ -1138,8 +1138,7 @@ class AppLocalizationsDe extends AppLocalizations {
String get newRoutineName => 'Neuer Trainingsplan';
@override
- String get dragToReorder =>
- 'Gedrückt halten und ziehen zum Sortieren — dies ist die Reihenfolge deines Trainings.';
+ String get dragToReorder => 'Zieh am Punkte-Griff, um die Reihenfolge zu ändern — so trainierst du.';
@override
String reorderHandle(String name) {
@@ -1445,7 +1444,7 @@ class AppLocalizationsDe extends AppLocalizations {
String get activityLevel => 'AKTIVITÄTSSTUFE';
@override
- String get barWeight => 'STANGENGEWICHT';
+ String get barWeight => 'Gewicht von Stange oder Schlitten';
@override
String get perSide => 'PRO SEITE';
@@ -2876,9 +2875,6 @@ class AppLocalizationsDe extends AppLocalizations {
@override
String get tapToSkip => 'Tippen zum Überspringen';
- @override
- String get tapToStop => 'Tippen zum Stoppen';
-
@override
String get screenLocked => 'Bildschirm gesperrt';
@@ -3144,4 +3140,53 @@ class AppLocalizationsDe extends AppLocalizations {
@override
String get backToTop => 'Nach oben';
+
+ @override
+ String get deleteExerciseTitle => 'Diese Übung löschen?';
+
+ @override
+ String deleteExerciseBody(String name) {
+ return '„$name“ wird aus deiner Bibliothek und deinen Plänen entfernt. Deine bisherigen Sätze bleiben erhalten.';
+ }
+
+ @override
+ String get exportForStravaHint =>
+ 'Lade die Datei im Browser auf strava.com/upload/select hoch (die Strava-App kann keine Dateien importieren). Sie erscheint als Krafttraining mit deinen Sätzen.';
+
+ @override
+ String get manualStartTime => 'Startzeit';
+
+ @override
+ String get manualDuration => 'Dauer';
+
+ @override
+ String get manualDurationUnset => 'Dauer eintragen';
+
+ @override
+ String get stravaRow => 'Zu Strava exportieren (Beta)';
+
+ @override
+ String get stravaBeta => 'BETA';
+
+ @override
+ String get stravaIntro =>
+ 'Wähle ein Training für Strava. Du bekommst eine .fit-Datei: Lade sie im Browser auf strava.com/upload/select hoch, dann erscheint sie als Krafttraining mit deinen Sätzen.';
+
+ @override
+ String get stravaEmpty => 'Noch keine Trainings zum Exportieren.';
+
+ @override
+ String get tapToPause => 'Tippen zum Pausieren';
+
+ @override
+ String get holdPausedHint => 'Pausiert · tippen zum Fortsetzen';
+
+ @override
+ String get finishHoldNow => 'Satz jetzt beenden';
+
+ @override
+ String get barWeightHint => 'Wird vom Scheibenrechner genutzt';
+
+ @override
+ String get barWeightCustom => 'Eigenes · tippen zum Zurücksetzen';
}
diff --git a/lib/l10n/app_localizations_en.dart b/lib/l10n/app_localizations_en.dart
index ba9c728..201228c 100644
--- a/lib/l10n/app_localizations_en.dart
+++ b/lib/l10n/app_localizations_en.dart
@@ -1133,7 +1133,7 @@ class AppLocalizationsEn extends AppLocalizations {
String get newRoutineName => 'New routine';
@override
- String get dragToReorder => 'Hold and drag to reorder — this is the order you train in.';
+ String get dragToReorder => 'Drag the dotted handle to reorder — this is the order you train in.';
@override
String reorderHandle(String name) {
@@ -1438,7 +1438,7 @@ class AppLocalizationsEn extends AppLocalizations {
String get activityLevel => 'ACTIVITY LEVEL';
@override
- String get barWeight => 'BAR WEIGHT';
+ String get barWeight => 'Bar or sled weight';
@override
String get perSide => 'PER SIDE';
@@ -2858,9 +2858,6 @@ class AppLocalizationsEn extends AppLocalizations {
@override
String get tapToSkip => 'Tap to skip';
- @override
- String get tapToStop => 'Tap to stop';
-
@override
String get screenLocked => 'Screen locked';
@@ -3123,4 +3120,53 @@ class AppLocalizationsEn extends AppLocalizations {
@override
String get backToTop => 'Back to top';
+
+ @override
+ String get deleteExerciseTitle => 'Delete this exercise?';
+
+ @override
+ String deleteExerciseBody(String name) {
+ return '\"$name\" will be removed from your library and routines. Your past sets are kept.';
+ }
+
+ @override
+ String get exportForStravaHint =>
+ 'Upload it in a browser at strava.com/upload/select (the Strava app can\'t import files). It shows up as a Weight Training with your sets.';
+
+ @override
+ String get manualStartTime => 'Start time';
+
+ @override
+ String get manualDuration => 'Duration';
+
+ @override
+ String get manualDurationUnset => 'Add duration';
+
+ @override
+ String get stravaRow => 'Export to Strava (beta)';
+
+ @override
+ String get stravaBeta => 'BETA';
+
+ @override
+ String get stravaIntro =>
+ 'Pick a workout to take it to Strava. You get a .fit file: upload it in a browser at strava.com/upload/select and it shows up as a Weight Training with your sets.';
+
+ @override
+ String get stravaEmpty => 'No workouts to export yet.';
+
+ @override
+ String get tapToPause => 'Tap to pause';
+
+ @override
+ String get holdPausedHint => 'Paused · tap to resume';
+
+ @override
+ String get finishHoldNow => 'Finish set now';
+
+ @override
+ String get barWeightHint => 'Used by the plate calculator';
+
+ @override
+ String get barWeightCustom => 'Your own · tap to reset';
}
diff --git a/lib/l10n/app_localizations_es.dart b/lib/l10n/app_localizations_es.dart
index 7e96ea7..2918c95 100644
--- a/lib/l10n/app_localizations_es.dart
+++ b/lib/l10n/app_localizations_es.dart
@@ -1132,7 +1132,7 @@ class AppLocalizationsEs extends AppLocalizations {
String get newRoutineName => 'Rutina nueva';
@override
- String get dragToReorder => 'Mantén y arrastra para reordenar — es el orden en que entrenas.';
+ String get dragToReorder => 'Arrastra el asa de puntos para reordenar: es el orden en que entrenas.';
@override
String reorderHandle(String name) {
@@ -1437,7 +1437,7 @@ class AppLocalizationsEs extends AppLocalizations {
String get activityLevel => 'NIVEL DE ACTIVIDAD';
@override
- String get barWeight => 'PESO DE LA BARRA';
+ String get barWeight => 'Peso de la barra o carro';
@override
String get perSide => 'POR LADO';
@@ -2860,9 +2860,6 @@ class AppLocalizationsEs extends AppLocalizations {
@override
String get tapToSkip => 'Toca para saltar';
- @override
- String get tapToStop => 'Toca para parar';
-
@override
String get screenLocked => 'Pantalla bloqueada';
@@ -3125,4 +3122,53 @@ class AppLocalizationsEs extends AppLocalizations {
@override
String get backToTop => 'Volver arriba';
+
+ @override
+ String get deleteExerciseTitle => '¿Borrar este ejercicio?';
+
+ @override
+ String deleteExerciseBody(String name) {
+ return '\"$name\" se quitará de tu biblioteca y de tus rutinas. Tus series anteriores se conservan.';
+ }
+
+ @override
+ String get exportForStravaHint =>
+ 'Súbelo desde el navegador en strava.com/upload/select (la app de Strava no importa archivos). Aparece como Entrenamiento con pesas, con tus series.';
+
+ @override
+ String get manualStartTime => 'Hora de inicio';
+
+ @override
+ String get manualDuration => 'Duración';
+
+ @override
+ String get manualDurationUnset => 'Añadir duración';
+
+ @override
+ String get stravaRow => 'Exportar a Strava (beta)';
+
+ @override
+ String get stravaBeta => 'BETA';
+
+ @override
+ String get stravaIntro =>
+ 'Elige un entreno para llevarlo a Strava. Te llevas un archivo .fit: súbelo desde el navegador en strava.com/upload/select y aparece como Entrenamiento con pesas, con tus series.';
+
+ @override
+ String get stravaEmpty => 'Aún no hay entrenos para exportar.';
+
+ @override
+ String get tapToPause => 'Toca para pausar';
+
+ @override
+ String get holdPausedHint => 'En pausa · toca para seguir';
+
+ @override
+ String get finishHoldNow => 'Terminar la serie ya';
+
+ @override
+ String get barWeightHint => 'Lo usa la calculadora de discos';
+
+ @override
+ String get barWeightCustom => 'Propio · toca para quitarlo';
}
diff --git a/lib/l10n/app_localizations_fr.dart b/lib/l10n/app_localizations_fr.dart
index 6c609d1..a964a68 100644
--- a/lib/l10n/app_localizations_fr.dart
+++ b/lib/l10n/app_localizations_fr.dart
@@ -1137,7 +1137,8 @@ class AppLocalizationsFr extends AppLocalizations {
String get newRoutineName => 'Nouveau programme';
@override
- String get dragToReorder => 'Maintiens et fais glisser pour réorganiser — c’est l’ordre de ta séance.';
+ String get dragToReorder =>
+ 'Fais glisser la poignée à points pour réordonner : c’est l’ordre de ta séance.';
@override
String reorderHandle(String name) {
@@ -1443,7 +1444,7 @@ class AppLocalizationsFr extends AppLocalizations {
String get activityLevel => 'NIVEAU D’ACTIVITÉ';
@override
- String get barWeight => 'POIDS DE LA BARRE';
+ String get barWeight => 'Poids de la barre ou du chariot';
@override
String get perSide => 'PAR CÔTÉ';
@@ -2873,9 +2874,6 @@ class AppLocalizationsFr extends AppLocalizations {
@override
String get tapToSkip => 'Touche pour passer';
- @override
- String get tapToStop => 'Touche pour arrêter';
-
@override
String get screenLocked => 'Écran verrouillé';
@@ -3141,4 +3139,53 @@ class AppLocalizationsFr extends AppLocalizations {
@override
String get backToTop => 'Revenir en haut';
+
+ @override
+ String get deleteExerciseTitle => 'Supprimer cet exercice ?';
+
+ @override
+ String deleteExerciseBody(String name) {
+ return '« $name » sera retiré de ta bibliothèque et de tes programmes. Tes séries passées sont conservées.';
+ }
+
+ @override
+ String get exportForStravaHint =>
+ 'Importe-le depuis un navigateur sur strava.com/upload/select (l’app Strava n’importe pas de fichiers). Il apparaît comme musculation avec tes séries.';
+
+ @override
+ String get manualStartTime => 'Heure de début';
+
+ @override
+ String get manualDuration => 'Durée';
+
+ @override
+ String get manualDurationUnset => 'Ajouter la durée';
+
+ @override
+ String get stravaRow => 'Exporter vers Strava (bêta)';
+
+ @override
+ String get stravaBeta => 'BÊTA';
+
+ @override
+ String get stravaIntro =>
+ 'Choisis une séance à envoyer sur Strava. Tu obtiens un fichier .fit : importe-le depuis un navigateur sur strava.com/upload/select, il apparaît comme musculation avec tes séries.';
+
+ @override
+ String get stravaEmpty => 'Aucune séance à exporter pour l’instant.';
+
+ @override
+ String get tapToPause => 'Touche pour mettre en pause';
+
+ @override
+ String get holdPausedHint => 'En pause · touche pour reprendre';
+
+ @override
+ String get finishHoldNow => 'Finir la série maintenant';
+
+ @override
+ String get barWeightHint => 'Utilisé par le calculateur de disques';
+
+ @override
+ String get barWeightCustom => 'Personnalisé · touche pour réinitialiser';
}
diff --git a/lib/l10n/app_localizations_it.dart b/lib/l10n/app_localizations_it.dart
index ba524c5..08de2ac 100644
--- a/lib/l10n/app_localizations_it.dart
+++ b/lib/l10n/app_localizations_it.dart
@@ -1133,7 +1133,7 @@ class AppLocalizationsIt extends AppLocalizations {
String get newRoutineName => 'Nuova routine';
@override
- String get dragToReorder => 'Tieni premuto e trascina per riordinare — è l\'ordine in cui ti alleni.';
+ String get dragToReorder => 'Trascina la maniglia a puntini per riordinare: è l’ordine in cui ti alleni.';
@override
String reorderHandle(String name) {
@@ -1438,7 +1438,7 @@ class AppLocalizationsIt extends AppLocalizations {
String get activityLevel => 'LIVELLO DI ATTIVITÀ';
@override
- String get barWeight => 'PESO DEL BILANCIERE';
+ String get barWeight => 'Peso del bilanciere o della slitta';
@override
String get perSide => 'PER LATO';
@@ -2865,9 +2865,6 @@ class AppLocalizationsIt extends AppLocalizations {
@override
String get tapToSkip => 'Tocca per saltare';
- @override
- String get tapToStop => 'Tocca per fermare';
-
@override
String get screenLocked => 'Schermo bloccato';
@@ -3131,4 +3128,53 @@ class AppLocalizationsIt extends AppLocalizations {
@override
String get backToTop => 'Torna su';
+
+ @override
+ String get deleteExerciseTitle => 'Eliminare questo esercizio?';
+
+ @override
+ String deleteExerciseBody(String name) {
+ return '«$name» verrà tolto dalla libreria e dalle schede. Le serie passate restano.';
+ }
+
+ @override
+ String get exportForStravaHint =>
+ 'Caricalo dal browser su strava.com/upload/select (l’app di Strava non importa file). Compare come allenamento con i pesi, con le tue serie.';
+
+ @override
+ String get manualStartTime => 'Ora di inizio';
+
+ @override
+ String get manualDuration => 'Durata';
+
+ @override
+ String get manualDurationUnset => 'Aggiungi durata';
+
+ @override
+ String get stravaRow => 'Esporta su Strava (beta)';
+
+ @override
+ String get stravaBeta => 'BETA';
+
+ @override
+ String get stravaIntro =>
+ 'Scegli un allenamento da portare su Strava. Ottieni un file .fit: caricalo dal browser su strava.com/upload/select e compare come allenamento con i pesi, con le tue serie.';
+
+ @override
+ String get stravaEmpty => 'Ancora nessun allenamento da esportare.';
+
+ @override
+ String get tapToPause => 'Tocca per mettere in pausa';
+
+ @override
+ String get holdPausedHint => 'In pausa · tocca per riprendere';
+
+ @override
+ String get finishHoldNow => 'Chiudi la serie ora';
+
+ @override
+ String get barWeightHint => 'Usato dal calcolatore dei dischi';
+
+ @override
+ String get barWeightCustom => 'Personalizzato · tocca per azzerare';
}
diff --git a/lib/l10n/app_localizations_ja.dart b/lib/l10n/app_localizations_ja.dart
index 7ab1731..bf52230 100644
--- a/lib/l10n/app_localizations_ja.dart
+++ b/lib/l10n/app_localizations_ja.dart
@@ -1085,7 +1085,7 @@ class AppLocalizationsJa extends AppLocalizations {
String get newRoutineName => '新しいルーティン';
@override
- String get dragToReorder => '長押ししてドラッグで並べ替え — この順番でトレーニングします。';
+ String get dragToReorder => '点のハンドルをドラッグして並べ替え。この順番でトレーニングします。';
@override
String reorderHandle(String name) {
@@ -1388,7 +1388,7 @@ class AppLocalizationsJa extends AppLocalizations {
String get activityLevel => '活動レベル';
@override
- String get barWeight => 'バー重量';
+ String get barWeight => 'バーまたはスレッドの重さ';
@override
String get perSide => '片側';
@@ -2773,9 +2773,6 @@ class AppLocalizationsJa extends AppLocalizations {
@override
String get tapToSkip => 'タップでスキップ';
- @override
- String get tapToStop => 'タップで停止';
-
@override
String get screenLocked => '画面ロック中';
@@ -3034,4 +3031,53 @@ class AppLocalizationsJa extends AppLocalizations {
@override
String get backToTop => '先頭へ戻る';
+
+ @override
+ String get deleteExerciseTitle => 'この種目を削除しますか?';
+
+ @override
+ String deleteExerciseBody(String name) {
+ return '「$name」をライブラリとルーティンから削除します。これまでのセットは残ります。';
+ }
+
+ @override
+ String get exportForStravaHint =>
+ 'ブラウザで strava.com/upload/select からアップロード(Stravaアプリはファイルを取り込めません)。セット付きのウェイトトレーニングとして表示されます。';
+
+ @override
+ String get manualStartTime => '開始時刻';
+
+ @override
+ String get manualDuration => '時間';
+
+ @override
+ String get manualDurationUnset => '時間を入力';
+
+ @override
+ String get stravaRow => 'Stravaへ書き出し(ベータ)';
+
+ @override
+ String get stravaBeta => 'ベータ';
+
+ @override
+ String get stravaIntro =>
+ 'Stravaに送るトレーニングを選んでください。.fitファイルができるので、ブラウザで strava.com/upload/select からアップロードすると、セット付きのウェイトトレーニングとして表示されます。';
+
+ @override
+ String get stravaEmpty => '書き出せるトレーニングはまだありません。';
+
+ @override
+ String get tapToPause => 'タップで一時停止';
+
+ @override
+ String get holdPausedHint => '一時停止中 · タップで再開';
+
+ @override
+ String get finishHoldNow => '今すぐセットを終える';
+
+ @override
+ String get barWeightHint => 'プレート計算に使われます';
+
+ @override
+ String get barWeightCustom => '自分で設定 · タップでリセット';
}
diff --git a/lib/l10n/app_localizations_ko.dart b/lib/l10n/app_localizations_ko.dart
index c174b45..4dbe036 100644
--- a/lib/l10n/app_localizations_ko.dart
+++ b/lib/l10n/app_localizations_ko.dart
@@ -1103,7 +1103,7 @@ class AppLocalizationsKo extends AppLocalizations {
String get newRoutineName => '새 루틴';
@override
- String get dragToReorder => '길게 눌러 드래그해 순서를 바꾸세요 — 이 순서로 운동합니다.';
+ String get dragToReorder => '점 손잡이를 끌어 순서를 바꾸세요. 이 순서대로 운동해요.';
@override
String reorderHandle(String name) {
@@ -1401,7 +1401,7 @@ class AppLocalizationsKo extends AppLocalizations {
String get activityLevel => '활동 수준';
@override
- String get barWeight => '바 무게';
+ String get barWeight => '바 또는 슬레드 무게';
@override
String get perSide => '한쪽당';
@@ -2787,9 +2787,6 @@ class AppLocalizationsKo extends AppLocalizations {
@override
String get tapToSkip => '탭해서 건너뛰기';
- @override
- String get tapToStop => '탭해서 정지';
-
@override
String get screenLocked => '화면 잠김';
@@ -3050,4 +3047,53 @@ class AppLocalizationsKo extends AppLocalizations {
@override
String get backToTop => '맨 위로';
+
+ @override
+ String get deleteExerciseTitle => '이 운동을 삭제할까요?';
+
+ @override
+ String deleteExerciseBody(String name) {
+ return '\"$name\"이(가) 라이브러리와 루틴에서 삭제돼요. 지난 세트 기록은 남아요.';
+ }
+
+ @override
+ String get exportForStravaHint =>
+ '브라우저에서 strava.com/upload/select 로 올리세요(Strava 앱은 파일을 가져올 수 없어요). 세트와 함께 웨이트 트레이닝으로 표시돼요.';
+
+ @override
+ String get manualStartTime => '시작 시간';
+
+ @override
+ String get manualDuration => '운동 시간';
+
+ @override
+ String get manualDurationUnset => '시간 추가';
+
+ @override
+ String get stravaRow => 'Strava로 내보내기 (베타)';
+
+ @override
+ String get stravaBeta => '베타';
+
+ @override
+ String get stravaIntro =>
+ 'Strava로 보낼 운동을 고르세요. .fit 파일이 만들어지면 브라우저에서 strava.com/upload/select 로 올리세요. 세트와 함께 웨이트 트레이닝으로 표시돼요.';
+
+ @override
+ String get stravaEmpty => '아직 내보낼 운동이 없어요.';
+
+ @override
+ String get tapToPause => '탭하면 일시정지';
+
+ @override
+ String get holdPausedHint => '일시정지됨 · 탭하면 계속';
+
+ @override
+ String get finishHoldNow => '지금 세트 끝내기';
+
+ @override
+ String get barWeightHint => '원판 계산기에 사용돼요';
+
+ @override
+ String get barWeightCustom => '직접 설정 · 탭하면 초기화';
}
diff --git a/lib/l10n/app_localizations_nl.dart b/lib/l10n/app_localizations_nl.dart
index 6d09202..2601fcc 100644
--- a/lib/l10n/app_localizations_nl.dart
+++ b/lib/l10n/app_localizations_nl.dart
@@ -1135,7 +1135,7 @@ class AppLocalizationsNl extends AppLocalizations {
String get newRoutineName => 'Nieuwe routine';
@override
- String get dragToReorder => 'Houd vast en sleep om te herschikken — dit is de trainingsvolgorde.';
+ String get dragToReorder => 'Sleep aan het stippengreepje om te herschikken — zo train je ze.';
@override
String reorderHandle(String name) {
@@ -1441,7 +1441,7 @@ class AppLocalizationsNl extends AppLocalizations {
String get activityLevel => 'ACTIVITEITSNIVEAU';
@override
- String get barWeight => 'STANGGEWICHT';
+ String get barWeight => 'Gewicht van stang of slede';
@override
String get perSide => 'PER KANT';
@@ -2868,9 +2868,6 @@ class AppLocalizationsNl extends AppLocalizations {
@override
String get tapToSkip => 'Tik om over te slaan';
- @override
- String get tapToStop => 'Tik om te stoppen';
-
@override
String get screenLocked => 'Scherm vergrendeld';
@@ -3136,4 +3133,53 @@ class AppLocalizationsNl extends AppLocalizations {
@override
String get backToTop => 'Naar boven';
+
+ @override
+ String get deleteExerciseTitle => 'Deze oefening verwijderen?';
+
+ @override
+ String deleteExerciseBody(String name) {
+ return '\"$name\" wordt uit je bibliotheek en routines gehaald. Je eerdere sets blijven bewaard.';
+ }
+
+ @override
+ String get exportForStravaHint =>
+ 'Upload het in een browser op strava.com/upload/select (de Strava-app kan geen bestanden importeren). Het verschijnt als krachttraining met je sets.';
+
+ @override
+ String get manualStartTime => 'Starttijd';
+
+ @override
+ String get manualDuration => 'Duur';
+
+ @override
+ String get manualDurationUnset => 'Duur invullen';
+
+ @override
+ String get stravaRow => 'Exporteren naar Strava (bèta)';
+
+ @override
+ String get stravaBeta => 'BÈTA';
+
+ @override
+ String get stravaIntro =>
+ 'Kies een training voor Strava. Je krijgt een .fit-bestand: upload het in een browser op strava.com/upload/select en het verschijnt als krachttraining met je sets.';
+
+ @override
+ String get stravaEmpty => 'Nog geen trainingen om te exporteren.';
+
+ @override
+ String get tapToPause => 'Tik om te pauzeren';
+
+ @override
+ String get holdPausedHint => 'Gepauzeerd · tik om verder te gaan';
+
+ @override
+ String get finishHoldNow => 'Set nu afronden';
+
+ @override
+ String get barWeightHint => 'Gebruikt door de schijvencalculator';
+
+ @override
+ String get barWeightCustom => 'Eigen · tik om te wissen';
}
diff --git a/lib/l10n/app_localizations_pl.dart b/lib/l10n/app_localizations_pl.dart
index 9bc36b5..46124ec 100644
--- a/lib/l10n/app_localizations_pl.dart
+++ b/lib/l10n/app_localizations_pl.dart
@@ -1134,7 +1134,7 @@ class AppLocalizationsPl extends AppLocalizations {
@override
String get dragToReorder =>
- 'Przytrzymaj i przeciągnij, aby zmienić kolejność — w tej kolejności trenujesz.';
+ 'Przeciągnij uchwyt z kropkami, aby zmienić kolejność — w tej kolejności trenujesz.';
@override
String reorderHandle(String name) {
@@ -1439,7 +1439,7 @@ class AppLocalizationsPl extends AppLocalizations {
String get activityLevel => 'POZIOM AKTYWNOŚCI';
@override
- String get barWeight => 'WAGA GRYFU';
+ String get barWeight => 'Waga sztangi lub sanek';
@override
String get perSide => 'NA STRONĘ';
@@ -2868,9 +2868,6 @@ class AppLocalizationsPl extends AppLocalizations {
@override
String get tapToSkip => 'Dotknij, by pominąć';
- @override
- String get tapToStop => 'Dotknij, by zatrzymać';
-
@override
String get screenLocked => 'Ekran zablokowany';
@@ -3134,4 +3131,53 @@ class AppLocalizationsPl extends AppLocalizations {
@override
String get backToTop => 'Na górę';
+
+ @override
+ String get deleteExerciseTitle => 'Usunąć to ćwiczenie?';
+
+ @override
+ String deleteExerciseBody(String name) {
+ return '„$name” zniknie z biblioteki i planów. Wcześniejsze serie zostaną.';
+ }
+
+ @override
+ String get exportForStravaHint =>
+ 'Prześlij w przeglądarce na strava.com/upload/select (aplikacja Strava nie importuje plików). Pojawi się jako trening siłowy z twoimi seriami.';
+
+ @override
+ String get manualStartTime => 'Godzina rozpoczęcia';
+
+ @override
+ String get manualDuration => 'Czas trwania';
+
+ @override
+ String get manualDurationUnset => 'Dodaj czas trwania';
+
+ @override
+ String get stravaRow => 'Eksport do Stravy (beta)';
+
+ @override
+ String get stravaBeta => 'BETA';
+
+ @override
+ String get stravaIntro =>
+ 'Wybierz trening do Stravy. Dostaniesz plik .fit: prześlij go w przeglądarce na strava.com/upload/select, a pojawi się jako trening siłowy z seriami.';
+
+ @override
+ String get stravaEmpty => 'Brak treningów do eksportu.';
+
+ @override
+ String get tapToPause => 'Dotknij, aby wstrzymać';
+
+ @override
+ String get holdPausedHint => 'Wstrzymane · dotknij, aby wznowić';
+
+ @override
+ String get finishHoldNow => 'Zakończ serię teraz';
+
+ @override
+ String get barWeightHint => 'Używana przez kalkulator talerzy';
+
+ @override
+ String get barWeightCustom => 'Własna · dotknij, aby przywrócić';
}
diff --git a/lib/l10n/app_localizations_pt.dart b/lib/l10n/app_localizations_pt.dart
index 538d2f6..e909067 100644
--- a/lib/l10n/app_localizations_pt.dart
+++ b/lib/l10n/app_localizations_pt.dart
@@ -1135,7 +1135,7 @@ class AppLocalizationsPt extends AppLocalizations {
String get newRoutineName => 'Nova rotina';
@override
- String get dragToReorder => 'Segure e arraste para reordenar — esta é a ordem em que você treina.';
+ String get dragToReorder => 'Arrasta a pega de pontos para reordenar: é a ordem em que treinas.';
@override
String reorderHandle(String name) {
@@ -1440,7 +1440,7 @@ class AppLocalizationsPt extends AppLocalizations {
String get activityLevel => 'NÍVEL DE ATIVIDADE';
@override
- String get barWeight => 'PESO DA BARRA';
+ String get barWeight => 'Peso da barra ou do carro';
@override
String get perSide => 'POR LADO';
@@ -2861,9 +2861,6 @@ class AppLocalizationsPt extends AppLocalizations {
@override
String get tapToSkip => 'Toque para pular';
- @override
- String get tapToStop => 'Toque para parar';
-
@override
String get screenLocked => 'Tela bloqueada';
@@ -3126,4 +3123,53 @@ class AppLocalizationsPt extends AppLocalizations {
@override
String get backToTop => 'Voltar ao topo';
+
+ @override
+ String get deleteExerciseTitle => 'Apagar este exercício?';
+
+ @override
+ String deleteExerciseBody(String name) {
+ return '\"$name\" será removido da tua biblioteca e das tuas rotinas. As séries anteriores ficam guardadas.';
+ }
+
+ @override
+ String get exportForStravaHint =>
+ 'Envia pelo navegador em strava.com/upload/select (a app do Strava não importa ficheiros). Aparece como treino de musculação, com as tuas séries.';
+
+ @override
+ String get manualStartTime => 'Hora de início';
+
+ @override
+ String get manualDuration => 'Duração';
+
+ @override
+ String get manualDurationUnset => 'Adicionar duração';
+
+ @override
+ String get stravaRow => 'Exportar para o Strava (beta)';
+
+ @override
+ String get stravaBeta => 'BETA';
+
+ @override
+ String get stravaIntro =>
+ 'Escolhe um treino para levar para o Strava. Recebes um ficheiro .fit: envia pelo navegador em strava.com/upload/select e aparece como treino de musculação, com as tuas séries.';
+
+ @override
+ String get stravaEmpty => 'Ainda não há treinos para exportar.';
+
+ @override
+ String get tapToPause => 'Toca para pausar';
+
+ @override
+ String get holdPausedHint => 'Em pausa · toca para continuar';
+
+ @override
+ String get finishHoldNow => 'Terminar a série já';
+
+ @override
+ String get barWeightHint => 'Usado pela calculadora de discos';
+
+ @override
+ String get barWeightCustom => 'Próprio · toca para repor';
}
diff --git a/lib/l10n/app_localizations_ru.dart b/lib/l10n/app_localizations_ru.dart
index 39db994..fbe1fc7 100644
--- a/lib/l10n/app_localizations_ru.dart
+++ b/lib/l10n/app_localizations_ru.dart
@@ -1177,7 +1177,7 @@ class AppLocalizationsRu extends AppLocalizations {
String get newRoutineName => 'Новая программа';
@override
- String get dragToReorder => 'Удерживай и перетаскивай, чтобы изменить порядок — в нём ты и тренируешься.';
+ String get dragToReorder => 'Потяните за ручку с точками, чтобы изменить порядок — в нём вы тренируетесь.';
@override
String reorderHandle(String name) {
@@ -1486,7 +1486,7 @@ class AppLocalizationsRu extends AppLocalizations {
String get activityLevel => 'УРОВЕНЬ АКТИВНОСТИ';
@override
- String get barWeight => 'ВЕС ГРИФА';
+ String get barWeight => 'Вес грифа или платформы';
@override
String get perSide => 'НА СТОРОНУ';
@@ -2948,9 +2948,6 @@ class AppLocalizationsRu extends AppLocalizations {
@override
String get tapToSkip => 'Нажми, чтобы пропустить';
- @override
- String get tapToStop => 'Нажми, чтобы остановить';
-
@override
String get screenLocked => 'Экран заблокирован';
@@ -3223,4 +3220,53 @@ class AppLocalizationsRu extends AppLocalizations {
@override
String get backToTop => 'Наверх';
+
+ @override
+ String get deleteExerciseTitle => 'Удалить это упражнение?';
+
+ @override
+ String deleteExerciseBody(String name) {
+ return '«$name» будет удалено из библиотеки и программ. Прошлые подходы сохранятся.';
+ }
+
+ @override
+ String get exportForStravaHint =>
+ 'Загрузите в браузере на strava.com/upload/select (приложение Strava не импортирует файлы). Появится как силовая тренировка с вашими подходами.';
+
+ @override
+ String get manualStartTime => 'Время начала';
+
+ @override
+ String get manualDuration => 'Длительность';
+
+ @override
+ String get manualDurationUnset => 'Указать длительность';
+
+ @override
+ String get stravaRow => 'Экспорт в Strava (бета)';
+
+ @override
+ String get stravaBeta => 'БЕТА';
+
+ @override
+ String get stravaIntro =>
+ 'Выберите тренировку для Strava. Вы получите файл .fit: загрузите его в браузере на strava.com/upload/select, и он появится как силовая тренировка с подходами.';
+
+ @override
+ String get stravaEmpty => 'Пока нет тренировок для экспорта.';
+
+ @override
+ String get tapToPause => 'Нажмите для паузы';
+
+ @override
+ String get holdPausedHint => 'Пауза · нажмите, чтобы продолжить';
+
+ @override
+ String get finishHoldNow => 'Завершить подход сейчас';
+
+ @override
+ String get barWeightHint => 'Используется калькулятором блинов';
+
+ @override
+ String get barWeightCustom => 'Свой · нажмите, чтобы сбросить';
}
diff --git a/lib/l10n/app_localizations_tr.dart b/lib/l10n/app_localizations_tr.dart
index eaf17f1..175ac14 100644
--- a/lib/l10n/app_localizations_tr.dart
+++ b/lib/l10n/app_localizations_tr.dart
@@ -1134,7 +1134,7 @@ class AppLocalizationsTr extends AppLocalizations {
String get newRoutineName => 'Yeni program';
@override
- String get dragToReorder => 'Sıralamak için basılı tutup sürükle — antrenman sırası budur.';
+ String get dragToReorder => 'Sıralamak için noktalı tutamacı sürükle — antrenman sırası budur.';
@override
String reorderHandle(String name) {
@@ -1439,7 +1439,7 @@ class AppLocalizationsTr extends AppLocalizations {
String get activityLevel => 'AKTİVİTE SEVİYESİ';
@override
- String get barWeight => 'BAR AĞIRLIĞI';
+ String get barWeight => 'Bar ya da kızak ağırlığı';
@override
String get perSide => 'HER TARAF';
@@ -2862,9 +2862,6 @@ class AppLocalizationsTr extends AppLocalizations {
@override
String get tapToSkip => 'Geçmek için dokun';
- @override
- String get tapToStop => 'Durdurmak için dokun';
-
@override
String get screenLocked => 'Ekran kilitli';
@@ -3128,4 +3125,53 @@ class AppLocalizationsTr extends AppLocalizations {
@override
String get backToTop => 'Başa dön';
+
+ @override
+ String get deleteExerciseTitle => 'Bu egzersiz silinsin mi?';
+
+ @override
+ String deleteExerciseBody(String name) {
+ return '\"$name\" kütüphanenden ve programlarından kaldırılacak. Önceki setlerin korunur.';
+ }
+
+ @override
+ String get exportForStravaHint =>
+ 'Tarayıcıdan strava.com/upload/select adresine yükle (Strava uygulaması dosya içe aktaramaz). Setlerinle birlikte ağırlık antrenmanı olarak görünür.';
+
+ @override
+ String get manualStartTime => 'Başlangıç saati';
+
+ @override
+ String get manualDuration => 'Süre';
+
+ @override
+ String get manualDurationUnset => 'Süre ekle';
+
+ @override
+ String get stravaRow => 'Strava’ya aktar (beta)';
+
+ @override
+ String get stravaBeta => 'BETA';
+
+ @override
+ String get stravaIntro =>
+ 'Strava’ya götürmek için bir antrenman seç. Bir .fit dosyası alırsın: tarayıcıdan strava.com/upload/select adresine yükle, setlerinle birlikte ağırlık antrenmanı olarak görünür.';
+
+ @override
+ String get stravaEmpty => 'Henüz dışa aktarılacak antrenman yok.';
+
+ @override
+ String get tapToPause => 'Duraklatmak için dokun';
+
+ @override
+ String get holdPausedHint => 'Duraklatıldı · devam için dokun';
+
+ @override
+ String get finishHoldNow => 'Seti şimdi bitir';
+
+ @override
+ String get barWeightHint => 'Plaka hesaplayıcı bunu kullanır';
+
+ @override
+ String get barWeightCustom => 'Kendi değerin · sıfırlamak için dokun';
}
diff --git a/lib/l10n/app_localizations_uk.dart b/lib/l10n/app_localizations_uk.dart
index f76cfff..59edd9a 100644
--- a/lib/l10n/app_localizations_uk.dart
+++ b/lib/l10n/app_localizations_uk.dart
@@ -1133,7 +1133,7 @@ class AppLocalizationsUk extends AppLocalizations {
String get newRoutineName => 'Нова програма';
@override
- String get dragToReorder => 'Утримуй і перетягуй, щоб змінити порядок — у такій послідовності тренуєшся.';
+ String get dragToReorder => 'Потягніть за ручку з крапками, щоб змінити порядок — у ньому ви тренуєтеся.';
@override
String reorderHandle(String name) {
@@ -1438,7 +1438,7 @@ class AppLocalizationsUk extends AppLocalizations {
String get activityLevel => 'РІВЕНЬ АКТИВНОСТІ';
@override
- String get barWeight => 'ВАГА ГРИФА';
+ String get barWeight => 'Вага грифа чи платформи';
@override
String get perSide => 'НА СТОРОНУ';
@@ -2866,9 +2866,6 @@ class AppLocalizationsUk extends AppLocalizations {
@override
String get tapToSkip => 'Торкніться, щоб пропустити';
- @override
- String get tapToStop => 'Торкніться, щоб зупинити';
-
@override
String get screenLocked => 'Екран заблоковано';
@@ -3140,4 +3137,53 @@ class AppLocalizationsUk extends AppLocalizations {
@override
String get backToTop => 'Угору';
+
+ @override
+ String get deleteExerciseTitle => 'Видалити цю вправу?';
+
+ @override
+ String deleteExerciseBody(String name) {
+ return '«$name» буде видалено з бібліотеки та програм. Попередні підходи збережуться.';
+ }
+
+ @override
+ String get exportForStravaHint =>
+ 'Завантажте в браузері на strava.com/upload/select (застосунок Strava не імпортує файли). З’явиться як силове тренування з вашими підходами.';
+
+ @override
+ String get manualStartTime => 'Час початку';
+
+ @override
+ String get manualDuration => 'Тривалість';
+
+ @override
+ String get manualDurationUnset => 'Додати тривалість';
+
+ @override
+ String get stravaRow => 'Експорт у Strava (бета)';
+
+ @override
+ String get stravaBeta => 'БЕТА';
+
+ @override
+ String get stravaIntro =>
+ 'Оберіть тренування для Strava. Ви отримаєте файл .fit: завантажте його в браузері на strava.com/upload/select, і воно з’явиться як силове тренування з підходами.';
+
+ @override
+ String get stravaEmpty => 'Поки немає тренувань для експорту.';
+
+ @override
+ String get tapToPause => 'Торкніться для паузи';
+
+ @override
+ String get holdPausedHint => 'Пауза · торкніться, щоб продовжити';
+
+ @override
+ String get finishHoldNow => 'Завершити підхід зараз';
+
+ @override
+ String get barWeightHint => 'Використовує калькулятор млинців';
+
+ @override
+ String get barWeightCustom => 'Власна · торкніться, щоб скинути';
}
diff --git a/lib/l10n/app_localizations_zh.dart b/lib/l10n/app_localizations_zh.dart
index 6568c65..9f7a942 100644
--- a/lib/l10n/app_localizations_zh.dart
+++ b/lib/l10n/app_localizations_zh.dart
@@ -1080,7 +1080,7 @@ class AppLocalizationsZh extends AppLocalizations {
String get newRoutineName => '新计划';
@override
- String get dragToReorder => '长按并拖动以调整顺序 — 这将决定你的训练顺序。';
+ String get dragToReorder => '拖动带点的手柄调整顺序,这就是你的训练顺序。';
@override
String reorderHandle(String name) {
@@ -1373,7 +1373,7 @@ class AppLocalizationsZh extends AppLocalizations {
String get activityLevel => '日常活动水平';
@override
- String get barWeight => '杠铃杆重';
+ String get barWeight => '杠铃杆或滑车重量';
@override
String get perSide => '单侧配重';
@@ -2734,9 +2734,6 @@ class AppLocalizationsZh extends AppLocalizations {
@override
String get tapToSkip => '点按跳过';
- @override
- String get tapToStop => '点按停止';
-
@override
String get screenLocked => '屏幕已锁定';
@@ -2995,6 +2992,54 @@ class AppLocalizationsZh extends AppLocalizations {
@override
String get backToTop => '回到顶部';
+
+ @override
+ String get deleteExerciseTitle => '删除这个动作?';
+
+ @override
+ String deleteExerciseBody(String name) {
+ return '“$name”将从动作库和训练计划中移除,之前的训练记录会保留。';
+ }
+
+ @override
+ String get exportForStravaHint => '请在浏览器中打开 strava.com/upload/select 上传(Strava 应用无法导入文件),会显示为带组数的力量训练。';
+
+ @override
+ String get manualStartTime => '开始时间';
+
+ @override
+ String get manualDuration => '时长';
+
+ @override
+ String get manualDurationUnset => '添加时长';
+
+ @override
+ String get stravaRow => '导出到 Strava(测试版)';
+
+ @override
+ String get stravaBeta => '测试版';
+
+ @override
+ String get stravaIntro =>
+ '选择一次训练导出到 Strava。你会得到一个 .fit 文件:在浏览器中打开 strava.com/upload/select 上传,会显示为带组数的力量训练。';
+
+ @override
+ String get stravaEmpty => '还没有可导出的训练。';
+
+ @override
+ String get tapToPause => '点按暂停';
+
+ @override
+ String get holdPausedHint => '已暂停 · 点按继续';
+
+ @override
+ String get finishHoldNow => '现在完成这组';
+
+ @override
+ String get barWeightHint => '杠铃片计算器会用到';
+
+ @override
+ String get barWeightCustom => '自定义 · 点按重置';
}
/// The translations for Chinese, using the Han script (`zh_Hant`).
@@ -4073,7 +4118,7 @@ class AppLocalizationsZhHant extends AppLocalizationsZh {
String get newRoutineName => '新增課表';
@override
- String get dragToReorder => '長按並拖曳以重新排序 — 這就是訓練順序。';
+ String get dragToReorder => '拖曳帶點的把手調整順序,這就是你的訓練順序。';
@override
String reorderHandle(String name) {
@@ -4366,7 +4411,7 @@ class AppLocalizationsZhHant extends AppLocalizationsZh {
String get activityLevel => '活動等級';
@override
- String get barWeight => '槓鈴重量';
+ String get barWeight => '槓鈴桿或滑車重量';
@override
String get perSide => '每側';
@@ -5750,9 +5795,6 @@ class AppLocalizationsZhHant extends AppLocalizationsZh {
@override
String get tapToSkip => '點一下略過';
- @override
- String get tapToStop => '點一下停止';
-
@override
String get screenLocked => '螢幕已鎖定';
@@ -6011,4 +6053,52 @@ class AppLocalizationsZhHant extends AppLocalizationsZh {
@override
String get backToTop => '回到頂端';
+
+ @override
+ String get deleteExerciseTitle => '刪除這個動作?';
+
+ @override
+ String deleteExerciseBody(String name) {
+ return '「$name」將從動作庫和課表中移除,之前的訓練紀錄會保留。';
+ }
+
+ @override
+ String get exportForStravaHint => '請在瀏覽器中開啟 strava.com/upload/select 上傳(Strava App 無法匯入檔案),會顯示為含組數的重量訓練。';
+
+ @override
+ String get manualStartTime => '開始時間';
+
+ @override
+ String get manualDuration => '時長';
+
+ @override
+ String get manualDurationUnset => '新增時長';
+
+ @override
+ String get stravaRow => '匯出到 Strava(測試版)';
+
+ @override
+ String get stravaBeta => '測試版';
+
+ @override
+ String get stravaIntro =>
+ '選擇一次訓練匯出到 Strava。你會得到一個 .fit 檔:在瀏覽器中開啟 strava.com/upload/select 上傳,會顯示為含組數的重量訓練。';
+
+ @override
+ String get stravaEmpty => '還沒有可匯出的訓練。';
+
+ @override
+ String get tapToPause => '點按暫停';
+
+ @override
+ String get holdPausedHint => '已暫停 · 點按繼續';
+
+ @override
+ String get finishHoldNow => '現在完成這組';
+
+ @override
+ String get barWeightHint => '槓片計算器會用到';
+
+ @override
+ String get barWeightCustom => '自訂 · 點按重設';
}
diff --git a/lib/l10n/app_nl.arb b/lib/l10n/app_nl.arb
index b22851e..34855bc 100644
--- a/lib/l10n/app_nl.arb
+++ b/lib/l10n/app_nl.arb
@@ -347,7 +347,7 @@
}
},
"newRoutineName": "Nieuwe routine",
- "dragToReorder": "Houd vast en sleep om te herschikken — dit is de trainingsvolgorde.",
+ "dragToReorder": "Sleep aan het stippengreepje om te herschikken — zo train je ze.",
"reorderHandle": "{name} herschikken",
"@reorderHandle": {
"placeholders": {
@@ -1114,7 +1114,6 @@
"tplAbcde": "Vijf dagen, één spiergroep per dag: borst, rug, benen, schouders, armen.",
"elapsedCaps": "VERSTREKEN",
"tapToSkip": "Tik om over te slaan",
- "tapToStop": "Tik om te stoppen",
"screenLocked": "Scherm vergrendeld",
"lockedHint": "Houd de vingerafdruk bovenaan ingedrukt om te ontgrendelen",
"liveDoneSet": "Set klaar",
@@ -1198,5 +1197,21 @@
"planHistory": "{n, plural, =1{1 training in de laatste 30 dagen.} other{{n} trainingen in de laatste 30 dagen.}}",
"planBestLifts": "Beste recente sets",
"planAskFirst": "Als je mijn doel (kracht, spiermassa, vetverlies of algemene fitheid) of de duur van een sessie niet weet, vraag het me eerst in één kort bericht. Antwoord daarna alleen met JSON.",
- "backToTop": "Naar boven"
+ "backToTop": "Naar boven",
+ "deleteExerciseTitle": "Deze oefening verwijderen?",
+ "deleteExerciseBody": "\"{name}\" wordt uit je bibliotheek en routines gehaald. Je eerdere sets blijven bewaard.",
+ "exportForStravaHint": "Upload het in een browser op strava.com/upload/select (de Strava-app kan geen bestanden importeren). Het verschijnt als krachttraining met je sets.",
+ "manualStartTime": "Starttijd",
+ "manualDuration": "Duur",
+ "manualDurationUnset": "Duur invullen",
+ "stravaRow": "Exporteren naar Strava (bèta)",
+ "stravaBeta": "BÈTA",
+ "stravaIntro": "Kies een training voor Strava. Je krijgt een .fit-bestand: upload het in een browser op strava.com/upload/select en het verschijnt als krachttraining met je sets.",
+ "stravaEmpty": "Nog geen trainingen om te exporteren.",
+ "tapToPause": "Tik om te pauzeren",
+ "holdPausedHint": "Gepauzeerd · tik om verder te gaan",
+ "finishHoldNow": "Set nu afronden",
+ "barWeight": "Gewicht van stang of slede",
+ "barWeightHint": "Gebruikt door de schijvencalculator",
+ "barWeightCustom": "Eigen · tik om te wissen"
}
diff --git a/lib/l10n/app_pl.arb b/lib/l10n/app_pl.arb
index db50f12..6cba1e9 100644
--- a/lib/l10n/app_pl.arb
+++ b/lib/l10n/app_pl.arb
@@ -347,7 +347,7 @@
}
},
"newRoutineName": "Nowy plan",
- "dragToReorder": "Przytrzymaj i przeciągnij, aby zmienić kolejność — w tej kolejności trenujesz.",
+ "dragToReorder": "Przeciągnij uchwyt z kropkami, aby zmienić kolejność — w tej kolejności trenujesz.",
"reorderHandle": "Zmień kolejność: {name}",
"@reorderHandle": {
"placeholders": {
@@ -1114,7 +1114,6 @@
"tplAbcde": "Pięć dni, jedna partia dziennie: klatka, plecy, nogi, barki, ramiona.",
"elapsedCaps": "UPŁYNĘŁO",
"tapToSkip": "Dotknij, by pominąć",
- "tapToStop": "Dotknij, by zatrzymać",
"screenLocked": "Ekran zablokowany",
"lockedHint": "Przytrzymaj odcisk palca u góry, aby odblokować",
"liveDoneSet": "Seria zrobiona",
@@ -1198,5 +1197,21 @@
"planHistory": "{n, plural, =1{1 trening w ostatnich 30 dniach.} other{{n} treningów w ostatnich 30 dniach.}}",
"planBestLifts": "Najlepsze ostatnie serie",
"planAskFirst": "Jeśli nie znasz mojego celu (siła, mięśnie, redukcja lub ogólna forma) albo długości sesji, najpierw zapytaj mnie krótko. Potem odpowiedz wyłącznie w JSON.",
- "backToTop": "Na górę"
+ "backToTop": "Na górę",
+ "deleteExerciseTitle": "Usunąć to ćwiczenie?",
+ "deleteExerciseBody": "„{name}” zniknie z biblioteki i planów. Wcześniejsze serie zostaną.",
+ "exportForStravaHint": "Prześlij w przeglądarce na strava.com/upload/select (aplikacja Strava nie importuje plików). Pojawi się jako trening siłowy z twoimi seriami.",
+ "manualStartTime": "Godzina rozpoczęcia",
+ "manualDuration": "Czas trwania",
+ "manualDurationUnset": "Dodaj czas trwania",
+ "stravaRow": "Eksport do Stravy (beta)",
+ "stravaBeta": "BETA",
+ "stravaIntro": "Wybierz trening do Stravy. Dostaniesz plik .fit: prześlij go w przeglądarce na strava.com/upload/select, a pojawi się jako trening siłowy z seriami.",
+ "stravaEmpty": "Brak treningów do eksportu.",
+ "tapToPause": "Dotknij, aby wstrzymać",
+ "holdPausedHint": "Wstrzymane · dotknij, aby wznowić",
+ "finishHoldNow": "Zakończ serię teraz",
+ "barWeight": "Waga sztangi lub sanek",
+ "barWeightHint": "Używana przez kalkulator talerzy",
+ "barWeightCustom": "Własna · dotknij, aby przywrócić"
}
diff --git a/lib/l10n/app_pt.arb b/lib/l10n/app_pt.arb
index f41d172..1f17683 100644
--- a/lib/l10n/app_pt.arb
+++ b/lib/l10n/app_pt.arb
@@ -180,7 +180,7 @@
"exercisesWithCount": "EXERCÍCIOS · {n}",
"setDay": "DEFINIR {day}",
"newRoutineName": "Nova rotina",
- "dragToReorder": "Segure e arraste para reordenar — esta é a ordem em que você treina.",
+ "dragToReorder": "Arrasta a pega de pontos para reordenar: é a ordem em que treinas.",
"reorderHandle": "Reordenar {name}",
"removeFromRoutine": "Remover da rotina",
"dropExercise": "Deseja remover este exercício?",
@@ -870,7 +870,6 @@
"elapsedCaps": "DECORRIDO",
"tapToSkip": "Toque para pular",
- "tapToStop": "Toque para parar",
"screenLocked": "Tela bloqueada",
"lockedHint": "Mantenha pressionada a digital no topo para desbloquear",
@@ -958,5 +957,21 @@
"planHistory": "{n, plural, =1{1 treino registado nos últimos 30 dias.} other{{n} treinos registados nos últimos 30 dias.}}",
"planBestLifts": "Melhores séries recentes",
"planAskFirst": "Se não souberes o meu objetivo (força, músculo, perder gordura ou forma geral) ou quanto pode durar cada sessão, pergunta-me primeiro numa mensagem curta. Depois responde só com JSON.",
- "backToTop": "Voltar ao topo"
+ "backToTop": "Voltar ao topo",
+ "deleteExerciseTitle": "Apagar este exercício?",
+ "deleteExerciseBody": "\"{name}\" será removido da tua biblioteca e das tuas rotinas. As séries anteriores ficam guardadas.",
+ "exportForStravaHint": "Envia pelo navegador em strava.com/upload/select (a app do Strava não importa ficheiros). Aparece como treino de musculação, com as tuas séries.",
+ "manualStartTime": "Hora de início",
+ "manualDuration": "Duração",
+ "manualDurationUnset": "Adicionar duração",
+ "stravaRow": "Exportar para o Strava (beta)",
+ "stravaBeta": "BETA",
+ "stravaIntro": "Escolhe um treino para levar para o Strava. Recebes um ficheiro .fit: envia pelo navegador em strava.com/upload/select e aparece como treino de musculação, com as tuas séries.",
+ "stravaEmpty": "Ainda não há treinos para exportar.",
+ "tapToPause": "Toca para pausar",
+ "holdPausedHint": "Em pausa · toca para continuar",
+ "finishHoldNow": "Terminar a série já",
+ "barWeight": "Peso da barra ou do carro",
+ "barWeightHint": "Usado pela calculadora de discos",
+ "barWeightCustom": "Próprio · toca para repor"
}
diff --git a/lib/l10n/app_ru.arb b/lib/l10n/app_ru.arb
index e45439b..0aae6a3 100644
--- a/lib/l10n/app_ru.arb
+++ b/lib/l10n/app_ru.arb
@@ -342,7 +342,7 @@
"exercisesWithCount": "УПРАЖНЕНИЯ · {n}",
"setDay": "НАЗНАЧИТЬ НА {day}",
"newRoutineName": "Новая программа",
- "dragToReorder": "Удерживай и перетаскивай, чтобы изменить порядок — в нём ты и тренируешься.",
+ "dragToReorder": "Потяните за ручку с точками, чтобы изменить порядок — в нём вы тренируетесь.",
"reorderHandle": "Переместить {name}",
"removeFromRoutine": "Убрать из программы",
@@ -898,7 +898,6 @@
"elapsedCaps": "ПРОШЛО",
"tapToSkip": "Нажми, чтобы пропустить",
- "tapToStop": "Нажми, чтобы остановить",
"screenLocked": "Экран заблокирован",
"lockedHint": "Нажми и удерживай отпечаток сверху, чтобы разблокировать",
@@ -986,5 +985,21 @@
"planHistory": "{n, plural, one{{n} тренировка за последние 30 дней.} few{{n} тренировки за последние 30 дней.} many{{n} тренировок за последние 30 дней.} other{{n} тренировки за последние 30 дней.}}",
"planBestLifts": "Лучшие недавние подходы",
"planAskFirst": "Если ты не знаешь мою цель (сила, мышцы, сжигание жира или общая форма) или сколько может длиться тренировка, сначала спроси меня одним коротким сообщением. Потом отвечай только JSON.",
- "backToTop": "Наверх"
+ "backToTop": "Наверх",
+ "deleteExerciseTitle": "Удалить это упражнение?",
+ "deleteExerciseBody": "«{name}» будет удалено из библиотеки и программ. Прошлые подходы сохранятся.",
+ "exportForStravaHint": "Загрузите в браузере на strava.com/upload/select (приложение Strava не импортирует файлы). Появится как силовая тренировка с вашими подходами.",
+ "manualStartTime": "Время начала",
+ "manualDuration": "Длительность",
+ "manualDurationUnset": "Указать длительность",
+ "stravaRow": "Экспорт в Strava (бета)",
+ "stravaBeta": "БЕТА",
+ "stravaIntro": "Выберите тренировку для Strava. Вы получите файл .fit: загрузите его в браузере на strava.com/upload/select, и он появится как силовая тренировка с подходами.",
+ "stravaEmpty": "Пока нет тренировок для экспорта.",
+ "tapToPause": "Нажмите для паузы",
+ "holdPausedHint": "Пауза · нажмите, чтобы продолжить",
+ "finishHoldNow": "Завершить подход сейчас",
+ "barWeight": "Вес грифа или платформы",
+ "barWeightHint": "Используется калькулятором блинов",
+ "barWeightCustom": "Свой · нажмите, чтобы сбросить"
}
diff --git a/lib/l10n/app_tr.arb b/lib/l10n/app_tr.arb
index 3a0cc5f..671f027 100644
--- a/lib/l10n/app_tr.arb
+++ b/lib/l10n/app_tr.arb
@@ -347,7 +347,7 @@
}
},
"newRoutineName": "Yeni program",
- "dragToReorder": "Sıralamak için basılı tutup sürükle — antrenman sırası budur.",
+ "dragToReorder": "Sıralamak için noktalı tutamacı sürükle — antrenman sırası budur.",
"reorderHandle": "{name} yeniden sırala",
"@reorderHandle": {
"placeholders": {
@@ -1114,7 +1114,6 @@
"tplAbcde": "Beş gün, her gün bir kas grubu: göğüs, sırt, bacak, omuz, kol.",
"elapsedCaps": "GEÇEN SÜRE",
"tapToSkip": "Geçmek için dokun",
- "tapToStop": "Durdurmak için dokun",
"screenLocked": "Ekran kilitli",
"lockedHint": "Kilidi açmak için üstteki parmak izine basılı tut",
"liveDoneSet": "Set tamam",
@@ -1198,5 +1197,21 @@
"planHistory": "{n, plural, =1{Son 30 günde 1 antrenman.} other{Son 30 günde {n} antrenman.}}",
"planBestLifts": "Son en iyi setler",
"planAskFirst": "Hedefimi (güç, kas, yağ yakımı ya da genel form) veya bir seansın ne kadar sürebileceğini bilmiyorsan önce bana kısa bir mesajla sor. Sonra yalnızca JSON ile cevap ver.",
- "backToTop": "Başa dön"
+ "backToTop": "Başa dön",
+ "deleteExerciseTitle": "Bu egzersiz silinsin mi?",
+ "deleteExerciseBody": "\"{name}\" kütüphanenden ve programlarından kaldırılacak. Önceki setlerin korunur.",
+ "exportForStravaHint": "Tarayıcıdan strava.com/upload/select adresine yükle (Strava uygulaması dosya içe aktaramaz). Setlerinle birlikte ağırlık antrenmanı olarak görünür.",
+ "manualStartTime": "Başlangıç saati",
+ "manualDuration": "Süre",
+ "manualDurationUnset": "Süre ekle",
+ "stravaRow": "Strava’ya aktar (beta)",
+ "stravaBeta": "BETA",
+ "stravaIntro": "Strava’ya götürmek için bir antrenman seç. Bir .fit dosyası alırsın: tarayıcıdan strava.com/upload/select adresine yükle, setlerinle birlikte ağırlık antrenmanı olarak görünür.",
+ "stravaEmpty": "Henüz dışa aktarılacak antrenman yok.",
+ "tapToPause": "Duraklatmak için dokun",
+ "holdPausedHint": "Duraklatıldı · devam için dokun",
+ "finishHoldNow": "Seti şimdi bitir",
+ "barWeight": "Bar ya da kızak ağırlığı",
+ "barWeightHint": "Plaka hesaplayıcı bunu kullanır",
+ "barWeightCustom": "Kendi değerin · sıfırlamak için dokun"
}
diff --git a/lib/l10n/app_uk.arb b/lib/l10n/app_uk.arb
index c023545..de9f4cf 100644
--- a/lib/l10n/app_uk.arb
+++ b/lib/l10n/app_uk.arb
@@ -347,7 +347,7 @@
}
},
"newRoutineName": "Нова програма",
- "dragToReorder": "Утримуй і перетягуй, щоб змінити порядок — у такій послідовності тренуєшся.",
+ "dragToReorder": "Потягніть за ручку з крапками, щоб змінити порядок — у ньому ви тренуєтеся.",
"reorderHandle": "Змінити порядок: {name}",
"@reorderHandle": {
"placeholders": {
@@ -1114,7 +1114,6 @@
"tplAbcde": "П'ять днів, одна група на день: груди, спина, ноги, плечі, руки.",
"elapsedCaps": "МИНУЛО",
"tapToSkip": "Торкніться, щоб пропустити",
- "tapToStop": "Торкніться, щоб зупинити",
"screenLocked": "Екран заблоковано",
"lockedHint": "Утримуйте відбиток угорі, щоб розблокувати",
"liveDoneSet": "Підхід виконано",
@@ -1198,5 +1197,21 @@
"planHistory": "{n, plural, one{{n} тренування за останні 30 днів.} few{{n} тренування за останні 30 днів.} many{{n} тренувань за останні 30 днів.} other{{n} тренування за останні 30 днів.}}",
"planBestLifts": "Найкращі нещодавні підходи",
"planAskFirst": "Якщо ти не знаєш моєї мети (сила, м’язи, схуднення чи загальна форма) або тривалості тренування, спершу спитай мене одним коротким повідомленням. Потім відповідай лише JSON.",
- "backToTop": "Угору"
+ "backToTop": "Угору",
+ "deleteExerciseTitle": "Видалити цю вправу?",
+ "deleteExerciseBody": "«{name}» буде видалено з бібліотеки та програм. Попередні підходи збережуться.",
+ "exportForStravaHint": "Завантажте в браузері на strava.com/upload/select (застосунок Strava не імпортує файли). З’явиться як силове тренування з вашими підходами.",
+ "manualStartTime": "Час початку",
+ "manualDuration": "Тривалість",
+ "manualDurationUnset": "Додати тривалість",
+ "stravaRow": "Експорт у Strava (бета)",
+ "stravaBeta": "БЕТА",
+ "stravaIntro": "Оберіть тренування для Strava. Ви отримаєте файл .fit: завантажте його в браузері на strava.com/upload/select, і воно з’явиться як силове тренування з підходами.",
+ "stravaEmpty": "Поки немає тренувань для експорту.",
+ "tapToPause": "Торкніться для паузи",
+ "holdPausedHint": "Пауза · торкніться, щоб продовжити",
+ "finishHoldNow": "Завершити підхід зараз",
+ "barWeight": "Вага грифа чи платформи",
+ "barWeightHint": "Використовує калькулятор млинців",
+ "barWeightCustom": "Власна · торкніться, щоб скинути"
}
diff --git a/lib/l10n/app_zh.arb b/lib/l10n/app_zh.arb
index 2a0004d..e31d93e 100644
--- a/lib/l10n/app_zh.arb
+++ b/lib/l10n/app_zh.arb
@@ -180,7 +180,7 @@
"exercisesWithCount": "动作 · {n}",
"setDay": "设为{day}",
"newRoutineName": "新计划",
- "dragToReorder": "长按并拖动以调整顺序 — 这将决定你的训练顺序。",
+ "dragToReorder": "拖动带点的手柄调整顺序,这就是你的训练顺序。",
"reorderHandle": "拖动重新排序 {name}",
"removeFromRoutine": "从计划中移除",
"dropExercise": "移除此动作?",
@@ -870,7 +870,6 @@
"elapsedCaps": "已用时",
"tapToSkip": "点按跳过",
- "tapToStop": "点按停止",
"screenLocked": "屏幕已锁定",
"lockedHint": "长按顶部的指纹图标即可解锁",
@@ -958,5 +957,21 @@
"planHistory": "{n, plural, =1{最近 30 天训练了 1 次。} other{最近 30 天训练了 {n} 次。}}",
"planBestLifts": "最近的最佳组",
"planAskFirst": "如果你不知道我的目标(力量、增肌、减脂或一般体能)或每次能练多久,请先用一条简短消息问我。知道后只用 JSON 回答。",
- "backToTop": "回到顶部"
+ "backToTop": "回到顶部",
+ "deleteExerciseTitle": "删除这个动作?",
+ "deleteExerciseBody": "“{name}”将从动作库和训练计划中移除,之前的训练记录会保留。",
+ "exportForStravaHint": "请在浏览器中打开 strava.com/upload/select 上传(Strava 应用无法导入文件),会显示为带组数的力量训练。",
+ "manualStartTime": "开始时间",
+ "manualDuration": "时长",
+ "manualDurationUnset": "添加时长",
+ "stravaRow": "导出到 Strava(测试版)",
+ "stravaBeta": "测试版",
+ "stravaIntro": "选择一次训练导出到 Strava。你会得到一个 .fit 文件:在浏览器中打开 strava.com/upload/select 上传,会显示为带组数的力量训练。",
+ "stravaEmpty": "还没有可导出的训练。",
+ "tapToPause": "点按暂停",
+ "holdPausedHint": "已暂停 · 点按继续",
+ "finishHoldNow": "现在完成这组",
+ "barWeight": "杠铃杆或滑车重量",
+ "barWeightHint": "杠铃片计算器会用到",
+ "barWeightCustom": "自定义 · 点按重置"
}
diff --git a/lib/l10n/app_zh_Hant.arb b/lib/l10n/app_zh_Hant.arb
index fb8ac3e..f56de06 100644
--- a/lib/l10n/app_zh_Hant.arb
+++ b/lib/l10n/app_zh_Hant.arb
@@ -347,7 +347,7 @@
}
},
"newRoutineName": "新增課表",
- "dragToReorder": "長按並拖曳以重新排序 — 這就是訓練順序。",
+ "dragToReorder": "拖曳帶點的把手調整順序,這就是你的訓練順序。",
"reorderHandle": "重新排序 {name}",
"@reorderHandle": {
"placeholders": {
@@ -1114,7 +1114,6 @@
"tplAbcde": "五天,每天一個部位:胸、背、腿、肩、手臂。",
"elapsedCaps": "已經過",
"tapToSkip": "點一下略過",
- "tapToStop": "點一下停止",
"screenLocked": "螢幕已鎖定",
"lockedHint": "長按上方的指紋圖示即可解鎖",
"liveDoneSet": "完成這一組",
@@ -1198,5 +1197,21 @@
"planHistory": "{n, plural, =1{最近 30 天訓練了 1 次。} other{最近 30 天訓練了 {n} 次。}}",
"planBestLifts": "最近的最佳組",
"planAskFirst": "如果你不知道我的目標(力量、增肌、減脂或一般體能)或每次能練多久,請先用一則簡短訊息問我。知道後只用 JSON 回答。",
- "backToTop": "回到頂端"
+ "backToTop": "回到頂端",
+ "deleteExerciseTitle": "刪除這個動作?",
+ "deleteExerciseBody": "「{name}」將從動作庫和課表中移除,之前的訓練紀錄會保留。",
+ "exportForStravaHint": "請在瀏覽器中開啟 strava.com/upload/select 上傳(Strava App 無法匯入檔案),會顯示為含組數的重量訓練。",
+ "manualStartTime": "開始時間",
+ "manualDuration": "時長",
+ "manualDurationUnset": "新增時長",
+ "stravaRow": "匯出到 Strava(測試版)",
+ "stravaBeta": "測試版",
+ "stravaIntro": "選擇一次訓練匯出到 Strava。你會得到一個 .fit 檔:在瀏覽器中開啟 strava.com/upload/select 上傳,會顯示為含組數的重量訓練。",
+ "stravaEmpty": "還沒有可匯出的訓練。",
+ "tapToPause": "點按暫停",
+ "holdPausedHint": "已暫停 · 點按繼續",
+ "finishHoldNow": "現在完成這組",
+ "barWeight": "槓鈴桿或滑車重量",
+ "barWeightHint": "槓片計算器會用到",
+ "barWeightCustom": "自訂 · 點按重設"
}
diff --git a/lib/models/exercise.dart b/lib/models/exercise.dart
index 26febc0..1400634 100644
--- a/lib/models/exercise.dart
+++ b/lib/models/exercise.dart
@@ -32,6 +32,7 @@ class Exercise {
Exercise copyWith({
String? name,
String? primary,
+ List<String>? secondary,
String? equipment,
String? difficulty,
List<String>? steps,
@@ -41,7 +42,7 @@ class Exercise {
id: id,
name: name ?? this.name,
primary: primary ?? this.primary,
- secondary: secondary,
+ secondary: secondary ?? this.secondary,
equipment: equipment ?? this.equipment,
difficulty: difficulty ?? this.difficulty,
art: art,
@@ -55,6 +56,7 @@ class Exercise {
'p': primary,
'e': equipment,
'd': difficulty,
+ if (secondary.isNotEmpty) 's': secondary,
if (steps.isNotEmpty) 'st': steps,
if (mode.isNotEmpty) 'k': mode,
};
@@ -62,7 +64,7 @@ class Exercise {
id: j['id'] as String,
name: j['n'] as String,
primary: j['p'] as String,
- secondary: const [],
+ secondary: ((j['s'] as List?) ?? const []).whereType<String>().where((m) => m != j['p']).toList(),
equipment: (j['e'] as String?) ?? 'Other',
difficulty: (j['d'] as String?) ?? 'Beginner',
art: '',
diff --git a/lib/screens/exercise_detail_screen.dart b/lib/screens/exercise_detail_screen.dart
index 129828a..7f57ef9 100644
--- a/lib/screens/exercise_detail_screen.dart
+++ b/lib/screens/exercise_detail_screen.dart
@@ -9,6 +9,7 @@ import '../state/fit_state.dart';
import '../theme/app_colors.dart';
import '../theme/app_theme.dart';
import '../widgets/charts.dart';
+import '../widgets/dialogs.dart';
import '../widgets/entrance.dart';
import '../widgets/exercise_media.dart';
import '../widgets/exercise_preview.dart';
@@ -78,10 +79,8 @@ class _ExerciseDetailScreenState extends State<ExerciseDetailScreen> {
Row(children: [
if (custom) ...[
RoundAction(
- onTap: () {
- fit.closeExerciseDetail();
- fit.deleteCustomExercise(ex.id);
- },
+ label: t.delete,
+ onTap: () => _confirmDelete(context, ex),
child: Icon(PhosphorIconsRegular.trash, size: 16, color: gc.textSecondary),
),
const SizedBox(width: 10),
@@ -175,6 +174,7 @@ class _ExerciseDetailScreenState extends State<ExerciseDetailScreen> {
_modeRow(context, gc, ex.id, mode),
if (mode != 'cardio') _repsOnlyRow(gc, ex.id, repsOnly),
_restRow(gc, ex.id),
+ if (ex.equipment == 'Barbell' || ex.equipment == 'Machine') _barRow(gc, ex),
_switchRow(
gc,
PhosphorIconsRegular.sparkle,
@@ -436,7 +436,7 @@ class _ExerciseDetailScreenState extends State<ExerciseDetailScreen> {
button: true,
child: GestureDetector(
behavior: HitTestBehavior.opaque,
- onTap: () => fit.goNotes(exerciseId: exId),
+ onTap: () => fit.goNotes(exerciseId: exId, all: true),
child: Container(
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 13),
decoration: BoxDecoration(
@@ -522,6 +522,19 @@ class _ExerciseDetailScreenState extends State<ExerciseDetailScreen> {
);
}
+ Future<void> _confirmDelete(BuildContext context, Exercise ex) async {
+ final ok = await askConfirm(
+ context,
+ title: t.deleteExerciseTitle,
+ body: t.deleteExerciseBody(exerciseName(ex)),
+ confirmLabel: t.delete,
+ danger: true,
+ );
+ if (!ok) return;
+ fit.closeExerciseDetail();
+ fit.deleteCustomExercise(ex.id);
+ }
+
void _toggleArchived(BuildContext context, Exercise ex) {
fit.toggleArchived(ex.id);
if (!fit.isArchived(ex.id)) return;
@@ -671,6 +684,50 @@ class _ExerciseDetailScreenState extends State<ExerciseDetailScreen> {
);
}
+ Widget _barRow(GymColors gc, Exercise ex) {
+ final own = fit.hasOwnBar(ex.id);
+ final bar = fit.barFor(ex.id, equipment: ex.equipment);
+ final step = fit.weightStep;
+ return Padding(
+ padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 12),
+ child: Row(
+ children: [
+ _rowIcon(gc, PhosphorIconsRegular.barbell, own),
+ Expanded(
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Text(titleCase(t.barWeight), style: AppTheme.f(14.5, weight: FontWeight.w500, color: gc.text)),
+ const SizedBox(height: 3),
+ GestureDetector(
+ behavior: HitTestBehavior.opaque,
+ onTap: own ? () => fit.setExerciseBar(ex.id, null) : null,
+ child: Text(own ? t.barWeightCustom : t.barWeightHint,
+ style: AppTheme.f(11.5, weight: FontWeight.w500, color: own ? gc.accent : gc.textSecondary)),
+ ),
+ ],
+ ),
+ ),
+ const SizedBox(width: 12),
+ StepperControl(
+ value: '${fmt(bar)} ${fit.units}',
+ minWidth: 56,
+ btnSize: 30,
+ gap: 3,
+ fontSize: 14,
+ btnRadius: 10,
+ onDec: () => fit.setExerciseBar(ex.id, bar - step),
+ onInc: () => fit.setExerciseBar(ex.id, bar + step),
+ onEdit: () async {
+ final v = await askNumber(context, title: t.barWeight, initial: fmt(bar), decimal: true);
+ if (v != null) fit.setExerciseBar(ex.id, v);
+ },
+ ),
+ ],
+ ),
+ );
+ }
+
Widget _rowIcon(GymColors gc, IconData icon, bool on) => Padding(
padding: const EdgeInsets.only(right: 14),
child: SizedBox(
diff --git a/lib/screens/exercises_screen.dart b/lib/screens/exercises_screen.dart
index ea7c619..c7e0269 100644
--- a/lib/screens/exercises_screen.dart
+++ b/lib/screens/exercises_screen.dart
@@ -370,6 +370,7 @@ void showCreateExerciseSheet(BuildContext context,
final nameCtrl = TextEditingController(text: editing?.name ?? initialName.trim());
final stepsCtrl = TextEditingController(text: editing?.steps.join('\n') ?? '');
String muscle = editing?.primary ?? kMuscles.first.id;
+ final secondary = <String>{...?editing?.secondary};
String equipment = editing?.equipment ?? kEquipment.first;
String difficulty = editing?.difficulty ?? kDifficulties.first;
String mode = editing?.mode ?? '';
@@ -431,12 +432,32 @@ void showCreateExerciseSheet(BuildContext context,
label: t.muscle(m.id),
bg: muscle == m.id ? gc.ember : gc.bgRaised2,
fg: muscle == m.id ? gc.onEmber : gc.textSecondary,
- onTap: () => setSheet(() => muscle = m.id),
+ onTap: () => setSheet(() {
+ muscle = m.id;
+ secondary.remove(m.id);
+ }),
vPad: 7,
fontSize: 12,
),
]),
const SizedBox(height: 16),
+ _filterLabel(gc, t.secondaryLabel),
+ const SizedBox(height: 8),
+ Wrap(spacing: 8, runSpacing: 8, children: [
+ for (final m in kMuscles)
+ if (m.id != muscle)
+ Pill(
+ label: t.muscle(m.id),
+ bg: secondary.contains(m.id) ? gc.ember : gc.bgRaised2,
+ fg: secondary.contains(m.id) ? gc.onEmber : gc.textSecondary,
+ onTap: () => setSheet(() {
+ if (!secondary.remove(m.id)) secondary.add(m.id);
+ }),
+ vPad: 7,
+ fontSize: 12,
+ ),
+ ]),
+ const SizedBox(height: 16),
_filterLabel(gc, t.equipmentLabel),
const SizedBox(height: 8),
Wrap(spacing: 8, runSpacing: 8, children: [
@@ -610,7 +631,8 @@ void showCreateExerciseSheet(BuildContext context,
equipment: equipment,
difficulty: difficulty,
steps: steps,
- mode: mode);
+ mode: mode,
+ secondary: secondary.toList());
Navigator.pop(sheetCtx);
return;
}
@@ -620,7 +642,8 @@ void showCreateExerciseSheet(BuildContext context,
equipment: equipment,
difficulty: difficulty,
steps: steps,
- mode: mode);
+ mode: mode,
+ secondary: secondary.toList());
if (mediaPath != null) {
await fit.attachExerciseMedia(id, mediaPath!);
}
diff --git a/lib/screens/routine_edit_screen.dart b/lib/screens/routine_edit_screen.dart
index 313bad5..8537346 100644
--- a/lib/screens/routine_edit_screen.dart
+++ b/lib/screens/routine_edit_screen.dart
@@ -284,6 +284,9 @@ class _RoutineEditScreenState extends State<RoutineEditScreen> {
shrinkWrap: true,
buildDefaultDragHandles: false,
physics: const NeverScrollableScrollPhysics(),
+ proxyDecorator: liftedRow(14),
+ onReorderStart: reorderPicked,
+ onReorderEnd: reorderDropped,
onReorder: (from, to) => fit.reorderRoutineExercise(routine.id, from, to),
children: [
for (int i = 0; i < fit.routineExercises(routine).length; i++)
diff --git a/lib/screens/session_screen.dart b/lib/screens/session_screen.dart
index 6733dca..ebc5761 100644
--- a/lib/screens/session_screen.dart
+++ b/lib/screens/session_screen.dart
@@ -57,7 +57,7 @@ class SessionScreen extends StatelessWidget {
return Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
- s.manual ? _manualBar(gc, s) : _liveBar(gc, locked),
+ s.manual ? _manualBar(context, gc, s) : _liveBar(gc, locked),
const SizedBox(height: 14),
_progressStrip(context, gc, s, locked),
const SizedBox(height: 16),
@@ -469,9 +469,9 @@ class SessionScreen extends StatelessWidget {
),
]),
Row(children: [
- RollingText(fit.elapsedLabel,
+ _ticking(() => RollingText(fit.elapsedLabel,
style: AppTheme.f(18,
- weight: FontWeight.w700, color: fit.sessionPaused ? gc.textSecondary : gc.text)),
+ weight: FontWeight.w700, color: fit.sessionPaused ? gc.textSecondary : gc.text))),
const SizedBox(width: 2),
if (!locked)
Semantics(
@@ -543,23 +543,88 @@ class SessionScreen extends StatelessWidget {
child: Icon(PhosphorIconsBold.caretDown, size: 15, color: gc.text),
);
- Widget _manualBar(GymColors gc, WorkoutSession s) {
- return Row(children: [
- _stepOutButton(gc),
- const SizedBox(width: 12),
- Icon(PhosphorIconsRegular.calendarPlus, size: 15, color: gc.brass),
- const SizedBox(width: 8),
- Expanded(
- child: Text(
- '${t.logging} · ${t.longDate(s.loggedAt ?? DateTime.now())}',
- maxLines: 1,
- overflow: TextOverflow.ellipsis,
- style: AppTheme.f(12.5, weight: FontWeight.w700, color: gc.brass, letterSpacing: 0.6),
+ Widget _manualBar(BuildContext context, GymColors gc, WorkoutSession s) {
+ final start = fit.manualStart ?? s.loggedAt ?? DateTime.now();
+ final minutes = fit.manualMinutes;
+ return Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
+ Row(children: [
+ _stepOutButton(gc),
+ const SizedBox(width: 12),
+ Icon(PhosphorIconsRegular.calendarPlus, size: 15, color: gc.brass),
+ const SizedBox(width: 8),
+ Expanded(
+ child: Text(
+ '${t.logging} · ${t.longDate(start)}',
+ maxLines: 1,
+ overflow: TextOverflow.ellipsis,
+ style: AppTheme.f(12.5, weight: FontWeight.w700, color: gc.brass, letterSpacing: 0.6),
+ ),
),
- ),
+ ]),
+ const SizedBox(height: 12),
+ Row(children: [
+ _manualChip(
+ gc,
+ PhosphorIconsRegular.clock,
+ TimeOfDay.fromDateTime(start).format(context),
+ t.manualStartTime,
+ () async {
+ final v = await askRuler(context,
+ title: t.manualStartTime,
+ value: (start.hour * 60 + start.minute).toDouble(),
+ min: 0,
+ max: 24 * 60 - 5,
+ step: 5,
+ majorEvery: 12,
+ format: (v) => TimeOfDay(hour: v.round() ~/ 60, minute: v.round() % 60).format(context),
+ tickLabel: (v) => '${v.round() ~/ 60}');
+ if (v != null) fit.setManualStart(v.round());
+ },
+ ),
+ const SizedBox(width: 8),
+ _manualChip(
+ gc,
+ PhosphorIconsRegular.timer,
+ minutes == 0 ? t.manualDurationUnset : '$minutes min',
+ t.manualDuration,
+ () async {
+ final v = await askRuler(context,
+ title: t.manualDuration,
+ value: (minutes == 0 ? 60 : minutes).toDouble(),
+ min: 5,
+ max: 240,
+ step: 5,
+ majorEvery: 6,
+ format: (v) => '${v.round()} min',
+ tickLabel: (v) => '${v.round()}');
+ if (v != null) fit.setManualMinutes(v.round());
+ },
+ ),
+ ]),
]);
}
+ Widget _manualChip(GymColors gc, IconData icon, String value, String label, VoidCallback onTap) => Semantics(
+ button: true,
+ label: label,
+ child: Pressable(
+ onTap: onTap,
+ child: Container(
+ padding: const EdgeInsets.symmetric(horizontal: 14, vertical: 9),
+ decoration: BoxDecoration(
+ color: gc.bgRaised,
+ borderRadius: BorderRadius.circular(100),
+ border: Border.all(color: gc.border),
+ ),
+ child: Row(mainAxisSize: MainAxisSize.min, children: [
+ Icon(icon, size: 15, color: gc.brass),
+ const SizedBox(width: 8),
+ Text(value, style: AppTheme.f(13.5, weight: FontWeight.w700, color: gc.text)),
+ ]),
+ ),
+ ),
+ );
+
List<Widget> _cells(GymColors gc, int exIdx, int j, SessionSet st, String mode, bool repsOnly) {
final cardio = mode == 'cardio';
Widget reps() => _miniStepper(
@@ -821,7 +886,7 @@ class SessionScreen extends StatelessWidget {
final exercise = fit.exerciseById(ex.id);
if (exercise == null || ex.sets.isEmpty) return const SizedBox.shrink();
final next = ex.sets.firstWhere((s) => !s.done, orElse: () => ex.sets.last);
- final hint = fit.plateHint(exercise.equipment, next.weight);
+ final hint = fit.plateHint(exercise.equipment, next.weight, id: ex.id);
if (hint == null) return const SizedBox.shrink();
return Semantics(
@@ -829,7 +894,8 @@ class SessionScreen extends StatelessWidget {
label: t.toolTitle('plate'),
child: GestureDetector(
behavior: HitTestBehavior.opaque,
- onTap: () => showPlateSheet(context, fit.toDisplayWeight(next.weight)),
+ onTap: () => showPlateSheet(context, fit.toDisplayWeight(next.weight),
+ startBar: fit.barFor(ex.id, equipment: exercise.equipment)),
child: Padding(
padding: const EdgeInsets.fromLTRB(_rowPad, 8, _rowPad, 0),
child: Row(
@@ -1045,7 +1111,12 @@ class SessionScreen extends StatelessWidget {
if (v != null) onSave(v);
}
- Widget _holdCard(GymColors gc) {
+ Widget _ticking(Widget Function() build) =>
+ ValueListenableBuilder<int>(valueListenable: fit.clock, builder: (_, _, _) => build());
+
+ Widget _holdCard(GymColors gc) => _ticking(() => _holdPanel(gc));
+
+ Widget _holdPanel(GymColors gc) {
final count = fit.sessionSetCount;
final lead = fit.holdLead;
return TimerPanel(
@@ -1056,13 +1127,15 @@ class SessionScreen extends StatelessWidget {
elapsedLabel: t.elapsedCaps,
sets: '${count.done}/${count.total}',
setsLabel: t.setsCaps,
- hint: t.tapToStop,
+ hint: fit.holdPaused ? t.holdPausedHint : t.tapToPause,
color: gc.accent,
- onTap: fit.stopHold,
+ onTap: fit.toggleHoldPause,
);
}
- Widget _restCard(GymColors gc, WorkoutSession s) {
+ Widget _restCard(GymColors gc, WorkoutSession s) => _ticking(() => _restPanel(gc, s));
+
+ Widget _restPanel(GymColors gc, WorkoutSession s) {
final count = fit.sessionSetCount;
return TimerPanel(
label: t.liveResting,
@@ -1083,11 +1156,13 @@ class SessionScreen extends StatelessWidget {
final pending = ex == null ? -1 : ex.sets.indexWhere((st) => !st.done);
if (pending >= 0 && ex != null && fit.isTimed(ex.id)) {
if (fit.holding && fit.holdEx == exIdx) {
- return PrimaryButton(
- label: '${t.stopLabel} · ${durationLabel(fit.holdRemaining ?? 0)}',
- onTap: fit.stopHold,
- height: 56,
- );
+ return _ticking(() => PrimaryButton(
+ label: fit.holdPaused
+ ? t.finishHoldNow
+ : '${t.stopLabel} · ${durationLabel(fit.holdRemaining ?? 0)}',
+ onTap: fit.holdPaused ? fit.completeHold : fit.stopHold,
+ height: 56,
+ ));
}
return PrimaryButton(
label: t.startHold(durationLabel(ex.sets[pending].sec ?? 30)),
@@ -1651,8 +1726,11 @@ void showSessionOverview(BuildContext context) {
Text(titleCase(t.workoutOverview),
style: AppTheme.f(19, weight: FontWeight.w800, color: gc.text)),
const SizedBox(height: 4),
- Text('${t.exerciseCount(s.exercises.length)} · ${fit.elapsedLabel}',
- style: AppTheme.f(12.5, weight: FontWeight.w500, color: gc.textSecondary)),
+ ValueListenableBuilder<int>(
+ valueListenable: fit.clock,
+ builder: (_, _, _) => Text('${t.exerciseCount(s.exercises.length)} · ${fit.elapsedLabel}',
+ style: AppTheme.f(12.5, weight: FontWeight.w500, color: gc.textSecondary)),
+ ),
const SizedBox(height: 16),
Flexible(
child: ReorderableListView.builder(
@@ -1660,7 +1738,9 @@ void showSessionOverview(BuildContext context) {
buildDefaultDragHandles: false,
itemCount: s.exercises.length,
onReorder: fit.reorderSessionExercise,
- proxyDecorator: (child, _, _) => Material(color: Colors.transparent, child: child),
+ onReorderStart: reorderPicked,
+ onReorderEnd: reorderDropped,
+ proxyDecorator: liftedRow(16),
itemBuilder: (context, i) => _overviewRow(sheet, gc, s, i),
),
),
diff --git a/lib/screens/settings_screen.dart b/lib/screens/settings_screen.dart
index 8606239..6027ae4 100644
--- a/lib/screens/settings_screen.dart
+++ b/lib/screens/settings_screen.dart
@@ -33,6 +33,7 @@ import '../widgets/profile_avatar.dart';
import '../widgets/ruler_picker.dart';
import '../widgets/timer_panel.dart';
import 'profile_screen.dart';
+import 'strava_sheet.dart';
import '../widgets/ui_kit.dart';
const _kRepoUrl = 'https://github.com/InlitX/GymMane';
@@ -311,8 +312,9 @@ class SettingsScreen extends StatelessWidget {
(PhosphorIconsRegular.fileZip, t.exportBackup, () => _exportBackup(context)),
(PhosphorIconsRegular.downloadSimple, t.importBackup, () => _importBackup(context)),
(PhosphorIconsRegular.arrowSquareIn, t.importFromApp, () => _openImportApps(context)),
+ (PhosphorIconsRegular.export, t.stravaRow, () => showStravaSheet(context)),
(PhosphorIconsRegular.trash, t.resetData, () => _resetAll(context)),
- ], danger: 4),
+ ], danger: 5),
const SizedBox(height: 18),
_sectionLabel(gc, t.support),
const SizedBox(height: 8),
@@ -817,7 +819,7 @@ class SettingsScreen extends StatelessWidget {
}
Future<void> _addWidget(BuildContext context, String provider) async {
- await HomeWidgetBridge.update();
+ await HomeWidgetBridge.updateNow(provider: provider);
try {
final supported = await HomeWidget.isRequestPinWidgetSupported() ?? false;
if (!supported) {
diff --git a/lib/screens/strava_sheet.dart b/lib/screens/strava_sheet.dart
new file mode 100644
index 0000000..428e79c
--- /dev/null
+++ b/lib/screens/strava_sheet.dart
@@ -0,0 +1,122 @@
+import 'dart:io';
+
+import 'package:flutter/material.dart';
+import 'package:path_provider/path_provider.dart';
+import 'package:phosphoricons_flutter/phosphoricons_flutter.dart';
+import 'package:share_plus/share_plus.dart';
+
+import '../l10n/l10n.dart';
+import '../models/workout.dart';
+import '../services/fit_export.dart';
+import '../state/fit_state.dart';
+import '../theme/app_colors.dart';
+import '../theme/app_theme.dart';
+import '../widgets/glass.dart';
+import '../widgets/ui_kit.dart';
+
+void showStravaSheet(BuildContext context) => showAppSheet<void>(
+ context: context,
+ backgroundColor: Colors.transparent,
+ isScrollControlled: true,
+ builder: (_) => const _StravaSheet(),
+ );
+
+const _brand = 'Strava';
+
+class _StravaSheet extends StatelessWidget {
+ const _StravaSheet();
+
+ @override
+ Widget build(BuildContext context) {
+ final gc = context.gc;
+ final list = [...fit.sessions]..sort((a, b) => b.date.compareTo(a.date));
+ return Container(
+ constraints: BoxConstraints(maxHeight: MediaQuery.sizeOf(context).height * 0.82),
+ padding: sheetPad(context),
+ decoration: BoxDecoration(
+ color: gc.bgRaised,
+ borderRadius: const BorderRadius.vertical(top: Radius.circular(28)),
+ ),
+ child: Column(
+ mainAxisSize: MainAxisSize.min,
+ crossAxisAlignment: CrossAxisAlignment.stretch,
+ children: [
+ const SheetHandle(),
+ const SizedBox(height: 16),
+ Row(children: [
+ Text(_brand, style: AppTheme.f(21, weight: FontWeight.w700, color: gc.text)),
+ const SizedBox(width: 10),
+ Container(
+ padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 3),
+ decoration: BoxDecoration(color: gc.accentSoft, borderRadius: BorderRadius.circular(100)),
+ child: Text(t.stravaBeta,
+ style: AppTheme.f(10.5, weight: FontWeight.w800, color: gc.accent, letterSpacing: 1.2)),
+ ),
+ ]),
+ const SizedBox(height: 8),
+ Text(t.stravaIntro,
+ style: AppTheme.f(13, weight: FontWeight.w500, color: gc.textSecondary, height: 1.45)),
+ const SizedBox(height: 16),
+ if (list.isEmpty)
+ Padding(
+ padding: const EdgeInsets.symmetric(vertical: 24),
+ child: Text(t.stravaEmpty,
+ textAlign: TextAlign.center,
+ style: AppTheme.f(13.5, weight: FontWeight.w600, color: gc.textTertiary)),
+ )
+ else
+ Flexible(
+ child: ListView.separated(
+ shrinkWrap: true,
+ itemCount: list.length,
+ separatorBuilder: (_, _) => const SizedBox(height: 8),
+ itemBuilder: (context, i) => _row(context, gc, list[i]),
+ ),
+ ),
+ ],
+ ),
+ );
+ }
+
+ Widget _row(BuildContext context, GymColors gc, LoggedSession s) {
+ final minutes = s.durationSec ~/ 60;
+ return Pressable(
+ onTap: () => shareWorkoutFit(s),
+ child: Container(
+ padding: const EdgeInsets.fromLTRB(16, 12, 12, 12),
+ decoration: BoxDecoration(color: gc.bgRaised2, borderRadius: BorderRadius.circular(16)),
+ child: Row(children: [
+ Expanded(
+ child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
+ Text(t.longDate(s.date),
+ maxLines: 1,
+ overflow: TextOverflow.ellipsis,
+ style: AppTheme.f(14.5, weight: FontWeight.w700, color: gc.text)),
+ const SizedBox(height: 3),
+ Text('${t.setCount(s.setCount)}${minutes > 0 ? ' · $minutes min' : ''}',
+ style: AppTheme.f(12, weight: FontWeight.w500, color: gc.textSecondary)),
+ ]),
+ ),
+ const SizedBox(width: 10),
+ Container(
+ width: 38,
+ height: 38,
+ decoration: BoxDecoration(color: gc.accentSoft, shape: BoxShape.circle),
+ child: Icon(PhosphorIconsRegular.export, size: 17, color: gc.accent),
+ ),
+ ]),
+ ),
+ );
+ }
+}
+
+Future<void> shareWorkoutFit(LoggedSession s) async {
+ try {
+ final dir = await getTemporaryDirectory();
+ final d = s.date;
+ final stamp = '${d.year}-${d.month.toString().padLeft(2, '0')}-${d.day.toString().padLeft(2, '0')}';
+ final file = File('${dir.path}/GymMane $stamp.fit');
+ await file.writeAsBytes(workoutFit(s, pounds: fit.isLb));
+ await SharePlus.instance.share(ShareParams(files: [XFile(file.path)], text: t.exportForStravaHint));
+ } catch (_) {}
+}
diff --git a/lib/screens/tool_detail_screen.dart b/lib/screens/tool_detail_screen.dart
index fd918e5..ffca62a 100644
--- a/lib/screens/tool_detail_screen.dart
+++ b/lib/screens/tool_detail_screen.dart
@@ -331,9 +331,9 @@ class ToolDetailScreen extends StatelessWidget {
}
}
-void showPlateSheet(BuildContext context, double displayTarget) {
+void showPlateSheet(BuildContext context, double displayTarget, {double? startBar}) {
final gc = context.gc;
- var bar = fit.defaultBar;
+ var bar = startBar ?? fit.defaultBar;
showAppSheet<void>(
context: context,
backgroundColor: Colors.transparent,
diff --git a/lib/services/backup_zip.dart b/lib/services/backup_zip.dart
index 012d7e1..3321406 100644
--- a/lib/services/backup_zip.dart
+++ b/lib/services/backup_zip.dart
@@ -9,6 +9,7 @@ import '../models/note.dart';
import '../models/progress_shot.dart';
import '../state/fit_state.dart';
import 'alarm_store.dart';
+import 'local_store.dart';
import 'media_store.dart';
const String kBackupJsonEntry = 'gymmane.json';
@@ -91,7 +92,7 @@ Future<Uint8List> buildBackupZip() async {
}
archive.addFile(
- ArchiveFile.string(kBackupJsonEntry, const JsonEncoder.withIndent(' ').convert(data)));
+ ArchiveFile.string(kBackupJsonEntry, const JsonEncoder.withIndent(' ').convert(Store.finite(data))));
return ZipEncoder().encodeBytes(archive);
}
diff --git a/lib/services/beeper.dart b/lib/services/beeper.dart
index d5c467b..424ddb6 100644
--- a/lib/services/beeper.dart
+++ b/lib/services/beeper.dart
@@ -15,24 +15,34 @@ class Beeper {
String? _tick;
String? _go;
bool _failed = false;
+ bool _loud = false;
+
+ set loud(bool on) {
+ if (_loud == on) return;
+ _loud = on;
+ final p = _player;
+ if (p != null) p.setAudioContext(_context).catchError((_) {});
+ }
+
+ AudioContext get _context => AudioContext(
+ android: AudioContextAndroid(
+ contentType: AndroidContentType.sonification,
+ usageType: _loud ? AndroidUsageType.alarm : AndroidUsageType.notification,
+ audioFocus: AndroidAudioFocus.gainTransientMayDuck,
+ ),
+ iOS: AudioContextIOS(category: AVAudioSessionCategory.ambient, options: const {}),
+ );
Future<bool> _ready() async {
if (_player != null) return true;
if (_failed || kIsWeb) return false;
try {
final dir = await getTemporaryDirectory();
- _tick = await _write(dir, 'gm_tick.wav', _tone(880, 0.09));
- _go = await _write(dir, 'gm_go.wav', _tone(1318.5, 0.32));
+ _tick = await _write(dir, 'gm_tick2.wav', _tone(880, 0.09));
+ _go = await _write(dir, 'gm_go2.wav', _tone(1318.5, 0.32));
final p = AudioPlayer();
await p.setReleaseMode(ReleaseMode.stop);
- await p.setAudioContext(AudioContext(
- android: const AudioContextAndroid(
- contentType: AndroidContentType.sonification,
- usageType: AndroidUsageType.notification,
- audioFocus: AndroidAudioFocus.gainTransientMayDuck,
- ),
- iOS: AudioContextIOS(category: AVAudioSessionCategory.ambient, options: const {}),
- ));
+ await p.setAudioContext(_context);
_player = p;
return true;
} catch (_) {
@@ -54,7 +64,7 @@ class Beeper {
if (path == null) return;
try {
await _player!.stop();
- await _player!.play(DeviceFileSource(path), volume: 0.9);
+ await _player!.play(DeviceFileSource(path), volume: 1);
} catch (_) {}
}
@@ -92,9 +102,9 @@ class Beeper {
for (var i = 0; i < n; i++) {
final t = i / rate;
final attack = math.min(1.0, i / (rate * 0.004));
- final release = math.exp(-t * (6 / secs));
+ final release = math.exp(-t * (3 / secs));
final wave = math.sin(2 * math.pi * hz * t) * 0.8 + math.sin(4 * math.pi * hz * t) * 0.2;
- data.setInt16(44 + i * 2, (wave * 0.5 * attack * release * 32767).round(), Endian.little);
+ data.setInt16(44 + i * 2, (wave * 0.9 * attack * release * 32767).round(), Endian.little);
}
return data.buffer.asUint8List();
}
diff --git a/lib/services/fit_export.dart b/lib/services/fit_export.dart
new file mode 100644
index 0000000..950fd9c
--- /dev/null
+++ b/lib/services/fit_export.dart
@@ -0,0 +1,196 @@
+import 'dart:typed_data';
+
+import '../models/workout.dart';
+
+const _fitEpoch = 631065600;
+const _unknownCategory = 65534;
+
+const _categories = <(String, int)>[
+ ('bench press', 0),
+ ('calf', 1),
+ ('carry', 3),
+ ('chop', 4),
+ ('crunch', 6),
+ ('leg curl', 15),
+ ('curl', 7),
+ ('deadlift', 8),
+ ('fly', 9),
+ ('hip thrust', 10),
+ ('bridge', 10),
+ ('swing', 12),
+ ('hyperextension', 13),
+ ('back extension', 13),
+ ('lateral raise', 14),
+ ('leg raise', 16),
+ ('lunge', 17),
+ ('split squat', 17),
+ ('clean', 18),
+ ('snatch', 18),
+ ('plank', 19),
+ ('burpee', 20),
+ ('jump', 20),
+ ('pull-up', 21),
+ ('chin-up', 21),
+ ('pulldown', 21),
+ ('push-up', 22),
+ ('row', 23),
+ ('shoulder press', 24),
+ ('overhead press', 24),
+ ('military press', 24),
+ ('shrug', 26),
+ ('sit-up', 27),
+ ('squat', 28),
+ ('triceps', 30),
+ ('pushdown', 30),
+];
+
+int fitCategory(String name) {
+ final n = name.toLowerCase();
+ for (final (key, id) in _categories) {
+ if (n.contains(key)) return id;
+ }
+ return _unknownCategory;
+}
+
+Uint8List workoutFit(LoggedSession session, {bool pounds = false}) {
+ final end = session.date.toUtc().millisecondsSinceEpoch ~/ 1000 - _fitEpoch;
+ final duration = session.durationSec < 1 ? 1 : session.durationSec;
+ final start = end - duration;
+ final offset = session.date.timeZoneOffset.inSeconds;
+ final sets = [
+ for (final e in session.exercises)
+ for (final st in e.workingSets) (e, st),
+ ];
+ final slot = sets.isEmpty ? duration : duration ~/ sets.length;
+
+ final w = _FitWriter();
+ w.define(0, 0, const [(0, 1, 0x00), (1, 2, 0x84), (2, 2, 0x84), (4, 4, 0x86)]);
+ w.data(0, [(1, 4), (2, 255), (2, 0), (4, start)]);
+
+ w.define(1, 21, const [(253, 4, 0x86), (0, 1, 0x00), (1, 1, 0x00)]);
+ w.data(1, [(4, start), (1, 0), (1, 0)]);
+
+ w.define(2, 225, const [
+ (254, 4, 0x86),
+ (6, 4, 0x86),
+ (0, 4, 0x86),
+ (3, 2, 0x84),
+ (4, 2, 0x84),
+ (5, 1, 0x02),
+ (7, 2, 0x84),
+ (9, 2, 0x84),
+ (10, 2, 0x84),
+ ]);
+ for (var i = 0; i < sets.length; i++) {
+ final (e, st) = sets[i];
+ final at = start + i * slot;
+ final seconds = st.sec ?? (slot < 60 ? slot : 60);
+ w.data(2, [
+ (4, at + seconds),
+ (4, at),
+ (4, seconds * 1000),
+ (2, st.reps.clamp(0, 65534)),
+ (2, (st.weight * 16).round().clamp(0, 65534)),
+ (1, 1),
+ (2, fitCategory(e.name)),
+ (2, pounds ? 2 : 1),
+ (2, i),
+ ]);
+ }
+
+ w.data(1, [(4, end), (1, 0), (1, 4)]);
+
+ w.define(3, 19, const [(253, 4, 0x86), (2, 4, 0x86), (7, 4, 0x86), (8, 4, 0x86), (0, 1, 0x00), (1, 1, 0x00)]);
+ w.data(3, [(4, end), (4, start), (4, duration * 1000), (4, duration * 1000), (1, 9), (1, 1)]);
+
+ w.define(4, 18, const [
+ (253, 4, 0x86),
+ (2, 4, 0x86),
+ (7, 4, 0x86),
+ (8, 4, 0x86),
+ (5, 1, 0x00),
+ (6, 1, 0x00),
+ (25, 2, 0x84),
+ (26, 2, 0x84),
+ (0, 1, 0x00),
+ (1, 1, 0x00),
+ ]);
+ w.data(4, [(4, end), (4, start), (4, duration * 1000), (4, duration * 1000), (1, 10), (1, 20), (2, 0), (2, 1), (1, 8), (1, 1)]);
+
+ w.define(5, 34, const [(253, 4, 0x86), (0, 4, 0x86), (1, 2, 0x84), (2, 1, 0x00), (3, 1, 0x00), (4, 1, 0x00), (5, 4, 0x86)]);
+ w.data(5, [(4, end), (4, duration * 1000), (2, 1), (1, 0), (1, 26), (1, 1), (4, end + offset)]);
+
+ return w.bytes();
+}
+
+class _FitWriter {
+ final _body = BytesBuilder();
+
+ void define(int local, int global, List<(int, int, int)> fields) {
+ _body
+ ..addByte(0x40 | local)
+ ..addByte(0)
+ ..addByte(0);
+ _int(2, global);
+ _body.addByte(fields.length);
+ for (final (number, size, type) in fields) {
+ _body
+ ..addByte(number)
+ ..addByte(size)
+ ..addByte(type);
+ }
+ }
+
+ void data(int local, List<(int, int)> values) {
+ _body.addByte(local);
+ for (final (size, value) in values) {
+ _int(size, value);
+ }
+ }
+
+ void _int(int size, int value) {
+ for (var i = 0; i < size; i++) {
+ _body.addByte((value >> (8 * i)) & 0xFF);
+ }
+ }
+
+ Uint8List bytes() {
+ final body = _body.toBytes();
+ final header = BytesBuilder()
+ ..addByte(14)
+ ..addByte(0x20)
+ ..add(_le(2, 2132))
+ ..add(_le(4, body.length))
+ ..add('.FIT'.codeUnits);
+ final head = header.toBytes();
+ final out = BytesBuilder()
+ ..add(head)
+ ..add(_le(2, fitCrc(head)))
+ ..add(body);
+ final all = out.toBytes();
+ return (BytesBuilder()
+ ..add(all)
+ ..add(_le(2, fitCrc(all))))
+ .toBytes();
+ }
+
+ static List<int> _le(int size, int value) => [for (var i = 0; i < size; i++) (value >> (8 * i)) & 0xFF];
+}
+
+const _crcTable = [
+ 0x0000, 0xCC01, 0xD801, 0x1400, 0xF001, 0x3C00, 0x2800, 0xE401,
+ 0xA001, 0x6C00, 0x7800, 0xB401, 0x5000, 0x9C01, 0x8801, 0x4400,
+];
+
+int fitCrc(List<int> bytes) {
+ var crc = 0;
+ for (final b in bytes) {
+ var tmp = _crcTable[crc & 0xF];
+ crc = (crc >> 4) & 0x0FFF;
+ crc = crc ^ tmp ^ _crcTable[b & 0xF];
+ tmp = _crcTable[crc & 0xF];
+ crc = (crc >> 4) & 0x0FFF;
+ crc = crc ^ tmp ^ _crcTable[(b >> 4) & 0xF];
+ }
+ return crc;
+}
diff --git a/lib/services/home_widget_bridge.dart b/lib/services/home_widget_bridge.dart
index 253240a..255072c 100644
--- a/lib/services/home_widget_bridge.dart
+++ b/lib/services/home_widget_bridge.dart
@@ -1,3 +1,4 @@
+import 'dart:async';
import 'dart:io' show Platform;
import 'package:flutter/foundation.dart';
@@ -28,10 +29,51 @@ class HomeWidgetBridge {
static bool get _ios => !kIsWeb && Platform.isIOS;
static bool get _supported => !kIsWeb && (Platform.isAndroid || Platform.isIOS);
static bool _groupReady = false;
+ static Timer? _debounce;
+ static bool _running = false;
+ static bool _again = false;
+ static final Set<String> _forced = {};
- static Future<void> update() async {
+ static void update() {
if (!_supported) return;
+ _debounce?.cancel();
+ _debounce = Timer(const Duration(milliseconds: 800), _run);
+ }
+
+ static Future<void> _run() async {
+ if (_running) {
+ _again = true;
+ return;
+ }
+ _running = true;
try {
+ await _paint();
+ } finally {
+ _running = false;
+ if (_again) {
+ _again = false;
+ update();
+ }
+ }
+ }
+
+ static Future<void> updateNow({String? provider}) {
+ if (provider != null) _forced.add(provider);
+ _debounce?.cancel();
+ return _run();
+ }
+
+ static Future<void> _paint() async {
+ try {
+ final installed = _ios
+ ? null
+ : {
+ ..._forced,
+ for (final w in await HomeWidget.getInstalledWidgets()) w.androidClassName?.split('.').last,
+ };
+ _forced.clear();
+ if (installed != null && installed.isEmpty) return;
+ bool wants(String provider) => installed == null || installed.contains(provider);
if (_ios && !_groupReady) {
await HomeWidget.setAppGroupId(appGroup);
_groupReady = true;
@@ -51,8 +93,9 @@ class HomeWidgetBridge {
final plannedToday = fit.todayRoutine != null;
final hasPlan = fit.weeklyPlan.isNotEmpty;
- final views = <(String, Size, Widget Function(GymColors))>[
+ final views = <(String, String, Size, Widget Function(GymColors))>[
(
+ 'HeatmapWidgetProvider',
heatmapKey,
heatmapSize,
(gc) => HeatmapWidgetView(
@@ -64,6 +107,7 @@ class HomeWidgetBridge {
),
),
(
+ 'StatsWidgetProvider',
statsKey,
statsSize,
(gc) => StatsWidgetView(
@@ -76,6 +120,7 @@ class HomeWidgetBridge {
),
),
(
+ 'BodyWidgetProvider',
bodyKey,
bodySize,
(gc) => BodyWidgetView(
@@ -87,6 +132,7 @@ class HomeWidgetBridge {
),
),
(
+ 'TodayWidgetProvider',
todayKey,
todaySize,
(gc) => TodayWidgetView(
@@ -105,6 +151,7 @@ class HomeWidgetBridge {
(todayRestKey, false, true),
])
(
+ 'TodayWidgetProvider',
key,
todaySize,
(gc) => TodayWidgetView(
@@ -118,11 +165,13 @@ class HomeWidgetBridge {
),
),
(
+ 'WeekWidgetProvider',
weekKey,
weekSize,
(gc) => WeekWidgetView(gc: gc, done: week, goal: fit.weeklyTarget, size: weekSize, framed: framed),
),
(
+ 'WeekWidgetProvider',
weekFreshKey,
weekSize,
(gc) => WeekWidgetView(
@@ -134,7 +183,8 @@ class HomeWidgetBridge {
),
),
];
- for (final (key, size, build) in views) {
+ for (final (provider, key, size, build) in views) {
+ if (!wants(provider)) continue;
await _render(build(day), key, size);
if (!identical(day, night)) {
await _render(build(night), '${key}_night', size);
@@ -161,11 +211,15 @@ class HomeWidgetBridge {
await HomeWidget.saveWidgetData<String>(themeKey, pref);
}
- await _reload('HeatmapWidgetProvider', 'HeatmapWidget');
- await _reload('BodyWidgetProvider', 'BodyWidget');
- await _reload('TodayWidgetProvider', 'TodayWidget');
- await _reload('StatsWidgetProvider', 'StatsWidget');
- await _reload('WeekWidgetProvider', 'WeekWidget');
+ for (final (android, ios) in const [
+ ('HeatmapWidgetProvider', 'HeatmapWidget'),
+ ('BodyWidgetProvider', 'BodyWidget'),
+ ('TodayWidgetProvider', 'TodayWidget'),
+ ('StatsWidgetProvider', 'StatsWidget'),
+ ('WeekWidgetProvider', 'WeekWidget'),
+ ]) {
+ if (wants(android)) await _reload(android, ios);
+ }
} catch (e) {
debugPrint('HomeWidgetBridge.update falló: $e');
}
diff --git a/lib/services/local_store.dart b/lib/services/local_store.dart
index 89cfc66..55986bd 100644
--- a/lib/services/local_store.dart
+++ b/lib/services/local_store.dart
@@ -1,5 +1,6 @@
import 'dart:convert';
+import 'package:flutter/foundation.dart';
import 'package:shared_preferences/shared_preferences.dart';
import '../models/workout.dart';
@@ -32,12 +33,21 @@ class Store {
Future<void> save(Map<String, dynamic> data) async {
try {
- await _prefs?.setString(_key, jsonEncode(data));
- } catch (_) {}
+ await _prefs?.setString(_key, jsonEncode(finite(data)));
+ } catch (e) {
+ debugPrint('Store.save failed: $e');
+ }
}
+ static Object? finite(Object? v) => switch (v) {
+ double d when !d.isFinite => 0.0,
+ Map m => {for (final e in m.entries) '${e.key}': finite(e.value)},
+ List l => [for (final x in l) finite(x)],
+ _ => v,
+ };
+
String exportJson(Map<String, dynamic> data) =>
- const JsonEncoder.withIndent(' ').convert(data);
+ const JsonEncoder.withIndent(' ').convert(finite(data));
String exportCsv(List<LoggedSession> sessions) {
final rows = StringBuffer(
diff --git a/lib/services/plan_share.dart b/lib/services/plan_share.dart
index c97452b..4855045 100644
--- a/lib/services/plan_share.dart
+++ b/lib/services/plan_share.dart
@@ -24,6 +24,7 @@ class PlanItem {
this.level,
this.steps = const [],
this.mode = '',
+ this.secondary = const [],
});
final String name;
final int? sets;
@@ -34,6 +35,7 @@ class PlanItem {
final bool superset;
final List<PlanSet> plan;
final String? muscle;
+ final List<String> secondary;
final String? equipment;
final String? level;
final List<String> steps;
@@ -307,6 +309,10 @@ List<PlanItem> _items(Object? raw, bool lb) {
level: _string(_value(info, ['level', 'difficulty', 'nivel'])),
steps: steps is List ? steps.whereType<String>().toList() : const [],
mode: _string(_value(info, ['track', 'mode', 'type'])),
+ secondary: switch (_value(info, ['secondary', 'secondarymuscles'])) {
+ final List list => list.whereType<String>().toList(),
+ _ => const [],
+ },
));
}
return out;
diff --git a/lib/state/fit_core.dart b/lib/state/fit_core.dart
index cc920bd..89114fa 100644
--- a/lib/state/fit_core.dart
+++ b/lib/state/fit_core.dart
@@ -69,6 +69,8 @@ abstract class FitCore extends ChangeNotifier {
final Map<String, Map<int, int>> videoMarks = {};
+ final Map<String, double> exerciseBar = {};
+
final Map<String, String> modeOverride = {};
VoidCallback? onWidgetsShouldUpdate;
diff --git a/lib/state/fit_state.dart b/lib/state/fit_state.dart
index e380986..4788266 100644
--- a/lib/state/fit_state.dart
+++ b/lib/state/fit_state.dart
@@ -152,12 +152,17 @@ class FitState extends FitCore
demoSize = data['demo'] as String? ?? 'large';
alarmStyle = data['alarmStyle'] as String? ?? 'quiet';
RestAlarm.instance.style = alarmStyle;
+ Beeper.instance.loud = alarmStyle == 'loud';
noSuggest
..clear()
..addAll(((data['noSuggest'] as List?) ?? const []).cast<String>());
archived
..clear()
..addAll(((data['archived'] as List?) ?? const []).cast<String>());
+ exerciseBar
+ ..clear()
+ ..addAll(((data['barKg'] as Map?) ?? const {})
+ .map((k, v) => MapEntry(k as String, (v as num).toDouble())));
videoMarks
..clear()
..addAll(((data['marks'] as Map?) ?? const {}).map((k, v) => MapEntry(
@@ -351,6 +356,7 @@ class FitState extends FitCore
'alarmStyle': alarmStyle,
'noSuggest': noSuggest.toList(),
'archived': archived.toList(),
+ 'barKg': exerciseBar,
'marks': videoMarks.map((k, v) => MapEntry(k, v.map((i, ms) => MapEntry('$i', ms)))),
'exMode': modeOverride,
'trainAt': trainReminderMin,
@@ -428,6 +434,7 @@ class FitState extends FitCore
noSuggest.clear();
archived.clear();
videoMarks.clear();
+ exerciseBar.clear();
modeOverride.clear();
demoSize = 'large';
MediaStore.clearAll();
@@ -698,7 +705,13 @@ class FitState extends FitCore
final gear = kEquipment.contains(item.equipment) ? item.equipment! : 'Other';
final level = kDifficulties.contains(item.level) ? item.level! : 'Beginner';
final id = addCustomExercise(
- name: item.name, primary: muscle, equipment: gear, difficulty: level, steps: item.steps, mode: item.mode);
+ name: item.name,
+ primary: muscle,
+ equipment: gear,
+ difficulty: level,
+ steps: item.steps,
+ mode: item.mode,
+ secondary: item.secondary);
return exerciseById(id);
}
@@ -835,6 +848,7 @@ class FitState extends FitCore
if (isCustom(id))
'custom': {
'muscle': ex.primary,
+ if (ex.secondary.isNotEmpty) 'secondary': ex.secondary,
'equipment': ex.equipment,
'level': ex.difficulty,
if (ex.steps.isNotEmpty) 'steps': ex.steps,
diff --git a/lib/state/library_state.dart b/lib/state/library_state.dart
index a0fba9b..6d09b0e 100644
--- a/lib/state/library_state.dart
+++ b/lib/state/library_state.dart
@@ -137,13 +137,14 @@ mixin LibraryState on FitCore {
String difficulty = 'Beginner',
List<String> steps = const [],
String mode = '',
+ List<String> secondary = const [],
}) {
final id = 'c${DateTime.now().microsecondsSinceEpoch}-${_customSeq++}';
customExercises.add(Exercise(
id: id,
name: name.trim(),
primary: primary,
- secondary: const [],
+ secondary: _cleanSecondary(primary, secondary),
equipment: equipment,
difficulty: difficulty,
art: '',
@@ -163,12 +164,14 @@ mixin LibraryState on FitCore {
required String difficulty,
required List<String> steps,
required String mode,
+ List<String> secondary = const [],
}) {
final i = customExercises.indexWhere((e) => e.id == id);
if (i < 0 || name.trim().isEmpty) return;
customExercises[i] = customExercises[i].copyWith(
name: name.trim(),
primary: primary,
+ secondary: _cleanSecondary(primary, secondary),
equipment: equipment,
difficulty: difficulty,
steps: _cleanSteps(steps),
@@ -179,6 +182,11 @@ mixin LibraryState on FitCore {
notifyListeners();
}
+ static List<String> _cleanSecondary(String primary, List<String> raw) => [
+ for (final m in kMuscles)
+ if (m.id != primary && raw.contains(m.id)) m.id,
+ ];
+
static final _bullet = RegExp(r'^(\d+[.)]|[-•*])\s*');
static List<String> _cleanSteps(List<String> raw) => [
diff --git a/lib/state/notes_state.dart b/lib/state/notes_state.dart
index bd8f694..2493022 100644
--- a/lib/state/notes_state.dart
+++ b/lib/state/notes_state.dart
@@ -162,7 +162,7 @@ mixin NotesState on FitCore, LibraryState {
}
void backFromNotes() {
- if (notesAllView) {
+ if (notesAllView && noteScope.isEmpty) {
notesAllView = false;
notifyListeners();
return;
diff --git a/lib/state/settings_state.dart b/lib/state/settings_state.dart
index b060d89..9a177fc 100644
--- a/lib/state/settings_state.dart
+++ b/lib/state/settings_state.dart
@@ -81,6 +81,7 @@ mixin SettingsState on FitCore, ToolsState, LibraryState {
if (!const ['loud', 'quiet', 'vibrate'].contains(style)) return;
alarmStyle = style;
RestAlarm.instance.style = style;
+ Beeper.instance.loud = style == 'loud';
_persist();
notifyListeners();
}
diff --git a/lib/state/tools_state.dart b/lib/state/tools_state.dart
index 1ad9d4c..2f1d2c4 100644
--- a/lib/state/tools_state.dart
+++ b/lib/state/tools_state.dart
@@ -134,11 +134,30 @@ mixin ToolsState on FitCore {
return _round1(displayBar + parts.fold<double>(0, (a, p) => a + p.weight * p.count) * 2);
}
- String? plateHint(String equipment, double weightKg) {
- if (equipment != 'Barbell') return null;
+ bool hasOwnBar(String id) => exerciseBar.containsKey(id);
+
+ double barFor(String id, {String equipment = 'Barbell'}) {
+ final kg = exerciseBar[id];
+ if (kg != null) return _round1(toDisplayWeight(kg));
+ return equipment == 'Barbell' ? defaultBar : 0;
+ }
+
+ void setExerciseBar(String id, double? displayKg) {
+ if (displayKg == null) {
+ exerciseBar.remove(id);
+ } else {
+ exerciseBar[id] = fromDisplayWeight(displayKg.clamp(0, isLb ? 1100 : 500).toDouble());
+ }
+ _persist();
+ notifyListeners();
+ }
+
+ String? plateHint(String equipment, double weightKg, {String id = ''}) {
+ if (equipment != 'Barbell' && !hasOwnBar(id)) return null;
+ final bar = barFor(id, equipment: equipment);
final target = _round1(toDisplayWeight(weightKg));
- if (target <= defaultBar) return null;
- final parts = platesPerSide(target, defaultBar);
+ if (target <= bar) return null;
+ final parts = platesPerSide(target, bar);
if (parts.isEmpty) return null;
return parts
.map((p) => p.count == 1 ? fmt(p.weight) : '${fmt(p.weight)}×${p.count}')
diff --git a/lib/state/workout_state.dart b/lib/state/workout_state.dart
index ce35a64..44b2a97 100644
--- a/lib/state/workout_state.dart
+++ b/lib/state/workout_state.dart
@@ -15,6 +15,7 @@ mixin WorkoutState on FitCore, SettingsState, LibraryState, PlacesState, StatsSt
bool sessionLocked = false;
DateTime? logDay;
int restDoneTick = 0;
+ final ValueNotifier<int> clock = ValueNotifier(0);
int restTotal = 0;
int autoMoves = 0;
@@ -345,7 +346,7 @@ mixin WorkoutState on FitCore, SettingsState, LibraryState, PlacesState, StatsSt
void _startTicking({DateTime? from}) {
_sessionTimer?.cancel();
_runningSince = from ?? DateTime.now();
- _sessionTimer = Timer.periodic(const Duration(seconds: 1), (_) => notifyListeners());
+ _sessionTimer = Timer.periodic(const Duration(seconds: 1), (_) => clock.value++);
}
int get sessionElapsed => _runningSince == null
@@ -373,7 +374,7 @@ mixin WorkoutState on FitCore, SettingsState, LibraryState, PlacesState, StatsSt
void toggleSessionPause() {
final s = session;
- if (holding) stopHold();
+ if (holding && !holdPaused) toggleHoldPause();
if (sessionPaused) {
_startTicking();
sessionPaused = false;
@@ -422,7 +423,7 @@ mixin WorkoutState on FitCore, SettingsState, LibraryState, PlacesState, StatsSt
bool get sessionParked => session != null && !session!.complete && route != 'session';
void stepOutOfSession() {
- if (!sessionPaused) toggleSessionPause();
+ if (!sessionPaused && !(session?.manual ?? false)) toggleSessionPause();
parkSession();
}
@@ -431,6 +432,33 @@ mixin WorkoutState on FitCore, SettingsState, LibraryState, PlacesState, StatsSt
resumeSession();
}
+ DateTime? get manualStart {
+ final s = session;
+ final at = s?.loggedAt;
+ if (s == null || !s.manual || at == null) return null;
+ return at.subtract(Duration(seconds: _elapsedBefore));
+ }
+
+ int get manualMinutes => _elapsedBefore ~/ 60;
+
+ void setManualStart(int minuteOfDay) {
+ final start = manualStart;
+ if (start == null) return;
+ final next = DateTime(start.year, start.month, start.day, minuteOfDay ~/ 60, minuteOfDay % 60);
+ session!.loggedAt = next.add(Duration(seconds: _elapsedBefore));
+ persistNow();
+ notifyListeners();
+ }
+
+ void setManualMinutes(int minutes) {
+ final start = manualStart;
+ if (start == null) return;
+ _elapsedBefore = minutes.clamp(0, 24 * 60) * 60;
+ session!.loggedAt = start.add(Duration(seconds: _elapsedBefore));
+ persistNow();
+ notifyListeners();
+ }
+
bool _backToParked() {
if (!sessionParked) return false;
stepBackIntoSession();
@@ -621,8 +649,10 @@ mixin WorkoutState on FitCore, SettingsState, LibraryState, PlacesState, StatsSt
t.cancel();
restDoneTick++;
RestAlarm.instance.fireNow();
+ notifyListeners();
+ return;
}
- notifyListeners();
+ clock.value++;
});
}
@@ -721,14 +751,38 @@ mixin WorkoutState on FitCore, SettingsState, LibraryState, PlacesState, StatsSt
return left <= 0 ? 0 : (left / 1000).ceil();
}
- int get holdLead => _secondsUntil(holdStartsAt);
+ bool holdPaused = false;
+ int _pausedLeadMs = 0;
+ int _pausedEndMs = 0;
+
+ int get holdLead => holdPaused ? (_pausedLeadMs / 1000).ceil() : _secondsUntil(holdStartsAt);
int? get holdRemaining {
final end = holdEndsAt;
if (end == null) return null;
- return math.min(_secondsUntil(end), holdTotal);
+ return math.min(holdPaused ? (_pausedEndMs / 1000).ceil() : _secondsUntil(end), holdTotal);
+ }
+
+ void toggleHoldPause() {
+ final start = holdStartsAt, end = holdEndsAt;
+ if (start == null || end == null) return;
+ final now = DateTime.now();
+ if (holdPaused) {
+ holdStartsAt = now.add(Duration(milliseconds: _pausedLeadMs));
+ holdEndsAt = now.add(Duration(milliseconds: _pausedEndMs));
+ holdPaused = false;
+ _runHold();
+ } else {
+ _pausedLeadMs = math.max(0, start.difference(now).inMilliseconds);
+ _pausedEndMs = math.max(0, end.difference(now).inMilliseconds);
+ _holdTimer?.cancel();
+ holdPaused = true;
+ }
+ notifyListeners();
}
+ void completeHold() => _finishHold();
+
bool get holding => holdEndsAt != null;
int holdTotal = 0;
@@ -760,6 +814,12 @@ mixin WorkoutState on FitCore, SettingsState, LibraryState, PlacesState, StatsSt
final now = DateTime.now();
holdStartsAt = now.add(const Duration(seconds: holdLeadIn));
holdEndsAt = holdStartsAt!.add(Duration(seconds: secs));
+ holdPaused = false;
+ _runHold();
+ notifyListeners();
+ }
+
+ void _runHold() {
_holdTimer?.cancel();
final sound = alarmStyle != 'vibrate';
var shownLead = holdLead;
@@ -779,19 +839,19 @@ mixin WorkoutState on FitCore, SettingsState, LibraryState, PlacesState, StatsSt
} else if (lead <= 3) {
Beeper.instance.tick(sound: sound);
}
- notifyListeners();
+ clock.value++;
} else if (left != shown) {
shown = left;
if (lead == 0 && left != null && left <= 3) Beeper.instance.tick(sound: sound);
- notifyListeners();
+ clock.value++;
}
});
- notifyListeners();
}
void stopHold() {
_holdTimer?.cancel();
_holdTimer = null;
+ holdPaused = false;
holdEndsAt = null;
holdStartsAt = null;
holdEx = -1;
diff --git a/lib/wear/wear_shell.dart b/lib/wear/wear_shell.dart
index 9a6810e..a24e3ef 100644
--- a/lib/wear/wear_shell.dart
+++ b/lib/wear/wear_shell.dart
@@ -152,7 +152,7 @@ class _WearShellState extends State<WearShell> with WidgetsBindingObserver {
@override
Widget build(BuildContext context) {
return AnimatedBuilder(
- animation: fit,
+ animation: Listenable.merge([fit, fit.clock]),
builder: (context, _) {
final gc = context.gc;
return PopScope(
diff --git a/lib/widgets/exercise_art.dart b/lib/widgets/exercise_art.dart
index 85bef46..ffea038 100644
--- a/lib/widgets/exercise_art.dart
+++ b/lib/widgets/exercise_art.dart
@@ -1,4 +1,5 @@
import 'dart:math' as math;
+import 'dart:ui' as ui;
import 'package:flutter/foundation.dart' show SynchronousFuture;
import 'package:flutter/material.dart';
@@ -19,18 +20,22 @@ const _cacheLimit = 32;
final _cache = <String, ExerciseArtData>{};
final _pending = <String, Future<ExerciseArtData>>{};
-Future<ExerciseArtData> loadExerciseArt(String slug) {
- final hit = _cache.remove(slug);
+Future<ExerciseArtData> loadExerciseArt(String slug, {bool still = false}) {
+ final key = still ? '$slug#still' : slug;
+ final hit = _cache.remove(key) ?? (still ? _cache[slug] : null);
if (hit != null) {
- _cache[slug] = hit;
+ _cache[key] = hit;
return SynchronousFuture(hit);
}
- return _pending.putIfAbsent(slug, () async {
+ return _pending.putIfAbsent(key, () async {
try {
final raw = await rootBundle.loadString('assets/art/$slug.txt');
- final frames = [
+ final lines = [
for (final d in raw.split('\n'))
- if (d.trim().isNotEmpty) parseSvgPathData(d.trim())..fillType = PathFillType.evenOdd,
+ if (d.trim().isNotEmpty) d.trim(),
+ ];
+ final frames = [
+ for (final d in still ? lines.take(1) : lines) parseSvgPathData(d)..fillType = PathFillType.evenOdd,
];
if (frames.isEmpty) throw StateError('sin frames');
var bounds = frames.first.getBounds();
@@ -38,15 +43,35 @@ Future<ExerciseArtData> loadExerciseArt(String slug) {
bounds = bounds.expandToInclude(f.getBounds());
}
final data = ExerciseArtData(frames, bounds);
- _cache[slug] = data;
+ _cache[key] = data;
if (_cache.length > _cacheLimit) _cache.remove(_cache.keys.first);
return data;
} finally {
- _pending.remove(slug);
+ _pending.remove(key);
}
});
}
+const _stillLimit = 160;
+final _stills = <(ExerciseArtData, int, int, Color), ui.Image>{};
+
+ui.Image _still(ExerciseArtData art, Size size, double dpr, Color color) {
+ final w = (size.width * dpr).round();
+ final h = (size.height * dpr).round();
+ final key = (art, w, h, color);
+ final hit = _stills.remove(key);
+ if (hit != null) return _stills[key] = hit;
+ final recorder = ui.PictureRecorder();
+ final canvas = Canvas(recorder)..scale(dpr);
+ _ArtPainter(art, color, null).paint(canvas, size);
+ final picture = recorder.endRecording();
+ final image = picture.toImageSync(w, h);
+ picture.dispose();
+ _stills[key] = image;
+ if (_stills.length > _stillLimit) _stills.remove(_stills.keys.first)?.dispose();
+ return image;
+}
+
class ExerciseArt extends StatefulWidget {
const ExerciseArt({
super.key,
@@ -88,14 +113,20 @@ class _ExerciseArtState extends State<ExerciseArt> with SingleTickerProviderStat
_failed = false;
_fetch();
}
- if (old.live != widget.live) _sync();
+ if (old.live != widget.live) {
+ if (widget.live && (_art?.frames.length ?? 0) < 2) {
+ _fetch();
+ } else {
+ _sync();
+ }
+ }
}
Future<void> _fetch() async {
if (widget.slug.isEmpty) return;
final slug = widget.slug;
try {
- final data = await loadExerciseArt(slug);
+ final data = await loadExerciseArt(slug, still: !widget.live);
if (!mounted || slug != widget.slug) return;
setState(() {
_art = data;
@@ -132,15 +163,22 @@ class _ExerciseArtState extends State<ExerciseArt> with SingleTickerProviderStat
child = Shimmer(radius: widget.radius);
} else if (widget.live && art.frames.length > 1 && _c != null) {
final c = _c!;
- child = AnimatedBuilder(
- animation: c,
- builder: (_, _) => CustomPaint(
- painter: _ArtPainter(art, gc.text, c.value),
+ child = RepaintBoundary(
+ child: CustomPaint(
+ painter: _ArtPainter(art, gc.text, c),
size: Size.infinite,
),
);
} else {
- child = CustomPaint(painter: _ArtPainter(art, gc.text, 0), size: Size.infinite);
+ child = LayoutBuilder(builder: (context, box) {
+ final size = box.biggest;
+ if (!size.isFinite || size.isEmpty) return const SizedBox.shrink();
+ return RawImage(
+ image: _still(art, size, MediaQuery.devicePixelRatioOf(context), gc.text).clone(),
+ width: size.width,
+ height: size.height,
+ );
+ });
}
return Container(
@@ -161,11 +199,11 @@ class _ExerciseArtState extends State<ExerciseArt> with SingleTickerProviderStat
}
class _ArtPainter extends CustomPainter {
- const _ArtPainter(this.art, this.color, this.t);
+ _ArtPainter(this.art, this.color, this.anim) : super(repaint: anim);
final ExerciseArtData art;
final Color color;
- final double t;
+ final Animation<double>? anim;
@override
void paint(Canvas canvas, Size size) {
@@ -180,7 +218,13 @@ class _ArtPainter extends CustomPainter {
canvas.scale(scale);
canvas.translate(-b.center.dx, -b.center.dy);
+ final t = anim?.value ?? 0;
final n = art.frames.length;
+ if (n < 2) {
+ _draw(canvas, art.frames.first, 1);
+ canvas.restore();
+ return;
+ }
final steps = (n - 1) * 2;
final pos = t * steps;
final step = pos.floor() % steps;
@@ -202,5 +246,5 @@ class _ArtPainter extends CustomPainter {
@override
bool shouldRepaint(_ArtPainter old) =>
- old.art != art || old.color != color || old.t != t;
+ old.art != art || old.color != color || old.anim != anim;
}
diff --git a/lib/widgets/ui_kit.dart b/lib/widgets/ui_kit.dart
index 43c8777..8219926 100644
--- a/lib/widgets/ui_kit.dart
+++ b/lib/widgets/ui_kit.dart
@@ -1,6 +1,7 @@
import 'dart:math' as math;
import 'package:flutter/material.dart';
+import 'package:flutter/services.dart';
import 'package:phosphoricons_flutter/phosphoricons_flutter.dart';
import '../theme/app_colors.dart';
@@ -475,6 +476,34 @@ String sentenceCase(String s) {
return s[0] + s.substring(1).toLowerCase();
}
+ReorderItemProxyDecorator liftedRow(double radius) => (child, _, animation) => AnimatedBuilder(
+ animation: animation,
+ child: child,
+ builder: (context, kid) {
+ final t = Curves.easeOutCubic.transform(animation.value);
+ return Transform.scale(
+ scale: 1 + 0.03 * t,
+ child: DecoratedBox(
+ decoration: BoxDecoration(
+ borderRadius: BorderRadius.circular(radius),
+ boxShadow: [
+ BoxShadow(
+ color: Colors.black.withValues(alpha: 0.35 * t),
+ blurRadius: 18 * t,
+ offset: Offset(0, 8 * t),
+ ),
+ ],
+ ),
+ child: Material(type: MaterialType.transparency, child: kid),
+ ),
+ );
+ },
+ );
+
+void reorderPicked(int _) => HapticFeedback.selectionClick();
+
+void reorderDropped(int _) => HapticFeedback.lightImpact();
+
class FitText extends StatelessWidget {
const FitText(this.text, {super.key, required this.style});
@@ -503,10 +532,113 @@ class ScreenTitle extends StatelessWidget {
final double spacing;
@override
Widget build(BuildContext context) =>
- Text(titleCase(text),
- maxLines: 1,
- overflow: TextOverflow.ellipsis,
- style: AppTheme.f(size, weight: FontWeight.w800, color: context.gc.text));
+ MarqueeText(titleCase(text), style: AppTheme.f(size, weight: FontWeight.w800, color: context.gc.text));
+}
+
+class MarqueeText extends StatefulWidget {
+ const MarqueeText(this.text, {super.key, required this.style});
+ final String text;
+ final TextStyle style;
+
+ @override
+ State<MarqueeText> createState() => _MarqueeTextState();
+}
+
+class _MarqueeTextState extends State<MarqueeText> with SingleTickerProviderStateMixin {
+ static const _gap = 48.0;
+ static const _speed = 38.0;
+ static const _holdMs = 1600;
+
+ late final AnimationController _c;
+ double _run = 0;
+ bool _paused = false;
+
+ @override
+ void initState() {
+ super.initState();
+ _c = AnimationController(vsync: this);
+ }
+
+ int get _scrollMs => (_run / _speed * 1000).round();
+
+ void _sync(double run, bool still) {
+ if (run == _run) return;
+ _run = run;
+ WidgetsBinding.instance.addPostFrameCallback((_) {
+ if (!mounted || _run != run) return;
+ if (run == 0) {
+ _c.stop();
+ _c.value = 0;
+ return;
+ }
+ _c.duration = Duration(milliseconds: _holdMs + _scrollMs);
+ _c.value = 0;
+ if (!_paused && !still) _c.repeat();
+ });
+ }
+
+ void _toggle() {
+ setState(() => _paused = !_paused);
+ if (_paused) {
+ _c.stop();
+ } else {
+ _c.repeat();
+ }
+ }
+
+ @override
+ void dispose() {
+ _c.dispose();
+ super.dispose();
+ }
+
+ @override
+ Widget build(BuildContext context) {
+ return LayoutBuilder(builder: (context, box) {
+ final tp = TextPainter(
+ text: TextSpan(text: widget.text, style: widget.style),
+ textDirection: Directionality.of(context),
+ textScaler: MediaQuery.textScalerOf(context),
+ maxLines: 1,
+ )..layout();
+ final fits = tp.width <= box.maxWidth;
+ _sync(fits ? 0 : tp.width + _gap, MediaQuery.disableAnimationsOf(context));
+ final plain = Text(widget.text, maxLines: 1, overflow: TextOverflow.ellipsis, style: widget.style);
+ if (fits) return plain;
+ final rtl = Directionality.of(context) == TextDirection.rtl;
+ return GestureDetector(
+ behavior: HitTestBehavior.opaque,
+ onTap: _toggle,
+ child: SizedBox(
+ width: box.maxWidth,
+ height: tp.height,
+ child: ClipRect(
+ child: AnimatedBuilder(
+ animation: _c,
+ builder: (context, child) {
+ final total = _holdMs + _scrollMs;
+ final ms = _c.value * total;
+ final dx = ms <= _holdMs ? 0.0 : (ms - _holdMs) / _scrollMs * _run;
+ return Transform.translate(offset: Offset(rtl ? dx : -dx, 0), child: child);
+ },
+ child: OverflowBox(
+ alignment: rtl ? Alignment.centerRight : Alignment.centerLeft,
+ maxWidth: double.infinity,
+ child: Row(
+ mainAxisSize: MainAxisSize.min,
+ children: [
+ Text(widget.text, maxLines: 1, softWrap: false, style: widget.style),
+ const SizedBox(width: _gap),
+ Text(widget.text, maxLines: 1, softWrap: false, style: widget.style),
+ ],
+ ),
+ ),
+ ),
+ ),
+ ),
+ );
+ });
+ }
}
class Kicker extends StatelessWidget {
diff --git a/test/exercise_notes_test.dart b/test/exercise_notes_test.dart
index 36e71ff..8ba5788 100644
--- a/test/exercise_notes_test.dart
+++ b/test/exercise_notes_test.dart
@@ -74,7 +74,7 @@ void main() {
expect(find.text(t.noteNoneForExercise), findsOneWidget);
});
- testWidgets('the notes button opens the journal of that exercise', (tester) async {
+ testWidgets('the notes button opens the list of that exercise', (tester) async {
addNotes(10);
await tester.pumpWidget(_host(ExerciseDetailScreen.new));
@@ -83,7 +83,7 @@ void main() {
await tapVisible(tester, find.text(titleCase(t.notes)));
expect(fit.route, 'notes');
expect(fit.noteScope, exId);
- expect(fit.notesAllView, isFalse);
+ expect(fit.notesAllView, isTrue);
});
testWidgets('the journal scoped to one exercise leaves the rest out', (tester) async {
diff --git a/test/fit_export_test.dart b/test/fit_export_test.dart
new file mode 100644
index 0000000..931130d
--- /dev/null
+++ b/test/fit_export_test.dart
@@ -0,0 +1,27 @@
+import 'dart:io';
+
+import 'package:flutter_test/flutter_test.dart';
+import 'package:gymmane/models/workout.dart';
+import 'package:gymmane/services/fit_export.dart';
+
+void main() {
+ final session = LoggedSession(DateTime(2026, 9, 27, 19, 30), 3000, [
+ LoggedExercise('b', 'Barbell Bench Press', 'chest', [LoggedSet(8, 80), LoggedSet(6, 85)]),
+ LoggedExercise('s', 'Barbell Full Squat', 'quads', [LoggedSet(5, 100, kind: SetKind.warmup), LoggedSet(5, 120)]),
+ ]);
+
+ test('el fichero FIT es válido', () {
+ final bytes = workoutFit(session);
+ expect(String.fromCharCodes(bytes.sublist(8, 12)), '.FIT');
+ expect(fitCrc(bytes), 0, reason: 'el CRC sobre todo el fichero da 0 si es correcto');
+ final dump = Platform.environment['FIT_DUMP'];
+ if (dump != null) File(dump).writeAsBytesSync(bytes);
+ });
+
+ test('cada ejercicio cae en su categoría', () {
+ expect(fitCategory('Barbell Bench Press'), 0);
+ expect(fitCategory('Lying Leg Curl'), 15);
+ expect(fitCategory('Dumbbell Biceps Curl'), 7);
+ expect(fitCategory('Something new'), 65534);
+ });
+}
diff --git a/test/requests_27sep_test.dart b/test/requests_27sep_test.dart
index 6d0cecd..2b09235 100644
--- a/test/requests_27sep_test.dart
+++ b/test/requests_27sep_test.dart
@@ -316,6 +316,71 @@ void main() {
});
});
+ group('#107 entreno pasado con su hora', () {
+ test('la hora y la duración elegidas llegan al historial', () {
+ final day = DateTime.now().subtract(const Duration(days: 2));
+ fit.startRoutine(routineOf(['Barbell Bench Press']), on: day);
+ fit.setManualStart(18 * 60 + 30);
+ fit.setManualMinutes(45);
+ fit.stepOutOfSession();
+ fit.stepBackIntoSession();
+ expect(fit.manualMinutes, 45, reason: 'salir y volver no toca la duración');
+ fit.toggleSet(0, 0);
+ fit.finishSession();
+ final s = fit.sessions.last;
+ expect(s.durationSec, 45 * 60);
+ expect(s.date, DateTime(day.year, day.month, day.day, 19, 15));
+ });
+ });
+
+ group('#99 músculos secundarios propios', () {
+ test('se guardan, viajan en la copia y cuentan en las series', () {
+ final id = fit.addCustomExercise(
+ name: 'Thruster', primary: 'quads', equipment: 'Dumbbell', secondary: ['shoulders', 'quads', 'triceps']);
+ final ex = fit.exerciseById(id)!;
+ expect(ex.secondary, ['shoulders', 'triceps'], reason: 'sin repetir el principal');
+ final json = ex.toJson();
+ expect(json['s'], ['shoulders', 'triceps']);
+ fit.sessions.add(logged(DateTime.now(), [LoggedSet(8, 20), LoggedSet(8, 20)], id: id, primary: 'quads'));
+ expect(fit.muscleSetsOver(7)['shoulders'], 1);
+ });
+ });
+
+ group('#88 pausar el temporizador', () {
+ test('pausar guarda lo que queda y terminar ya marca la serie', () {
+ fit.startRoutine(routineOf(['Plank']));
+ fit.endCountdown();
+ fit.setExerciseMode(idOf('Plank'), 'time');
+ fit.startHold(0, 0);
+ final lead = fit.holdLead;
+ fit.toggleHoldPause();
+ expect(fit.holdPaused, isTrue);
+ expect(fit.holdLead, lead);
+ fit.toggleHoldPause();
+ expect(fit.holdPaused, isFalse);
+ fit.toggleHoldPause();
+ fit.completeHold();
+ expect(fit.session!.exercises.first.sets.first.done, isTrue);
+ expect(fit.holding, isFalse);
+ });
+ });
+
+ test('#105 las notas de un ejercicio se abren en lista y atrás vuelve', () {
+ fit.openExercise(idOf('Plank'));
+ fit.goNotes(exerciseId: idOf('Plank'), all: true);
+ expect(fit.notesAllView, isTrue);
+ fit.backFromNotes();
+ expect(fit.route, 'exercise-detail');
+ });
+
+ test('#125 la prensa usa su propio carro en la calculadora', () {
+ final press = idOf('Leg Press');
+ expect(fit.plateHint('Machine', 150, id: press), isNull);
+ fit.setExerciseBar(press, 50);
+ expect(fit.plateHint('Machine', 150, id: press), '25×2');
+ expect(fit.toJson()['barKg'], {press: 50.0});
+ });
+
group('#85 racha con calendario', () {
test('un día sin rutina no rompe la racha', () {
final today = DateTime.now();
diff --git a/test/save_guard_test.dart b/test/save_guard_test.dart
new file mode 100644
index 0000000..abd0291
--- /dev/null
+++ b/test/save_guard_test.dart
@@ -0,0 +1,21 @@
+import 'package:flutter_test/flutter_test.dart';
+import 'package:gymmane/services/local_store.dart';
+import 'package:gymmane/state/fit_state.dart';
+import 'package:shared_preferences/shared_preferences.dart';
+
+void main() {
+ TestWidgetsFlutterBinding.ensureInitialized();
+
+ test('un número roto no impide guardar lo demás', () async {
+ SharedPreferences.setMockInitialValues({});
+ await Store.instance.init();
+ fit.resetAllData();
+ fit.profile.weightKg = double.nan;
+ final id = fit.addCustomExercise(name: 'Mi press', primary: 'chest', equipment: 'Dumbbell');
+ await Store.instance.save(fit.toJson());
+
+ fit.customExercises.clear();
+ fit.loadFromStore();
+ expect(fit.customExercises.map((e) => e.id), [id]);
+ });
+}