Open-source gym & body-weight tracker, now in the App Store (iPhone + Apple Watch) and as an Android APK. Plan routines, log workouts, see which muscles are trained, import from Strong/Hevy/FitNotes. Self-host it or use it on the phone alone.
JavaScript apple-watchbodyweightdockerfitnessfitness-trackergymhealthiosmcpnodejspasskeysprogressive-web-applicationspwareactself-hostedself-hostingvitewebauthnweightliftingworkout-tracker
Merge !40: feat: add update check in settings
Duarte Santose2a34a2fee1c
diff --cc frontend/src/lib/pt-br-locale.test.jsindex a916f6af8,35895fd70..ec05e0e26--- a/frontend/src/lib/pt-br-locale.test.js+++ b/frontend/src/lib/pt-br-locale.test.js@@@ -27,11 -27,11 +27,11 @@@ describe('Brazilian Portuguese locale'.sort(byCodeUnit)const fingerprint = createHash('sha256').update(JSON.stringify(inherited)).digest('hex')- expect(Object.keys(PT_BR_OVERRIDES)).toHaveLength(620)- expect(inherited).toHaveLength(598)- expect(Object.keys(PT_BR_OVERRIDES)).toHaveLength(593)- expect(inherited).toHaveLength(553)++ expect(Object.keys(PT_BR_OVERRIDES)).toHaveLength(624)++ expect(inherited).toHaveLength(603)// If this fails, review the changed keys and wording before accepting a new hash. From// frontend/: node scripts/pt-br-inheritance-fingerprint.mjs --list- expect(fingerprint, 'pt-PT inheritance changed; review the inherited pt-BR wording').toBe('5f1f5dcac5d51dd96f9d1e3506c6a65fd098071b971739686f3cc0360cca35ec')- expect(fingerprint, 'pt-PT inheritance changed; review the inherited pt-BR wording').toBe('4a550b06e44cabd2b69834c15607220ca547854f2b0934843cadaa60a7f61a27')++ expect(fingerprint, 'pt-PT inheritance changed; review the inherited pt-BR wording').toBe('bd391251f433780a99ffee75ce0d8674f6fede55858fe51168dad92d2f3e5c8c')})test('does not leak European Portuguese UI terms', () => {diff --cc frontend/src/lib/update.test.jsindex 000000000,60a2fa98c..1103c6b68mode 000000,100644..100644--- a/frontend/src/lib/update.test.js+++ b/frontend/src/lib/update.test.js@@@ -1,0 -1,219 +1,282 @@@+ import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest'+ import { checkForUpdate, sha256 } from './update.js'++ // __APP_VERSION__ is defined at build time by vite.config.js (reads package.json).+ // In the test environment vitest applies the same define, so it's available here.++ describe('sha256', () => {+ it('computes the correct hash for a known input', async () => {+ const input = new TextEncoder().encode('hello world')+ const hash = await sha256(input.buffer)+ // Well-known SHA-256 of "hello world"+ expect(hash).toBe('b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9')+ })++ it('computes a different hash for different input', async () => {+ const a = await sha256(new TextEncoder().encode('aaa').buffer)+ const b = await sha256(new TextEncoder().encode('bbb').buffer)+ expect(a).not.toBe(b)+ })++ it('returns a 64-character hex string', async () => {+ const hash = await sha256(new TextEncoder().encode('test').buffer)+ expect(hash).toHaveLength(64)+ expect(hash).toMatch(/^[0-9a-f]{64}$/)+ })+ })++ describe('checkForUpdate', () => {+ let originalFetch++ beforeEach(() => { originalFetch = globalThis.fetch })+ afterEach(() => { globalThis.fetch = originalFetch })++ function mockFetch(body, status = 200) {+ globalThis.fetch = vi.fn(() => Promise.resolve({+ ok: status >= 200 && status < 300,+ status,+ json: () => Promise.resolve(body),+ }))+ }++ it('reports no update when the latest release matches the current version', async () => {+ mockFetch([{ tag_name: 'v' + __APP_VERSION__, assets: { links: [] } }])+ const result = await checkForUpdate()+ expect(result.hasUpdate).toBe(false)+ expect(result.latestVersion).toBe(__APP_VERSION__)+ expect(result.apkUrl).toBe(null)+ expect(result.hashUrl).toBe(null)+ })++ it('reports no update when the latest release is older than current', async () => {+ mockFetch([{ tag_name: 'v0.0.1', assets: { links: [] } }])+ const result = await checkForUpdate()+ expect(result.hasUpdate).toBe(false)+ expect(result.latestVersion).toBe('0.0.1')+ })++ it('reports an update when the latest release is newer', async () => {+ mockFetch([{ tag_name: 'v99.0.0', assets: { links: [] } }])+ const result = await checkForUpdate()+ expect(result.hasUpdate).toBe(true)+ expect(result.latestVersion).toBe('99.0.0')+ })++ it('strips the v prefix from the tag name', async () => {+ mockFetch([{ tag_name: 'v99.1.2', assets: { links: [] } }])+ const result = await checkForUpdate()+ expect(result.latestVersion).toBe('99.1.2')+ })++ it('handles tag names without a v prefix', async () => {+ mockFetch([{ tag_name: '99.0.0', assets: { links: [] } }])+ const result = await checkForUpdate()+ expect(result.hasUpdate).toBe(true)+ expect(result.latestVersion).toBe('99.0.0')+ })++ it('finds the APK download URL from release asset links', async () => {+ const apkUrl = 'https://gitlab.com/project/-/releases/v2.0.0/downloads/opengym.apk'+ mockFetch([{+ tag_name: 'v99.0.0',+ assets: { links: [{ url: apkUrl, direct_asset_url: apkUrl }] }+ }])+ const result = await checkForUpdate()+ expect(result.apkUrl).toBe(apkUrl)+ })++ it('prefers direct_asset_url over url for APK links', async () => {+ mockFetch([{+ tag_name: 'v99.0.0',+ assets: {+ links: [{+ url: 'https://redirect.example/opengym.apk',+ direct_asset_url: 'https://direct.example/opengym.apk'+ }]+ }+ }])+ const result = await checkForUpdate()+ expect(result.apkUrl).toBe('https://direct.example/opengym.apk')+ })++ it('returns null apkUrl when no .apk link exists', async () => {+ mockFetch([{+ tag_name: 'v99.0.0',+ assets: { links: [{ url: 'https://example.com/changelog.md', direct_asset_url: 'https://example.com/changelog.md' }] }+ }])+ const result = await checkForUpdate()+ expect(result.hasUpdate).toBe(true)+ expect(result.apkUrl).toBe(null)+ })++ it('finds the .sha256 hash URL from release asset links', async () => {+ const hashUrl = 'https://gitlab.com/project/-/releases/v2.0.0/downloads/opengym.apk.sha256'+ mockFetch([{+ tag_name: 'v99.0.0',+ assets: {+ links: [+ { url: 'https://example.com/opengym.apk', direct_asset_url: 'https://example.com/opengym.apk' },+ { url: hashUrl, direct_asset_url: hashUrl },+ ]+ }+ }])+ const result = await checkForUpdate()+ expect(result.hashUrl).toBe(hashUrl)+ })++ it('finds hash URL by link name containing sha256', async () => {+ mockFetch([{+ tag_name: 'v99.0.0',+ assets: {+ links: [+ { name: 'APK', url: 'https://example.com/opengym.apk', direct_asset_url: 'https://example.com/opengym.apk' },+ { name: 'SHA256 checksum', url: 'https://example.com/checksum.txt', direct_asset_url: 'https://example.com/checksum.txt' },+ ]+ }+ }])+ const result = await checkForUpdate()+ expect(result.hashUrl).toBe('https://example.com/checksum.txt')+ })+++ // The exact JSON gitlab.com returns for GET /projects/85678327/releases?per_page=1 (v1.3.1,++ // fetched 2026-09-05, description and commit trimmed). The CI publishes the APK and its++ // checksum as generic-package links, and the checksum link is listed BEFORE the APK — the++ // detection must not confuse the two.++ const REAL_RELEASE = [++ {++ "tag_name": "v1.3.1",++ "name": "openGym v1.3.1",++ "assets": {++ "count": 7,++ "sources": [++ {++ "format": "zip",++ "url": "https://gitlab.com/DuarteSantos8/opengym/-/archive/v1.3.1/opengym-v1.3.1.zip"++ },++ {++ "format": "tar.gz",++ "url": "https://gitlab.com/DuarteSantos8/opengym/-/archive/v1.3.1/opengym-v1.3.1.tar.gz"++ },++ {++ "format": "tar.bz2",++ "url": "https://gitlab.com/DuarteSantos8/opengym/-/archive/v1.3.1/opengym-v1.3.1.tar.bz2"++ },++ {++ "format": "tar",++ "url": "https://gitlab.com/DuarteSantos8/opengym/-/archive/v1.3.1/opengym-v1.3.1.tar"++ }++ ],++ "links": [++ {++ "id": 12790840,++ "name": "Container images (api + web)",++ "url": "https://gitlab.com/DuarteSantos8/opengym/container_registry",++ "direct_asset_url": "https://gitlab.com/DuarteSantos8/opengym/container_registry",++ "link_type": "image"++ },++ {++ "id": 12790839,++ "name": "openGym-1.3.1.apk.sha256 (checksum)",++ "url": "https://gitlab.com/api/v4/projects/85678327/packages/generic/opengym-android/1.3.1/openGym-1.3.1.apk.sha256",++ "direct_asset_url": "https://gitlab.com/api/v4/projects/85678327/packages/generic/opengym-android/1.3.1/openGym-1.3.1.apk.sha256",++ "link_type": "other"++ },++ {++ "id": 12790838,++ "name": "openGym-1.3.1.apk (Android, sideload)",++ "url": "https://gitlab.com/api/v4/projects/85678327/packages/generic/opengym-android/1.3.1/openGym-1.3.1.apk",++ "direct_asset_url": "https://gitlab.com/api/v4/projects/85678327/packages/generic/opengym-android/1.3.1/openGym-1.3.1.apk",++ "link_type": "package"++ }++ ]++ }++ }++ ]++++ it('finds the APK and its checksum in a real gitlab.com release payload', async () => {++ mockFetch(REAL_RELEASE)++ const result = await checkForUpdate()++ expect(result.latestVersion).toBe('1.3.1')++ expect(result.apkUrl).toBe('https://gitlab.com/api/v4/projects/85678327/packages/generic/opengym-android/1.3.1/openGym-1.3.1.apk')++ expect(result.hashUrl).toBe('https://gitlab.com/api/v4/projects/85678327/packages/generic/opengym-android/1.3.1/openGym-1.3.1.apk.sha256')++ })+++ it('returns null hashUrl when no hash link exists', async () => {+ mockFetch([{+ tag_name: 'v99.0.0',+ assets: { links: [{ url: 'https://example.com/opengym.apk', direct_asset_url: 'https://example.com/opengym.apk' }] }+ }])+ const result = await checkForUpdate()+ expect(result.hashUrl).toBe(null)+ })++ it('returns no update when the releases array is empty', async () => {+ mockFetch([])+ const result = await checkForUpdate()+ expect(result.hasUpdate).toBe(false)+ expect(result.latestVersion).toBe(__APP_VERSION__)+ expect(result.hashUrl).toBe(null)+ })++ it('throws when the API responds with an error status', async () => {+ mockFetch(null, 500)+ await expect(checkForUpdate()).rejects.toThrow('GitLab API 500')+ })++ it('throws on network failure', async () => {+ globalThis.fetch = vi.fn(() => Promise.reject(new Error('Network error')))+ await expect(checkForUpdate()).rejects.toThrow('Network error')+ })+ })++ describe('semver comparison (via checkForUpdate behavior)', () => {+ let originalFetch+ beforeEach(() => { originalFetch = globalThis.fetch })+ afterEach(() => { globalThis.fetch = originalFetch })++ function mockRelease(tag) {+ globalThis.fetch = vi.fn(() => Promise.resolve({+ ok: true, status: 200,+ json: () => Promise.resolve([{ tag_name: tag, assets: { links: [] } }]),+ }))+ }++ // Versions are derived from the running __APP_VERSION__ so the suite never breaks+ // when package.json bumps. bump(2, +1) raises the patch; bump(0, +1) raises the major.+ const [MAJ, MIN, PATCH] = __APP_VERSION__.split('.').map(Number)+ const bump = (idx, by) => {+ const parts = [MAJ, MIN, PATCH]+ parts[idx] += by+ return 'v' + parts.join('.')+ }++ it('detects a patch bump as an update', async () => {+ mockRelease(bump(2, 1))+ expect((await checkForUpdate()).hasUpdate).toBe(true)+ })++ it('detects a minor bump as an update', async () => {+ mockRelease(bump(1, 1))+ expect((await checkForUpdate()).hasUpdate).toBe(true)+ })++ it('detects a major bump as an update', async () => {+ mockRelease(bump(0, 1))+ expect((await checkForUpdate()).hasUpdate).toBe(true)+ })++ it('does not flag an older patch as an update', async () => {+ // One patch below current (current patch is always >= our test floor)+ mockRelease('v' + [MAJ, MIN, Math.max(0, PATCH - 1)].join('.'))+ // Only meaningful when we could actually go lower; when patch is 0 this equals current,+ // which correctly reports no update either way.+ expect((await checkForUpdate()).hasUpdate).toBe(false)+ })++ it('does not flag an older minor as an update', async () => {+ // A version guaranteed lower than any 1.x+ release: same major, minor 0, patch 0,+ // minus one on the minor when possible.+ mockRelease('v' + [MAJ, Math.max(0, MIN - 1), 0].join('.'))+ expect((await checkForUpdate()).hasUpdate).toBe(false)+ })+ })diff --cc frontend/src/locales/de.jsindex b2f0cd041,c44040332..e80aa3d85--- a/frontend/src/locales/de.js+++ b/frontend/src/locales/de.js@@@ -1130,53 -1099,11 +1130,62 @@@ export default'Set to 0 to go back to the default ({0}).': 'Auf 0 stellen, um zum Standard ({0}) zurückzukehren.','Applies to this exercise everywhere, not just this plan.': 'Gilt überall für diese Übung, nicht nur in diesem Plan.','You still log the total weight — the bar only feeds the per-side plate math.': 'Eingetragen wird weiterhin das Gesamtgewicht — die Stange zählt nur für die Scheiben-Rechnung pro Seite.',+ // Gym check-in (mobile-only)+ 'Check in': 'Einchecken',+ 'At the gym': 'Im Studio',+ 'Show this at the gym': 'Im Studio vorzeigen',+ 'Add your gym card': 'Studio-Karte hinzufügen',+ 'Add a card': 'Karte hinzufügen',+ 'Type the number on your membership card, import a photo of it, or scan it with the camera. No extra app needed at the gym — just open this screen.': 'Tippe die Nummer deiner Mitgliedskarte ein, importiere ein Foto oder scanne sie mit der Kamera. Keine zusätzliche App im Studio nötig — öffne einfach diesen Bildschirm.',+ 'Remove this card?': 'Diese Karte entfernen?',+ 'Scan it, import a photo, or type the code by hand.': 'Scanne sie, importiere ein Foto oder tippe den Code von Hand ein.',+ 'Scan': 'Scannen',+ 'Import photo': 'Foto importieren',+ 'Label': 'Bezeichnung',+ 'e.g. FitZone downtown': 'z. B. FitZone Zentrum',+ 'Code': 'Code',+ 'Membership number or code': 'Mitgliedsnummer oder Code',+ 'Save card': 'Karte speichern',+ 'Gym card': 'Studio-Karte',+ 'Card added': 'Karte hinzugefügt',+ 'Nothing to save yet': 'Noch nichts zu speichern',+ "That's not a QR code — only QR cards can be shown here": 'Das ist kein QR-Code — hier lassen sich nur QR-Karten anzeigen',+ 'No QR code found in that image': 'Kein QR-Code im Bild gefunden',+ 'Could not read that image': 'Bild konnte nicht gelesen werden',+ 'Camera permission is needed to scan. Enable it in Settings.': 'Zum Scannen wird die Kamera-Berechtigung benötigt. Aktiviere sie in den Einstellungen.',+ 'Scanning is not available on this device.': 'Scannen ist auf diesem Gerät nicht verfügbar.',+ 'Could not start the scanner': 'Scanner konnte nicht gestartet werden',+ 'Gym check-in': 'Gym-Check-in',+ 'Show a card on Home with your membership QR codes.': 'Zeigt auf Start eine Karte mit deinen Mitglieds-QR-Codes.',+ 'Point the camera at the QR code': 'Richte die Kamera auf den QR-Code',+ 'Camera is not available here — import a photo or type the code instead.': 'Die Kamera ist hier nicht verfügbar — importiere ein Foto oder tippe den Code ein.',+ 'Camera access was denied — allow it in your browser and try again.': 'Kamerazugriff wurde verweigert — erlaube ihn im Browser und versuche es erneut.',+ 'Add note': 'Notiz hinzufügen',+ 'Edit note': 'Notiz bearbeiten',+ 'Progression settings': 'Progressions-Einstellungen',+ 'Set {0}': 'Satz {0}',+ 'Drop set': 'Drop-Satz',+ 'Rest-pause burst': 'Rest-Pause-Burst',+ 'Remove this set': 'Diesen Satz entfernen',+ 'Workout controls': 'Bedienelemente im Training',+ 'Weight and reps buttons': 'Plus/Minus-Tasten für Gewicht und Wdh.',+ 'Off: tap the number and type it': 'Aus: Zahl antippen und eintippen',+ 'Drop and burst shortcuts on every set': 'Drop/Burst-Kürzel an jedem Satz',+ 'Superset buttons in the exercise header': 'Superset-Tasten im Übungskopf',+ 'Move, swap and remove buttons below the exercise': 'Verschieben/Tauschen/Entfernen-Tasten unter der Übung',+ 'Everything hidden here stays one tap away: the ⋯ button of an exercise and the number of a set.': 'Alles, was hier ausgeblendet ist, bleibt einen Tipp entfernt: die ⋯-Taste einer Übung und die Nummer eines Satzes.',+ 'Convert to {0}?': 'In {0} umrechnen?',+ 'Every stored weight — logged sets, working weights, routine targets, body weight, bar weights — is in {0}. Convert the numbers, or keep them and only change the label?': 'Jedes gespeicherte Gewicht — eingetragene Sätze, Arbeitsgewichte, Routinenziele, Körpergewicht, Stangengewichte — steht in {0}. Zahlen umrechnen, oder behalten und nur die Beschriftung ändern?',+ 'Convert the numbers': 'Zahlen umrechnen',+ 'Keep the numbers, change the label': 'Zahlen behalten, nur Beschriftung ändern',+ 'Switching the unit offers to convert every stored weight.': 'Beim Einheitenwechsel wird angeboten, alle gespeicherten Gewichte umzurechnen.',+ 'Update to {0}?': 'Auf {0} aktualisieren?',+ 'The latest version will be downloaded and the installer will open.': 'Die neueste Version wird heruntergeladen und die Installation gestartet.',+ 'Download & Install': 'Herunterladen & Installieren',+ 'Update failed: {0}': 'Update fehlgeschlagen: {0}',+ 'openGym v{0} available': 'openGym v{0} verfügbar',+ 'Starting download…': 'Download wird gestartet…',+ 'Downloading update…': 'Update wird heruntergeladen…',++ '{0} %': '{0} %',++ '{0} MB': '{0} MB',}diff --cc frontend/src/locales/es.jsindex 01e3b64bc,46b70c6d8..88f861a5f--- a/frontend/src/locales/es.js+++ b/frontend/src/locales/es.js@@@ -1111,53 -1080,11 +1111,62 @@@ export default'Set to 0 to go back to the default ({0}).': 'Pon 0 para volver al valor por defecto ({0}).','Applies to this exercise everywhere, not just this plan.': 'Se aplica a este ejercicio en todas partes, no solo en este plan.','You still log the total weight — the bar only feeds the per-side plate math.': 'Sigues registrando el peso total — la barra solo se usa para calcular los discos por lado.',+ // Gym check-in (mobile-only)+ 'Check in': 'Registrarse',+ 'At the gym': 'En el gimnasio',+ 'Show this at the gym': 'Muestra esto en el gimnasio',+ 'Add your gym card': 'Añade tu tarjeta del gimnasio',+ 'Add a card': 'Añadir una tarjeta',+ 'Type the number on your membership card, import a photo of it, or scan it with the camera. No extra app needed at the gym — just open this screen.': 'Escribe el número de tu tarjeta de socio, importa una foto o escanéala con la cámara. No hace falta otra app en el gimnasio — solo abre esta pantalla.',+ 'Remove this card?': '¿Eliminar esta tarjeta?',+ 'Scan it, import a photo, or type the code by hand.': 'Escanéala, importa una foto o escribe el código a mano.',+ 'Scan': 'Escanear',+ 'Import photo': 'Importar foto',+ 'Label': 'Etiqueta',+ 'e.g. FitZone downtown': 'p. ej. FitZone centro',+ 'Code': 'Código',+ 'Membership number or code': 'Número de socio o código',+ 'Save card': 'Guardar tarjeta',+ 'Gym card': 'Tarjeta del gimnasio',+ 'Card added': 'Tarjeta añadida',+ 'Nothing to save yet': 'Nada que guardar todavía',+ "That's not a QR code — only QR cards can be shown here": 'Eso no es un código QR — aquí solo se pueden mostrar tarjetas QR',+ 'No QR code found in that image': 'No se encontró ningún código QR en esa imagen',+ 'Could not read that image': 'No se pudo leer esa imagen',+ 'Camera permission is needed to scan. Enable it in Settings.': 'Se necesita permiso de cámara para escanear. Actívalo en Ajustes.',+ 'Scanning is not available on this device.': 'El escaneo no está disponible en este dispositivo.',+ 'Could not start the scanner': 'No se pudo iniciar el escáner',+ 'Gym check-in': 'Check-in del gimnasio',+ 'Show a card on Home with your membership QR codes.': 'Muestra en Inicio una tarjeta con tus códigos QR de socio.',+ 'Point the camera at the QR code': 'Apunta la cámara al código QR',+ 'Camera is not available here — import a photo or type the code instead.': 'La cámara no está disponible aquí — importa una foto o escribe el código.',+ 'Camera access was denied — allow it in your browser and try again.': 'Se denegó el acceso a la cámara — permítelo en el navegador e inténtalo de nuevo.',+ 'Add note': 'Añadir nota',+ 'Edit note': 'Editar nota',+ 'Progression settings': 'Ajustes de progresión',+ 'Set {0}': 'Serie {0}',+ 'Drop set': 'Serie descendente',+ 'Rest-pause burst': 'Ráfaga rest-pause',+ 'Remove this set': 'Quitar esta serie',+ 'Workout controls': 'Controles del entrenamiento',+ 'Weight and reps buttons': 'Botones +/− de peso y repeticiones',+ 'Off: tap the number and type it': 'Desactivado: toca el número y escríbelo',+ 'Drop and burst shortcuts on every set': 'Atajos de drop y ráfaga en cada serie',+ 'Superset buttons in the exercise header': 'Botones de superserie en la cabecera del ejercicio',+ 'Move, swap and remove buttons below the exercise': 'Botones mover, cambiar y quitar debajo del ejercicio',+ 'Everything hidden here stays one tap away: the ⋯ button of an exercise and the number of a set.': 'Todo lo que ocultes aquí sigue a un toque: el botón ⋯ de un ejercicio y el número de una serie.',+ 'Convert to {0}?': '¿Convertir a {0}?',+ 'Every stored weight — logged sets, working weights, routine targets, body weight, bar weights — is in {0}. Convert the numbers, or keep them and only change the label?': 'Todos los pesos guardados — series registradas, pesos de trabajo, objetivos de rutina, peso corporal, pesos de barra — están en {0}. ¿Convertir los números o mantenerlos y cambiar solo la etiqueta?',+ 'Convert the numbers': 'Convertir los números',+ 'Keep the numbers, change the label': 'Mantener los números, cambiar la etiqueta',+ 'Switching the unit offers to convert every stored weight.': 'Al cambiar la unidad se ofrece convertir todos los pesos guardados.',+ 'Update to {0}?': '¿Actualizar a {0}?',+ 'The latest version will be downloaded and the installer will open.': 'Se descargará la última versión y se abrirá el instalador.',+ 'Download & Install': 'Descargar e instalar',+ 'Update failed: {0}': 'Error en la actualización: {0}',+ 'openGym v{0} available': 'openGym v{0} disponible',+ 'Starting download…': 'Iniciando descarga…',+ 'Downloading update…': 'Descargando actualización…',++ '{0} %': '{0} %',++ '{0} MB': '{0} MB',}diff --cc frontend/src/locales/fr.jsindex 687918725,3dac71124..1e83d9f00--- a/frontend/src/locales/fr.js+++ b/frontend/src/locales/fr.js@@@ -1111,53 -1080,11 +1111,62 @@@ export default'Set to 0 to go back to the default ({0}).': 'Mets 0 pour revenir à la valeur par défaut ({0}).','Applies to this exercise everywhere, not just this plan.': 'S’applique à cet exercice partout, pas seulement dans ce plan.','You still log the total weight — the bar only feeds the per-side plate math.': 'Tu enregistres toujours le poids total — la barre ne sert qu’au calcul des disques par côté.',+ // Gym check-in (mobile-only)+ 'Check in': 'Enregistrement',+ 'At the gym': 'À la salle',+ 'Show this at the gym': 'À présenter à la salle',+ 'Add your gym card': 'Ajoute ta carte de salle',+ 'Add a card': 'Ajouter une carte',+ 'Type the number on your membership card, import a photo of it, or scan it with the camera. No extra app needed at the gym — just open this screen.': 'Saisis le numéro de ta carte de membre, importe une photo ou scanne-la avec l’appareil photo. Aucune autre appli nécessaire à la salle — ouvre simplement cet écran.',+ 'Remove this card?': 'Supprimer cette carte ?',+ 'Scan it, import a photo, or type the code by hand.': 'Scanne-la, importe une photo ou saisis le code à la main.',+ 'Scan': 'Scanner',+ 'Import photo': 'Importer une photo',+ 'Label': 'Libellé',+ 'e.g. FitZone downtown': 'p. ex. FitZone centre-ville',+ 'Code': 'Code',+ 'Membership number or code': 'Numéro de membre ou code',+ 'Save card': 'Enregistrer la carte',+ 'Gym card': 'Carte de salle',+ 'Card added': 'Carte ajoutée',+ 'Nothing to save yet': 'Rien à enregistrer pour l’instant',+ "That's not a QR code — only QR cards can be shown here": 'Ce n’est pas un code QR — seules les cartes QR peuvent être affichées ici',+ 'No QR code found in that image': 'Aucun code QR trouvé dans cette image',+ 'Could not read that image': 'Impossible de lire cette image',+ 'Camera permission is needed to scan. Enable it in Settings.': 'L’autorisation caméra est nécessaire pour scanner. Active-la dans les Réglages.',+ 'Scanning is not available on this device.': 'Le scan n’est pas disponible sur cet appareil.',+ 'Could not start the scanner': 'Impossible de démarrer le scanner',+ 'Gym check-in': 'Enregistrement à la salle',+ 'Show a card on Home with your membership QR codes.': 'Affiche sur l’Accueil une carte avec vos codes QR d’abonné.',+ 'Point the camera at the QR code': 'Pointez la caméra vers le code QR',+ 'Camera is not available here — import a photo or type the code instead.': 'La caméra n’est pas disponible ici — importez une photo ou saisissez le code.',+ 'Camera access was denied — allow it in your browser and try again.': 'L’accès à la caméra a été refusé — autorisez-le dans le navigateur et réessayez.',+ 'Add note': 'Ajouter une note',+ 'Edit note': 'Modifier la note',+ 'Progression settings': 'Réglages de progression',+ 'Set {0}': 'Série {0}',+ 'Drop set': 'Série dégressive',+ 'Rest-pause burst': 'Rafale rest-pause',+ 'Remove this set': 'Supprimer cette série',+ 'Workout controls': 'Commandes pendant la séance',+ 'Weight and reps buttons': 'Boutons +/− poids et répétitions',+ 'Off: tap the number and type it': 'Désactivé : touchez le nombre et saisissez-le',+ 'Drop and burst shortcuts on every set': 'Raccourcis drop et rafale sur chaque série',+ 'Superset buttons in the exercise header': 'Boutons superset dans l\'en-tête de l\'exercice',+ 'Move, swap and remove buttons below the exercise': 'Boutons déplacer, remplacer et retirer sous l\'exercice',+ 'Everything hidden here stays one tap away: the ⋯ button of an exercise and the number of a set.': 'Tout ce qui est masqué ici reste à un tap : le bouton ⋯ d\'un exercice et le numéro d\'une série.',+ 'Convert to {0}?': 'Convertir en {0} ?',+ 'Every stored weight — logged sets, working weights, routine targets, body weight, bar weights — is in {0}. Convert the numbers, or keep them and only change the label?': 'Tous les poids enregistrés — séries, charges de travail, cibles des routines, poids de corps, poids des barres — sont en {0}. Convertir les nombres, ou les garder et ne changer que l’étiquette ?',+ 'Convert the numbers': 'Convertir les nombres',+ 'Keep the numbers, change the label': 'Garder les nombres, changer l’étiquette',+ 'Switching the unit offers to convert every stored weight.': 'Changer d’unité propose de convertir tous les poids enregistrés.',+ 'Update to {0}?': 'Mettre à jour vers {0} ?',+ 'The latest version will be downloaded and the installer will open.': 'La dernière version sera téléchargée et l’installateur s’ouvrira.',+ 'Download & Install': 'Télécharger et installer',+ 'Update failed: {0}': 'Échec de la mise à jour : {0}',+ 'openGym v{0} available': 'openGym v{0} disponible',+ 'Starting download…': 'Démarrage du téléchargement…',+ 'Downloading update…': 'Téléchargement de la mise à jour…',++ '{0} %': '{0} %',++ '{0} MB': '{0} Mo',}diff --cc frontend/src/locales/hi.jsindex 96a1a2f43,689cda9cd..33f5068a3--- a/frontend/src/locales/hi.js+++ b/frontend/src/locales/hi.js@@@ -1111,53 -1080,11 +1111,62 @@@ export default'Set to 0 to go back to the default ({0}).': 'डिफ़ॉल्ट ({0}) पर लौटने के लिए 0 सेट करें।','Applies to this exercise everywhere, not just this plan.': 'यह इस एक्सरसाइज़ पर हर जगह लागू होता है, सिर्फ़ इसी प्लान पर नहीं।','You still log the total weight — the bar only feeds the per-side plate math.': 'आप अब भी कुल वज़न ही दर्ज करते हैं — बार सिर्फ़ हर तरफ़ की प्लेट गिनती में काम आता है।',+ // Gym check-in (mobile-only)+ 'Check in': 'चेक इन',+ 'At the gym': 'जिम में',+ 'Show this at the gym': 'इसे जिम में दिखाएँ',+ 'Add your gym card': 'अपना जिम कार्ड जोड़ें',+ 'Add a card': 'कार्ड जोड़ें',+ 'Type the number on your membership card, import a photo of it, or scan it with the camera. No extra app needed at the gym — just open this screen.': 'अपने मेंबरशिप कार्ड का नंबर लिखें, उसकी फ़ोटो इम्पोर्ट करें, या कैमरे से स्कैन करें। जिम में किसी और ऐप की ज़रूरत नहीं — बस यह स्क्रीन खोलें।',+ 'Remove this card?': 'यह कार्ड हटाएँ?',+ 'Scan it, import a photo, or type the code by hand.': 'इसे स्कैन करें, फ़ोटो इम्पोर्ट करें, या कोड हाथ से लिखें।',+ 'Scan': 'स्कैन करें',+ 'Import photo': 'फ़ोटो इम्पोर्ट करें',+ 'Label': 'लेबल',+ 'e.g. FitZone downtown': 'जैसे FitZone डाउनटाउन',+ 'Code': 'कोड',+ 'Membership number or code': 'मेंबरशिप नंबर या कोड',+ 'Save card': 'कार्ड सहेजें',+ 'Gym card': 'जिम कार्ड',+ 'Card added': 'कार्ड जोड़ा गया',+ 'Nothing to save yet': 'अभी सहेजने के लिए कुछ नहीं',+ "That's not a QR code — only QR cards can be shown here": 'यह QR कोड नहीं है — यहाँ केवल QR कार्ड दिखाए जा सकते हैं',+ 'No QR code found in that image': 'उस छवि में कोई QR कोड नहीं मिला',+ 'Could not read that image': 'वह छवि पढ़ी नहीं जा सकी',+ 'Camera permission is needed to scan. Enable it in Settings.': 'स्कैन करने के लिए कैमरा अनुमति चाहिए। इसे सेटिंग्स में चालू करें।',+ 'Scanning is not available on this device.': 'इस डिवाइस पर स्कैनिंग उपलब्ध नहीं है।',+ 'Could not start the scanner': 'स्कैनर शुरू नहीं हो सका',+ 'Gym check-in': 'जिम चेक-इन',+ 'Show a card on Home with your membership QR codes.': 'होम पर आपके सदस्यता QR कोड वाला कार्ड दिखाता है।',+ 'Point the camera at the QR code': 'कैमरे को QR कोड पर रखें',+ 'Camera is not available here — import a photo or type the code instead.': 'कैमरा यहाँ उपलब्ध नहीं है — फ़ोटो इंपोर्ट करें या कोड टाइप करें।',+ 'Camera access was denied — allow it in your browser and try again.': 'कैमरे की अनुमति नहीं मिली — ब्राउज़र में अनुमति दें और फिर कोशिश करें।',+ 'Add note': 'नोट जोड़ें',+ 'Edit note': 'नोट संपादित करें',+ 'Progression settings': 'प्रगति सेटिंग',+ 'Set {0}': 'सेट {0}',+ 'Drop set': 'ड्रॉप सेट',+ 'Rest-pause burst': 'रेस्ट-पॉज़ बर्स्ट',+ 'Remove this set': 'यह सेट हटाएँ',+ 'Workout controls': 'वर्कआउट नियंत्रण',+ 'Weight and reps buttons': 'वज़न और रेप्स के +/− बटन',+ 'Off: tap the number and type it': 'बंद: संख्या पर टैप करें और टाइप करें',+ 'Drop and burst shortcuts on every set': 'हर सेट पर ड्रॉप और बर्स्ट शॉर्टकट',+ 'Superset buttons in the exercise header': 'व्यायाम शीर्षक में सुपरसेट बटन',+ 'Move, swap and remove buttons below the exercise': 'व्यायाम के नीचे स्थानांतरित, बदलें और हटाएँ बटन',+ 'Everything hidden here stays one tap away: the ⋯ button of an exercise and the number of a set.': 'यहाँ छिपाया गया सब कुछ एक टैप दूर रहता है: व्यायाम का ⋯ बटन और सेट की संख्या।',+ 'Convert to {0}?': '{0} में बदलें?',+ 'Every stored weight — logged sets, working weights, routine targets, body weight, bar weights — is in {0}. Convert the numbers, or keep them and only change the label?': 'हर सहेजा गया वज़न — दर्ज सेट, कार्य वज़न, रूटीन लक्ष्य, शरीर का वज़न, बार वज़न — {0} में है। संख्याएँ बदलें, या उन्हें रखें और केवल लेबल बदलें?',+ 'Convert the numbers': 'संख्याएँ बदलें',+ 'Keep the numbers, change the label': 'संख्याएँ रखें, लेबल बदलें',+ 'Switching the unit offers to convert every stored weight.': 'इकाई बदलने पर सभी सहेजे गए वज़न बदलने का विकल्प मिलता है।',+ 'Update to {0}?': '{0} में अपडेट करें?',+ 'The latest version will be downloaded and the installer will open.': 'नवीनतम संस्करण डाउनलोड होगा और इंस्टॉलर खुलेगा।',+ 'Download & Install': 'डाउनलोड और इंस्टॉल करें',+ 'Update failed: {0}': 'अपडेट विफल: {0}',+ 'openGym v{0} available': 'openGym v{0} उपलब्ध',+ 'Starting download…': 'डाउनलोड शुरू हो रहा है…',+ 'Downloading update…': 'अपडेट डाउनलोड हो रहा है…',++ '{0} %': '{0}%',++ '{0} MB': '{0} MB',}diff --cc frontend/src/locales/hu.jsindex c2da363b8,4535f57eb..fef27617a--- a/frontend/src/locales/hu.js+++ b/frontend/src/locales/hu.js@@@ -1139,28 -1083,11 +1139,37 @@@ export default'What should change?': 'Mi változzon?','Coach is thinking…': 'Az Edző gondolkodik…','Message the Coach…': 'Üzenet az Edzőnek…',+ 'Gym check-in': 'Bejelentkezés a teremben',+ 'Show a card on Home with your membership QR codes.': 'A Kezdőlapon egy kártyát mutat a tagsági QR-kódjaiddal.',+ 'Point the camera at the QR code': 'Irányítsd a kamerát a QR-kódra',+ 'Camera is not available here — import a photo or type the code instead.': 'A kamera itt nem elérhető — importálj egy fotót vagy írd be a kódot.',+ 'Camera access was denied — allow it in your browser and try again.': 'A kamera-hozzáférés elutasítva — engedélyezd a böngészőben, és próbáld újra.',+ 'Add note': 'Jegyzet hozzáadása',+ 'Edit note': 'Jegyzet szerkesztése',+ 'Progression settings': 'Progresszió beállításai',+ 'Set {0}': '{0}. sorozat',+ 'Drop set': 'Drop szett',+ 'Rest-pause burst': 'Rest-pause sorozat',+ 'Remove this set': 'Sorozat eltávolítása',+ 'Workout controls': 'Vezérlők edzés közben',+ 'Weight and reps buttons': 'Súly és ismétlés +/− gombok',+ 'Off: tap the number and type it': 'Ki: koppints a számra és írd be',+ 'Drop and burst shortcuts on every set': 'Drop és rest-pause gyorsgombok minden sorozatnál',+ 'Superset buttons in the exercise header': 'Szuperszett gombok a gyakorlat fejlécében',+ 'Move, swap and remove buttons below the exercise': 'Mozgatás, csere és eltávolítás gombok a gyakorlat alatt',+ 'Everything hidden here stays one tap away: the ⋯ button of an exercise and the number of a set.': 'Minden, amit itt elrejtesz, egy koppintásra marad: a gyakorlat ⋯ gombja és a sorozat száma.',+ 'Convert to {0}?': 'Átváltás {0}-ra?',+ 'Every stored weight — logged sets, working weights, routine targets, body weight, bar weights — is in {0}. Convert the numbers, or keep them and only change the label?': 'Minden tárolt súly — naplózott sorozatok, munkasúlyok, rutincélok, testsúly, rúdsúlyok — {0}-ban van. Átváltsuk a számokat, vagy maradjanak és csak a címke változzon?',+ 'Convert the numbers': 'Számok átváltása',+ 'Keep the numbers, change the label': 'Számok maradnak, csak a címke változik',+ 'Switching the unit offers to convert every stored weight.': 'Mértékegység-váltáskor felajánlja minden tárolt súly átváltását.',+ 'Update to {0}?': 'Frissítés erre: {0}?',+ 'The latest version will be downloaded and the installer will open.': 'A legújabb verzió letöltődik, és megnyílik a telepítő.',+ 'Download & Install': 'Letöltés és telepítés',+ 'Update failed: {0}': 'A frissítés sikertelen: {0}',+ 'openGym v{0} available': 'openGym v{0} elérhető',+ 'Starting download…': 'Letöltés indítása…',+ 'Downloading update…': 'Frissítés letöltése…',++ '{0} %': '{0} %',++ '{0} MB': '{0} MB',}diff --cc frontend/src/locales/it.jsindex 497b57553,877384b4e..4496d0daf--- a/frontend/src/locales/it.js+++ b/frontend/src/locales/it.js@@@ -1111,53 -1080,11 +1111,62 @@@ export default'Set to 0 to go back to the default ({0}).': 'Imposta 0 per tornare al valore predefinito ({0}).','Applies to this exercise everywhere, not just this plan.': 'Vale per questo esercizio ovunque, non solo in questo piano.','You still log the total weight — the bar only feeds the per-side plate math.': 'Registri comunque il peso totale — il bilanciere serve solo al calcolo dei dischi per lato.',+ // Gym check-in (mobile-only)+ 'Check in': 'Check-in',+ 'At the gym': 'In palestra',+ 'Show this at the gym': 'Mostralo in palestra',+ 'Add your gym card': 'Aggiungi la tua tessera',+ 'Add a card': 'Aggiungi una tessera',+ 'Type the number on your membership card, import a photo of it, or scan it with the camera. No extra app needed at the gym — just open this screen.': 'Digita il numero della tua tessera, importa una foto o scansionala con la fotocamera. Nessuna app extra in palestra — apri semplicemente questa schermata.',+ 'Remove this card?': 'Rimuovere questa tessera?',+ 'Scan it, import a photo, or type the code by hand.': 'Scansionala, importa una foto o digita il codice a mano.',+ 'Scan': 'Scansiona',+ 'Import photo': 'Importa foto',+ 'Label': 'Etichetta',+ 'e.g. FitZone downtown': 'es. FitZone centro',+ 'Code': 'Codice',+ 'Membership number or code': 'Numero tessera o codice',+ 'Save card': 'Salva tessera',+ 'Gym card': 'Tessera palestra',+ 'Card added': 'Tessera aggiunta',+ 'Nothing to save yet': 'Ancora niente da salvare',+ "That's not a QR code — only QR cards can be shown here": 'Non è un codice QR — qui si possono mostrare solo tessere QR',+ 'No QR code found in that image': 'Nessun codice QR trovato nell’immagine',+ 'Could not read that image': 'Impossibile leggere l’immagine',+ 'Camera permission is needed to scan. Enable it in Settings.': 'Per scansionare serve l’autorizzazione alla fotocamera. Attivala nelle Impostazioni.',+ 'Scanning is not available on this device.': 'La scansione non è disponibile su questo dispositivo.',+ 'Could not start the scanner': 'Impossibile avviare lo scanner',+ 'Gym check-in': 'Check-in in palestra',+ 'Show a card on Home with your membership QR codes.': 'Mostra nella Home una scheda con i tuoi codici QR di iscrizione.',+ 'Point the camera at the QR code': 'Inquadra il codice QR con la fotocamera',+ 'Camera is not available here — import a photo or type the code instead.': 'La fotocamera non è disponibile qui — importa una foto o digita il codice.',+ 'Camera access was denied — allow it in your browser and try again.': 'Accesso alla fotocamera negato — consentilo nel browser e riprova.',+ 'Add note': 'Aggiungi nota',+ 'Edit note': 'Modifica nota',+ 'Progression settings': 'Impostazioni di progressione',+ 'Set {0}': 'Serie {0}',+ 'Drop set': 'Drop set',+ 'Rest-pause burst': 'Raffica rest-pause',+ 'Remove this set': 'Rimuovi questa serie',+ 'Workout controls': 'Controlli durante l’allenamento',+ 'Weight and reps buttons': 'Pulsanti +/− di peso e ripetizioni',+ 'Off: tap the number and type it': 'Disattivato: tocca il numero e digitalo',+ 'Drop and burst shortcuts on every set': 'Scorciatoie drop e raffica su ogni serie',+ 'Superset buttons in the exercise header': 'Pulsanti superset nell’intestazione dell’esercizio',+ 'Move, swap and remove buttons below the exercise': 'Pulsanti sposta, sostituisci e rimuovi sotto l’esercizio',+ 'Everything hidden here stays one tap away: the ⋯ button of an exercise and the number of a set.': 'Tutto ciò che nascondi qui resta a un tocco: il pulsante ⋯ di un esercizio e il numero di una serie.',+ 'Convert to {0}?': 'Convertire in {0}?',+ 'Every stored weight — logged sets, working weights, routine targets, body weight, bar weights — is in {0}. Convert the numbers, or keep them and only change the label?': 'Ogni peso salvato — serie registrate, pesi di lavoro, obiettivi delle routine, peso corporeo, pesi dei bilancieri — è in {0}. Convertire i numeri o tenerli e cambiare solo l’etichetta?',+ 'Convert the numbers': 'Converti i numeri',+ 'Keep the numbers, change the label': 'Tieni i numeri, cambia l’etichetta',+ 'Switching the unit offers to convert every stored weight.': 'Cambiando unità viene proposto di convertire tutti i pesi salvati.',+ 'Update to {0}?': 'Aggiornare a {0}?',+ 'The latest version will be downloaded and the installer will open.': 'L’ultima versione verrà scaricata e si aprirà il programma di installazione.',+ 'Download & Install': 'Scarica e installa',+ 'Update failed: {0}': 'Aggiornamento fallito: {0}',+ 'openGym v{0} available': 'openGym v{0} disponibile',+ 'Starting download…': 'Avvio del download…',+ 'Downloading update…': 'Download dell’aggiornamento…',++ '{0} %': '{0} %',++ '{0} MB': '{0} MB',}diff --cc frontend/src/locales/ko.jsindex 6b3d8d2c1,58621a9ae..16cc820a3--- a/frontend/src/locales/ko.js+++ b/frontend/src/locales/ko.js@@@ -1111,53 -1080,11 +1111,62 @@@ export default'Set to 0 to go back to the default ({0}).': '0으로 두면 기본값({0})으로 돌아갑니다.','Applies to this exercise everywhere, not just this plan.': '이 플랜만이 아니라 어디서든 이 운동에 적용됩니다.','You still log the total weight — the bar only feeds the per-side plate math.': '기록은 여전히 총 무게입니다 — 바 무게는 한쪽에 끼울 원판 계산에만 쓰입니다.',+ // Gym check-in (mobile-only)+ 'Check in': '체크인',+ 'At the gym': '헬스장에서',+ 'Show this at the gym': '헬스장에서 이것을 보여주세요',+ 'Add your gym card': '헬스장 카드 추가',+ 'Add a card': '카드 추가',+ 'Type the number on your membership card, import a photo of it, or scan it with the camera. No extra app needed at the gym — just open this screen.': '멤버십 카드 번호를 입력하거나, 사진을 가져오거나, 카메라로 스캔하세요. 헬스장에서 별도 앱이 필요 없이 이 화면만 열면 됩니다.',+ 'Remove this card?': '이 카드를 삭제할까요?',+ 'Scan it, import a photo, or type the code by hand.': '스캔하거나 사진을 가져오거나 코드를 직접 입력하세요.',+ 'Scan': '스캔',+ 'Import photo': '사진 가져오기',+ 'Label': '이름',+ 'e.g. FitZone downtown': '예: FitZone 시내점',+ 'Code': '코드',+ 'Membership number or code': '회원 번호 또는 코드',+ 'Save card': '카드 저장',+ 'Gym card': '헬스장 카드',+ 'Card added': '카드가 추가되었습니다',+ 'Nothing to save yet': '아직 저장할 내용이 없습니다',+ "That's not a QR code — only QR cards can be shown here": 'QR 코드가 아닙니다 — 여기서는 QR 카드만 표시할 수 있습니다',+ 'No QR code found in that image': '이미지에서 QR 코드를 찾을 수 없습니다',+ 'Could not read that image': '이미지를 읽을 수 없습니다',+ 'Camera permission is needed to scan. Enable it in Settings.': '스캔하려면 카메라 권한이 필요합니다. 설정에서 켜세요.',+ 'Scanning is not available on this device.': '이 기기에서는 스캔을 사용할 수 없습니다.',+ 'Could not start the scanner': '스캐너를 시작할 수 없습니다',+ 'Gym check-in': '헬스장 체크인',+ 'Show a card on Home with your membership QR codes.': '홈 화면에 회원 QR 코드 카드를 표시합니다.',+ 'Point the camera at the QR code': '카메라를 QR 코드에 맞추세요',+ 'Camera is not available here — import a photo or type the code instead.': '여기서는 카메라를 사용할 수 없습니다 — 사진을 가져오거나 코드를 입력하세요.',+ 'Camera access was denied — allow it in your browser and try again.': '카메라 접근이 거부되었습니다 — 브라우저에서 허용한 뒤 다시 시도하세요.',+ 'Add note': '메모 추가',+ 'Edit note': '메모 편집',+ 'Progression settings': '진행 설정',+ 'Set {0}': '{0}세트',+ 'Drop set': '드롭 세트',+ 'Rest-pause burst': '레스트 포즈',+ 'Remove this set': '이 세트 삭제',+ 'Workout controls': '운동 중 버튼',+ 'Weight and reps buttons': '무게·횟수 +/− 버튼',+ 'Off: tap the number and type it': '끄면 숫자를 눌러 직접 입력',+ 'Drop and burst shortcuts on every set': '모든 세트에 드롭·레스트 포즈 바로가기',+ 'Superset buttons in the exercise header': '운동 제목의 슈퍼세트 버튼',+ 'Move, swap and remove buttons below the exercise': '운동 아래의 이동·교체·삭제 버튼',+ 'Everything hidden here stays one tap away: the ⋯ button of an exercise and the number of a set.': '여기서 숨긴 것은 모두 한 번의 탭으로 열 수 있습니다: 운동의 ⋯ 버튼과 세트 번호.',+ 'Convert to {0}?': '{0}(으)로 변환할까요?',+ 'Every stored weight — logged sets, working weights, routine targets, body weight, bar weights — is in {0}. Convert the numbers, or keep them and only change the label?': '저장된 모든 무게(기록된 세트, 작업 무게, 루틴 목표, 체중, 바 무게)는 {0} 단위입니다. 숫자를 변환할까요, 아니면 숫자는 그대로 두고 표시만 바꿀까요?',+ 'Convert the numbers': '숫자 변환',+ 'Keep the numbers, change the label': '숫자 유지, 표시만 변경',+ 'Switching the unit offers to convert every stored weight.': '단위를 바꾸면 저장된 모든 무게를 변환할지 물어봅니다.',+ 'Update to {0}?': '{0}(으)로 업데이트하시겠습니까?',+ 'The latest version will be downloaded and the installer will open.': '최신 버전이 다운로드되고 설치 프로그램이 열립니다.',+ 'Download & Install': '다운로드 및 설치',+ 'Update failed: {0}': '업데이트 실패: {0}',+ 'openGym v{0} available': 'openGym v{0} 사용 가능',+ 'Starting download…': '다운로드 시작 중…',+ 'Downloading update…': '업데이트 다운로드 중…',++ '{0} %': '{0}%',++ '{0} MB': '{0} MB',}diff --cc frontend/src/locales/pl.jsindex 1d136a97a,47bfe12ca..c288749d4--- a/frontend/src/locales/pl.js+++ b/frontend/src/locales/pl.js@@@ -1111,53 -1080,11 +1111,62 @@@ export default'Set to 0 to go back to the default ({0}).': 'Ustaw 0, aby wrócić do wartości domyślnej ({0}).','Applies to this exercise everywhere, not just this plan.': 'Dotyczy tego ćwiczenia wszędzie, nie tylko w tym planie.','You still log the total weight — the bar only feeds the per-side plate math.': 'Nadal zapisujesz ciężar całkowity — gryf służy tylko do wyliczenia talerzy na stronę.',+ // Gym check-in (mobile-only)+ 'Check in': 'Zamelduj się',+ 'At the gym': 'Na siłowni',+ 'Show this at the gym': 'Pokaż to na siłowni',+ 'Add your gym card': 'Dodaj kartę siłowni',+ 'Add a card': 'Dodaj kartę',+ 'Type the number on your membership card, import a photo of it, or scan it with the camera. No extra app needed at the gym — just open this screen.': 'Wpisz numer karty członkowskiej, zaimportuj jej zdjęcie lub zeskanuj aparatem. Na siłowni nie potrzebujesz osobnej aplikacji — po prostu otwórz ten ekran.',+ 'Remove this card?': 'Usunąć tę kartę?',+ 'Scan it, import a photo, or type the code by hand.': 'Zeskanuj ją, zaimportuj zdjęcie lub wpisz kod ręcznie.',+ 'Scan': 'Skanuj',+ 'Import photo': 'Importuj zdjęcie',+ 'Label': 'Etykieta',+ 'e.g. FitZone downtown': 'np. FitZone centrum',+ 'Code': 'Kod',+ 'Membership number or code': 'Numer członkowski lub kod',+ 'Save card': 'Zapisz kartę',+ 'Gym card': 'Karta siłowni',+ 'Card added': 'Dodano kartę',+ 'Nothing to save yet': 'Nie ma jeszcze nic do zapisania',+ "That's not a QR code — only QR cards can be shown here": 'To nie jest kod QR — tutaj można pokazać tylko karty QR',+ 'No QR code found in that image': 'Nie znaleziono kodu QR na tym obrazie',+ 'Could not read that image': 'Nie udało się odczytać tego obrazu',+ 'Camera permission is needed to scan. Enable it in Settings.': 'Do skanowania potrzebne jest pozwolenie na aparat. Włącz je w Ustawieniach.',+ 'Scanning is not available on this device.': 'Skanowanie nie jest dostępne na tym urządzeniu.',+ 'Could not start the scanner': 'Nie udało się uruchomić skanera',+ 'Gym check-in': 'Zameldowanie na siłowni',+ 'Show a card on Home with your membership QR codes.': 'Pokazuje na Starcie kartę z Twoimi kodami QR członkowskimi.',+ 'Point the camera at the QR code': 'Skieruj aparat na kod QR',+ 'Camera is not available here — import a photo or type the code instead.': 'Aparat nie jest tu dostępny — zaimportuj zdjęcie lub wpisz kod.',+ 'Camera access was denied — allow it in your browser and try again.': 'Odmówiono dostępu do aparatu — zezwól w przeglądarce i spróbuj ponownie.',+ 'Add note': 'Dodaj notatkę',+ 'Edit note': 'Edytuj notatkę',+ 'Progression settings': 'Ustawienia progresji',+ 'Set {0}': 'Seria {0}',+ 'Drop set': 'Drop set',+ 'Rest-pause burst': 'Seria rest-pause',+ 'Remove this set': 'Usuń tę serię',+ 'Workout controls': 'Przyciski podczas treningu',+ 'Weight and reps buttons': 'Przyciski +/− ciężaru i powtórzeń',+ 'Off: tap the number and type it': 'Wyłączone: dotknij liczby i wpisz ją',+ 'Drop and burst shortcuts on every set': 'Skróty drop i rest-pause przy każdej serii',+ 'Superset buttons in the exercise header': 'Przyciski superserii w nagłówku ćwiczenia',+ 'Move, swap and remove buttons below the exercise': 'Przyciski przenieś, zamień i usuń pod ćwiczeniem',+ 'Everything hidden here stays one tap away: the ⋯ button of an exercise and the number of a set.': 'Wszystko, co tu ukryjesz, jest o jedno dotknięcie: przycisk ⋯ ćwiczenia i numer serii.',+ 'Convert to {0}?': 'Przeliczyć na {0}?',+ 'Every stored weight — logged sets, working weights, routine targets, body weight, bar weights — is in {0}. Convert the numbers, or keep them and only change the label?': 'Wszystkie zapisane ciężary — serie, ciężary robocze, cele rutyn, masa ciała, ciężary sztang — są w {0}. Przeliczyć liczby, czy zostawić je i zmienić tylko etykietę?',+ 'Convert the numbers': 'Przelicz liczby',+ 'Keep the numbers, change the label': 'Zostaw liczby, zmień etykietę',+ 'Switching the unit offers to convert every stored weight.': 'Zmiana jednostki proponuje przeliczenie wszystkich zapisanych ciężarów.',+ 'Update to {0}?': 'Zaktualizować do {0}?',+ 'The latest version will be downloaded and the installer will open.': 'Najnowsza wersja zostanie pobrana i otworzy się instalator.',+ 'Download & Install': 'Pobierz i zainstaluj',+ 'Update failed: {0}': 'Aktualizacja nie powiodła się: {0}',+ 'openGym v{0} available': 'openGym v{0} dostępna',+ 'Starting download…': 'Rozpoczynanie pobierania…',+ 'Downloading update…': 'Pobieranie aktualizacji…',++ '{0} %': '{0}%',++ '{0} MB': '{0} MB',}diff --cc frontend/src/locales/pt-BR.jsindex 9480788dd,cfc55361e..1105b25af--- a/frontend/src/locales/pt-BR.js+++ b/frontend/src/locales/pt-BR.js@@@ -610,43 -609,13 +610,47 @@@ export const PT_BR_OVERRIDES ='Set to 0 to go back to the default ({0}).': 'Defina 0 para voltar ao padrão ({0}).','Applies to this exercise everywhere, not just this plan.': 'Vale para este exercício em todos os lugares, não só neste plano.','You still log the total weight — the bar only feeds the per-side plate math.': 'Você continua registrando o peso total — a barra só entra no cálculo das anilhas por lado.',- 'Update to {0}?': 'Atualizar para {0}?',+ // Gym check-in (mobile-only) — only where pt-BR differs from pt (inherited via ...pt)+ 'At the gym': 'Na academia',+ 'Show this at the gym': 'Mostre isto na academia',+ 'Add your gym card': 'Adicione seu cartão da academia',+ 'Type the number on your membership card, import a photo of it, or scan it with the camera. No extra app needed at the gym — just open this screen.': 'Digite o número do seu cartão de sócio, importe uma foto ou escaneie com a câmera. Não é preciso outro app na academia — é só abrir esta tela.',+ 'Scan it, import a photo, or type the code by hand.': 'Escaneie, importe uma foto ou digite o código à mão.',+ 'Scan': 'Escanear',+ 'e.g. FitZone downtown': 'ex. FitZone centro',+ 'Gym card': 'Cartão da academia',+ 'Could not read that image': 'Não foi possível ler essa imagem',+ 'Camera permission is needed to scan. Enable it in Settings.': 'É necessária a permissão da câmera para escanear. Ative-a nos Ajustes.',+ 'Scanning is not available on this device.': 'O escaneamento não está disponível neste dispositivo.',+ 'Could not start the scanner': 'Não foi possível iniciar o scanner',+ 'Gym check-in': 'Check-in na academia',+ 'Show a card on Home with your membership QR codes.': 'Mostra no Início um cartão com seus códigos QR de sócio.',+ 'Point the camera at the QR code': 'Aponte a câmera para o código QR',+ 'Camera is not available here — import a photo or type the code instead.': 'A câmera não está disponível aqui — importe uma foto ou digite o código.',+ 'Camera access was denied — allow it in your browser and try again.': 'O acesso à câmera foi negado — permita-o no navegador e tente de novo.',++// --- muscle explorer ---+ 'By muscle': 'Por músculo',+ 'Explore muscles': 'Explorar músculos',+ 'Choose a muscle to see exercises that train it.': 'Escolha um músculo para ver os exercícios que o treinam.',+ 'Exercises for {0}': 'Exercícios para {0}',+ 'Clear selection': 'Limpar seleção',+ 'Primary target': 'Músculo principal',+ 'Also trains': 'Também trabalha',+ 'Progression settings': 'Configurações de progressão',+ 'Workout controls': 'Controles durante o treino',+ 'Off: tap the number and type it': 'Desligado: toque no número e digite',+ 'Move, swap and remove buttons below the exercise': 'Botões mover, trocar e remover abaixo do exercício',+ 'Everything hidden here stays one tap away: the ⋯ button of an exercise and the number of a set.': 'Tudo o que você esconde aqui fica a um toque: o botão ⋯ de um exercício e o número de uma série.',+ // effort quick picker — pt-PT uses "toca"/"escreve"; Brazilian uses "toque"/"digite"+ 'Tap how many reps you had left, or type an exact {0}.': 'Toque em quantas repetições você ainda tinha, ou digite um {0} exato.',+ 'Every stored weight — logged sets, working weights, routine targets, body weight, bar weights — is in {0}. Convert the numbers, or keep them and only change the label?': 'Todos os pesos salvos — séries registradas, pesos de trabalho, alvos das rotinas, peso corporal, pesos das barras — estão em {0}. Converter os números, ou mantê-los e mudar só o rótulo?',+ 'Keep the numbers, change the label': 'Manter os números, mudar o rótulo',+ 'Switching the unit offers to convert every stored weight.': 'Ao mudar de unidade é oferecido converter todos os pesos salvos.',+ 'The latest version will be downloaded and the installer will open.': 'A versão mais recente será baixada e o instalador será aberto.',+ 'Download & Install': 'Baixar e instalar',- 'Update failed: {0}': 'Falha na atualização: {0}',- 'openGym v{0} available': 'openGym v{0} disponível',+ 'Starting download…': 'Iniciando download…',+ 'Downloading update…': 'Baixando atualização…',}export default { ...pt, ...PT_BR_OVERRIDES }diff --cc frontend/src/locales/pt.jsindex b23868852,6fa068361..a70922f4f--- a/frontend/src/locales/pt.js+++ b/frontend/src/locales/pt.js@@@ -1111,53 -1080,11 +1111,62 @@@ export default'Set to 0 to go back to the default ({0}).': 'Coloca 0 para voltar à predefinição ({0}).','Applies to this exercise everywhere, not just this plan.': 'Aplica-se a este exercício em todo o lado, não só neste plano.','You still log the total weight — the bar only feeds the per-side plate math.': 'Continuas a registar o peso total — a barra só conta para o cálculo dos discos por lado.',+ // Gym check-in (mobile-only)+ 'Check in': 'Check-in',+ 'At the gym': 'No ginásio',+ 'Show this at the gym': 'Mostra isto no ginásio',+ 'Add your gym card': 'Adiciona o teu cartão de sócio',+ 'Add a card': 'Adicionar um cartão',+ 'Type the number on your membership card, import a photo of it, or scan it with the camera. No extra app needed at the gym — just open this screen.': 'Escreve o número do teu cartão de sócio, importa uma foto ou digitaliza-o com a câmara. Não é preciso outra app no ginásio — basta abrir este ecrã.',+ 'Remove this card?': 'Remover este cartão?',+ 'Scan it, import a photo, or type the code by hand.': 'Digitaliza-o, importa uma foto ou escreve o código à mão.',+ 'Scan': 'Digitalizar',+ 'Import photo': 'Importar foto',+ 'Label': 'Etiqueta',+ 'e.g. FitZone downtown': 'p. ex. FitZone centro',+ 'Code': 'Código',+ 'Membership number or code': 'Número de sócio ou código',+ 'Save card': 'Guardar cartão',+ 'Gym card': 'Cartão do ginásio',+ 'Card added': 'Cartão adicionado',+ 'Nothing to save yet': 'Ainda não há nada para guardar',+ "That's not a QR code — only QR cards can be shown here": 'Isto não é um código QR — aqui só podem ser mostrados cartões QR',+ 'No QR code found in that image': 'Nenhum código QR encontrado nessa imagem',+ 'Could not read that image': 'Não foi possível ler essa imagem',+ 'Camera permission is needed to scan. Enable it in Settings.': 'É necessária a permissão da câmara para digitalizar. Ativa-a nas Definições.',+ 'Scanning is not available on this device.': 'A digitalização não está disponível neste dispositivo.',+ 'Could not start the scanner': 'Não foi possível iniciar o scanner',+ 'Gym check-in': 'Check-in no ginásio',+ 'Show a card on Home with your membership QR codes.': 'Mostra no Início um cartão com os teus códigos QR de sócio.',+ 'Point the camera at the QR code': 'Aponta a câmara para o código QR',+ 'Camera is not available here — import a photo or type the code instead.': 'A câmara não está disponível aqui — importa uma foto ou escreve o código.',+ 'Camera access was denied — allow it in your browser and try again.': 'O acesso à câmara foi recusado — permite-o no navegador e tenta de novo.',+ 'Add note': 'Adicionar nota',+ 'Edit note': 'Editar nota',+ 'Progression settings': 'Definições de progressão',+ 'Set {0}': 'Série {0}',+ 'Drop set': 'Drop set',+ 'Rest-pause burst': 'Rajada rest-pause',+ 'Remove this set': 'Remover esta série',+ 'Workout controls': 'Controlos durante o treino',+ 'Weight and reps buttons': 'Botões +/− de peso e repetições',+ 'Off: tap the number and type it': 'Desligado: toca no número e escreve-o',+ 'Drop and burst shortcuts on every set': 'Atalhos de drop e rajada em cada série',+ 'Superset buttons in the exercise header': 'Botões de superset no cabeçalho do exercício',+ 'Move, swap and remove buttons below the exercise': 'Botões mover, trocar e remover por baixo do exercício',+ 'Everything hidden here stays one tap away: the ⋯ button of an exercise and the number of a set.': 'Tudo o que escondes aqui fica a um toque: o botão ⋯ de um exercício e o número de uma série.',+ 'Convert to {0}?': 'Converter para {0}?',+ 'Every stored weight — logged sets, working weights, routine targets, body weight, bar weights — is in {0}. Convert the numbers, or keep them and only change the label?': 'Todos os pesos guardados — séries registadas, pesos de trabalho, alvos das rotinas, peso corporal, pesos das barras — estão em {0}. Converter os números, ou mantê-los e mudar só a etiqueta?',+ 'Convert the numbers': 'Converter os números',+ 'Keep the numbers, change the label': 'Manter os números, mudar a etiqueta',+ 'Switching the unit offers to convert every stored weight.': 'Ao mudar de unidade é proposto converter todos os pesos guardados.',+ 'Update to {0}?': 'Atualizar para {0}?',+ 'The latest version will be downloaded and the installer will open.': 'A versão mais recente será transferida e o instalador será aberto.',+ 'Download & Install': 'Transferir e instalar',+ 'Update failed: {0}': 'Falha na atualização: {0}',+ 'openGym v{0} available': 'openGym v{0} disponível',+ 'Starting download…': 'A iniciar transferência…',+ 'Downloading update…': 'A transferir atualização…',++ '{0} %': '{0} %',++ '{0} MB': '{0} MB',}diff --cc frontend/src/locales/ru.jsindex f05aa66ae,9dced192c..3e54981d2--- a/frontend/src/locales/ru.js+++ b/frontend/src/locales/ru.js@@@ -1111,53 -1080,11 +1111,62 @@@ export default'Set to 0 to go back to the default ({0}).': 'Поставь 0, чтобы вернуться к значению по умолчанию ({0}).','Applies to this exercise everywhere, not just this plan.': 'Действует для этого упражнения везде, а не только в этом плане.','You still log the total weight — the bar only feeds the per-side plate math.': 'Записывается по-прежнему общий вес — гриф нужен только для расчёта блинов на сторону.',+ // Gym check-in (mobile-only)+ 'Check in': 'Отметиться',+ 'At the gym': 'В зале',+ 'Show this at the gym': 'Покажите это в зале',+ 'Add your gym card': 'Добавьте карту зала',+ 'Add a card': 'Добавить карту',+ 'Type the number on your membership card, import a photo of it, or scan it with the camera. No extra app needed at the gym — just open this screen.': 'Введите номер клубной карты, импортируйте её фото или отсканируйте камерой. В зале не нужно отдельное приложение — просто откройте этот экран.',+ 'Remove this card?': 'Удалить эту карту?',+ 'Scan it, import a photo, or type the code by hand.': 'Отсканируйте её, импортируйте фото или введите код вручную.',+ 'Scan': 'Сканировать',+ 'Import photo': 'Импортировать фото',+ 'Label': 'Название',+ 'e.g. FitZone downtown': 'напр. FitZone в центре',+ 'Code': 'Код',+ 'Membership number or code': 'Номер участника или код',+ 'Save card': 'Сохранить карту',+ 'Gym card': 'Карта зала',+ 'Card added': 'Карта добавлена',+ 'Nothing to save yet': 'Пока нечего сохранять',+ "That's not a QR code — only QR cards can be shown here": 'Это не QR-код — здесь можно показывать только QR-карты',+ 'No QR code found in that image': 'На изображении не найден QR-код',+ 'Could not read that image': 'Не удалось прочитать изображение',+ 'Camera permission is needed to scan. Enable it in Settings.': 'Для сканирования нужен доступ к камере. Включите его в настройках.',+ 'Scanning is not available on this device.': 'Сканирование недоступно на этом устройстве.',+ 'Could not start the scanner': 'Не удалось запустить сканер',+ 'Gym check-in': 'Отметка в зале',+ 'Show a card on Home with your membership QR codes.': 'Показывает на Главной карточку с вашими QR-кодами абонемента.',+ 'Point the camera at the QR code': 'Наведите камеру на QR-код',+ 'Camera is not available here — import a photo or type the code instead.': 'Камера здесь недоступна — импортируйте фото или введите код.',+ 'Camera access was denied — allow it in your browser and try again.': 'Доступ к камере запрещён — разрешите его в браузере и попробуйте снова.',+ 'Add note': 'Добавить заметку',+ 'Edit note': 'Изменить заметку',+ 'Progression settings': 'Настройки прогрессии',+ 'Set {0}': 'Подход {0}',+ 'Drop set': 'Дроп-сет',+ 'Rest-pause burst': 'Отдых-пауза',+ 'Remove this set': 'Удалить этот подход',+ 'Workout controls': 'Кнопки во время тренировки',+ 'Weight and reps buttons': 'Кнопки +/− для веса и повторений',+ 'Off: tap the number and type it': 'Выкл.: нажмите на число и введите его',+ 'Drop and burst shortcuts on every set': 'Кнопки дроп-сета и отдых-паузы у каждого подхода',+ 'Superset buttons in the exercise header': 'Кнопки суперсета в заголовке упражнения',+ 'Move, swap and remove buttons below the exercise': 'Кнопки переместить, заменить и удалить под упражнением',+ 'Everything hidden here stays one tap away: the ⋯ button of an exercise and the number of a set.': 'Всё скрытое здесь остаётся в одном нажатии: кнопка ⋯ упражнения и номер подхода.',+ 'Convert to {0}?': 'Перевести в {0}?',+ 'Every stored weight — logged sets, working weights, routine targets, body weight, bar weights — is in {0}. Convert the numbers, or keep them and only change the label?': 'Все сохранённые веса — подходы, рабочие веса, цели программ, вес тела, вес грифов — записаны в {0}. Пересчитать числа или оставить их и сменить только подпись?',+ 'Convert the numbers': 'Пересчитать числа',+ 'Keep the numbers, change the label': 'Оставить числа, сменить подпись',+ 'Switching the unit offers to convert every stored weight.': 'При смене единицы предлагается пересчитать все сохранённые веса.',+ 'Update to {0}?': 'Обновить до {0}?',+ 'The latest version will be downloaded and the installer will open.': 'Последняя версия будет загружена и откроется установщик.',+ 'Download & Install': 'Скачать и установить',+ 'Update failed: {0}': 'Ошибка обновления: {0}',+ 'openGym v{0} available': 'openGym v{0} доступна',+ 'Starting download…': 'Начало загрузки…',+ 'Downloading update…': 'Загрузка обновления…',++ '{0} %': '{0} %',++ '{0} MB': '{0} МБ',}diff --cc frontend/src/locales/th.jsindex e6fb2e12a,eb6913728..8e0380fd5--- a/frontend/src/locales/th.js+++ b/frontend/src/locales/th.js@@@ -1147,28 -1091,11 +1147,37 @@@ export default'What should change?': 'ควรเปลี่ยนอะไร','Coach is thinking…': 'โค้ชกำลังคิด…','Message the Coach…': 'ส่งข้อความถึงโค้ช…',+ 'Gym check-in': 'เช็คอินที่ยิม',+ 'Show a card on Home with your membership QR codes.': 'แสดงการ์ดพร้อม QR โค้ดสมาชิกของคุณบนหน้าหลัก',+ 'Point the camera at the QR code': 'เล็งกล้องไปที่ QR โค้ด',+ 'Camera is not available here — import a photo or type the code instead.': 'ใช้กล้องที่นี่ไม่ได้ — นำเข้ารูปภาพหรือพิมพ์รหัสแทน',+ 'Camera access was denied — allow it in your browser and try again.': 'การเข้าถึงกล้องถูกปฏิเสธ — อนุญาตในเบราว์เซอร์แล้วลองอีกครั้ง',+ 'Add note': 'เพิ่มโน้ต',+ 'Edit note': 'แก้ไขโน้ต',+ 'Progression settings': 'ตั้งค่าการเพิ่มน้ำหนัก',+ 'Set {0}': 'เซ็ต {0}',+ 'Drop set': 'ดรอปเซ็ต',+ 'Rest-pause burst': 'เรสต์พอส',+ 'Remove this set': 'ลบเซ็ตนี้',+ 'Workout controls': 'ปุ่มระหว่างออกกำลังกาย',+ 'Weight and reps buttons': 'ปุ่ม +/− น้ำหนักและจำนวนครั้ง',+ 'Off: tap the number and type it': 'ปิด: แตะตัวเลขแล้วพิมพ์เอง',+ 'Drop and burst shortcuts on every set': 'ปุ่มลัดดรอปเซ็ตและเรสต์พอสทุกเซ็ต',+ 'Superset buttons in the exercise header': 'ปุ่มซูเปอร์เซ็ตในหัวข้อท่า',+ 'Move, swap and remove buttons below the exercise': 'ปุ่มย้าย สลับ และลบใต้ท่าออกกำลังกาย',+ 'Everything hidden here stays one tap away: the ⋯ button of an exercise and the number of a set.': 'ทุกอย่างที่ซ่อนไว้ยังอยู่ห่างแค่แตะเดียว: ปุ่ม ⋯ ของท่าและหมายเลขเซ็ต',+ 'Convert to {0}?': 'แปลงเป็น {0} ไหม?',+ 'Every stored weight — logged sets, working weights, routine targets, body weight, bar weights — is in {0}. Convert the numbers, or keep them and only change the label?': 'น้ำหนักที่บันทึกไว้ทั้งหมด — เซ็ตที่บันทึก น้ำหนักทำงาน เป้าหมายของรูทีน น้ำหนักตัว น้ำหนักบาร์ — เป็นหน่วย {0} จะแปลงตัวเลข หรือคงตัวเลขไว้และเปลี่ยนแค่ป้ายหน่วย?',+ 'Convert the numbers': 'แปลงตัวเลข',+ 'Keep the numbers, change the label': 'คงตัวเลขไว้ เปลี่ยนแค่ป้าย',+ 'Switching the unit offers to convert every stored weight.': 'เมื่อเปลี่ยนหน่วยจะมีตัวเลือกให้แปลงน้ำหนักที่บันทึกไว้ทั้งหมด',+ 'Update to {0}?': 'อัปเดตเป็น {0} หรือไม่?',+ 'The latest version will be downloaded and the installer will open.': 'เวอร์ชันล่าสุดจะถูกดาวน์โหลดและตัวติดตั้งจะเปิดขึ้น',+ 'Download & Install': 'ดาวน์โหลดและติดตั้ง',+ 'Update failed: {0}': 'อัปเดตล้มเหลว: {0}',+ 'openGym v{0} available': 'openGym v{0} พร้อมใช้งาน',+ 'Starting download…': 'กำลังเริ่มดาวน์โหลด…',+ 'Downloading update…': 'กำลังดาวน์โหลดอัปเดต…',++ '{0} %': '{0}%',++ '{0} MB': '{0} MB',}diff --cc frontend/src/locales/tr.jsindex a3d5fb91f,34432c2c8..46a5a5f02--- a/frontend/src/locales/tr.js+++ b/frontend/src/locales/tr.js@@@ -1111,53 -1080,11 +1111,62 @@@ export default'Set to 0 to go back to the default ({0}).': 'Varsayılana ({0}) dönmek için 0 yap.','Applies to this exercise everywhere, not just this plan.': 'Yalnızca bu planda değil, bu egzersiz için her yerde geçerli.','You still log the total weight — the bar only feeds the per-side plate math.': 'Yine de toplam ağırlığı kaydedersin — bar yalnızca taraf başına plaka hesabına girer.',+ // Gym check-in (mobile-only)+ 'Check in': 'Giriş yap',+ 'At the gym': 'Salonda',+ 'Show this at the gym': 'Bunu salonda göster',+ 'Add your gym card': 'Salon kartını ekle',+ 'Add a card': 'Kart ekle',+ 'Type the number on your membership card, import a photo of it, or scan it with the camera. No extra app needed at the gym — just open this screen.': 'Üyelik kartındaki numarayı yaz, fotoğrafını içe aktar ya da kamerayla tara. Salonda ekstra bir uygulamaya gerek yok — sadece bu ekranı aç.',+ 'Remove this card?': 'Bu kart kaldırılsın mı?',+ 'Scan it, import a photo, or type the code by hand.': 'Tara, bir fotoğraf içe aktar ya da kodu elle yaz.',+ 'Scan': 'Tara',+ 'Import photo': 'Fotoğraf içe aktar',+ 'Label': 'Etiket',+ 'e.g. FitZone downtown': 'örn. FitZone merkez',+ 'Code': 'Kod',+ 'Membership number or code': 'Üyelik numarası veya kodu',+ 'Save card': 'Kartı kaydet',+ 'Gym card': 'Salon kartı',+ 'Card added': 'Kart eklendi',+ 'Nothing to save yet': 'Henüz kaydedilecek bir şey yok',+ "That's not a QR code — only QR cards can be shown here": 'Bu bir QR kod değil — burada yalnızca QR kartlar gösterilebilir',+ 'No QR code found in that image': 'Bu görüntüde QR kod bulunamadı',+ 'Could not read that image': 'Bu görüntü okunamadı',+ 'Camera permission is needed to scan. Enable it in Settings.': 'Taramak için kamera izni gerekir. Ayarlar’dan etkinleştir.',+ 'Scanning is not available on this device.': 'Tarama bu cihazda kullanılamıyor.',+ 'Could not start the scanner': 'Tarayıcı başlatılamadı',+ 'Gym check-in': 'Salon girişi',+ 'Show a card on Home with your membership QR codes.': 'Ana sayfada üyelik QR kodlarınızı içeren bir kart gösterir.',+ 'Point the camera at the QR code': 'Kamerayı QR koda tutun',+ 'Camera is not available here — import a photo or type the code instead.': 'Kamera burada kullanılamıyor — bir fotoğraf içe aktarın veya kodu yazın.',+ 'Camera access was denied — allow it in your browser and try again.': 'Kamera erişimi reddedildi — tarayıcıda izin verip tekrar deneyin.',+ 'Add note': 'Not ekle',+ 'Edit note': 'Notu düzenle',+ 'Progression settings': 'İlerleme ayarları',+ 'Set {0}': 'Set {0}',+ 'Drop set': 'Drop set',+ 'Rest-pause burst': 'Rest-pause patlaması',+ 'Remove this set': 'Bu seti kaldır',+ 'Workout controls': 'Antrenman kontrolleri',+ 'Weight and reps buttons': 'Ağırlık ve tekrar +/− düğmeleri',+ 'Off: tap the number and type it': 'Kapalı: sayıya dokunup yazın',+ 'Drop and burst shortcuts on every set': 'Her sette drop ve patlama kısayolları',+ 'Superset buttons in the exercise header': 'Egzersiz başlığında süperset düğmeleri',+ 'Move, swap and remove buttons below the exercise': 'Egzersizin altında taşı, değiştir ve kaldır düğmeleri',+ 'Everything hidden here stays one tap away: the ⋯ button of an exercise and the number of a set.': 'Burada gizlenen her şey bir dokunuş uzakta kalır: egzersizin ⋯ düğmesi ve setin numarası.',+ 'Convert to {0}?': '{0} birimine çevrilsin mi?',+ 'Every stored weight — logged sets, working weights, routine targets, body weight, bar weights — is in {0}. Convert the numbers, or keep them and only change the label?': 'Kayıtlı tüm ağırlıklar — setler, çalışma ağırlıkları, rutin hedefleri, vücut ağırlığı, bar ağırlıkları — {0} cinsinden. Sayılar çevrilsin mi, yoksa sayılar kalıp yalnızca etiket mi değişsin?',+ 'Convert the numbers': 'Sayıları çevir',+ 'Keep the numbers, change the label': 'Sayıları koru, etiketi değiştir',+ 'Switching the unit offers to convert every stored weight.': 'Birim değiştirilince tüm kayıtlı ağırlıkları çevirme seçeneği sunulur.',+ 'Update to {0}?': '{0} sürümüne güncellensin mi?',+ 'The latest version will be downloaded and the installer will open.': 'En son sürüm indirilecek ve yükleyici açılacak.',+ 'Download & Install': 'İndir ve Kur',+ 'Update failed: {0}': 'Güncelleme başarısız: {0}',+ 'openGym v{0} available': 'openGym v{0} mevcut',+ 'Starting download…': 'İndirme başlatılıyor…',+ 'Downloading update…': 'Güncelleme indiriliyor…',++ '{0} %': '%{0}',++ '{0} MB': '{0} MB',}diff --cc frontend/src/locales/zh.jsindex 911e3d242,75847caee..a6d8a1c3d--- a/frontend/src/locales/zh.js+++ b/frontend/src/locales/zh.js@@@ -1111,53 -1080,11 +1111,62 @@@ export default'Set to 0 to go back to the default ({0}).': '设为 0 即恢复默认值({0})。','Applies to this exercise everywhere, not just this plan.': '对这个动作处处生效,不只在此计划中。','You still log the total weight — the bar only feeds the per-side plate math.': '记录的仍是总重量——杆重只用于每侧杠铃片的计算。',+ // Gym check-in (mobile-only)+ 'Check in': '签到',+ 'At the gym': '在健身房',+ 'Show this at the gym': '在健身房出示这个',+ 'Add your gym card': '添加你的会员卡',+ 'Add a card': '添加卡片',+ 'Type the number on your membership card, import a photo of it, or scan it with the camera. No extra app needed at the gym — just open this screen.': '输入会员卡上的号码、导入卡片照片,或用相机扫描。在健身房无需额外应用——打开此界面即可。',+ 'Remove this card?': '删除这张卡片?',+ 'Scan it, import a photo, or type the code by hand.': '扫描它、导入照片,或手动输入代码。',+ 'Scan': '扫描',+ 'Import photo': '导入照片',+ 'Label': '名称',+ 'e.g. FitZone downtown': '例如 FitZone 市中心店',+ 'Code': '代码',+ 'Membership number or code': '会员号或代码',+ 'Save card': '保存卡片',+ 'Gym card': '健身房卡片',+ 'Card added': '已添加卡片',+ 'Nothing to save yet': '暂无可保存的内容',+ "That's not a QR code — only QR cards can be shown here": '这不是二维码——此处只能显示二维码卡片',+ 'No QR code found in that image': '在该图片中未找到二维码',+ 'Could not read that image': '无法读取该图片',+ 'Camera permission is needed to scan. Enable it in Settings.': '扫描需要相机权限。请在设置中开启。',+ 'Scanning is not available on this device.': '此设备不支持扫描。',+ 'Could not start the scanner': '无法启动扫描器',+ 'Gym check-in': '健身房签到',+ 'Show a card on Home with your membership QR codes.': '在首页显示一张包含会员二维码的卡片。',+ 'Point the camera at the QR code': '将摄像头对准二维码',+ 'Camera is not available here — import a photo or type the code instead.': '此处无法使用摄像头 — 请导入照片或手动输入代码。',+ 'Camera access was denied — allow it in your browser and try again.': '摄像头访问被拒绝 — 请在浏览器中允许后重试。',+ 'Add note': '添加备注',+ 'Edit note': '编辑备注',+ 'Progression settings': '渐进设置',+ 'Set {0}': '第 {0} 组',+ 'Drop set': '递减组',+ 'Rest-pause burst': '休息暂停组',+ 'Remove this set': '删除这一组',+ 'Workout controls': '训练中的按钮',+ 'Weight and reps buttons': '重量和次数的 +/− 按钮',+ 'Off: tap the number and type it': '关闭:点按数字直接输入',+ 'Drop and burst shortcuts on every set': '每组显示递减/休息暂停快捷按钮',+ 'Superset buttons in the exercise header': '动作标题中的超级组按钮',+ 'Move, swap and remove buttons below the exercise': '动作下方的移动、替换和删除按钮',+ 'Everything hidden here stays one tap away: the ⋯ button of an exercise and the number of a set.': '这里隐藏的一切都只需一次点按:动作的 ⋯ 按钮和组号。',+ 'Convert to {0}?': '换算为 {0}?',+ 'Every stored weight — logged sets, working weights, routine targets, body weight, bar weights — is in {0}. Convert the numbers, or keep them and only change the label?': '所有已保存的重量(记录的组、工作重量、计划目标、体重、杠铃杆重量)目前以 {0} 计。是换算数值,还是保留数值只更改单位标签?',+ 'Convert the numbers': '换算数值',+ 'Keep the numbers, change the label': '保留数值,只改标签',+ 'Switching the unit offers to convert every stored weight.': '切换单位时会提示换算所有已保存的重量。',+ 'Update to {0}?': '更新到 {0}?',+ 'The latest version will be downloaded and the installer will open.': '将下载最新版本并打开安装程序。',+ 'Download & Install': '下载并安装',+ 'Update failed: {0}': '更新失败:{0}',+ 'openGym v{0} available': 'openGym v{0} 可用',+ 'Starting download…': '正在开始下载…',+ 'Downloading update…': '正在下载更新…',++ '{0} %': '{0}%',++ '{0} MB': '{0} MB',}diff --cc frontend/src/views/Settings.gifsize.test.jsxindex e3fa44d2f,3af1877bf..a0d83d4a3--- a/frontend/src/views/Settings.gifsize.test.jsx+++ b/frontend/src/views/Settings.gifsize.test.jsx@@@ -38,10 -38,10 +38,10 @@@ vi.mock('../lib/api.js', () => (}))vi.mock('../lib/push.js', () => ({ pushSupported: () => false, enablePush: vi.fn(), disablePush: vi.fn(), sendTestPush: vi.fn() }))vi.mock('../lib/wakelock.js', () => ({ wakeLockSupported: () => false }))- vi.mock('../lib/mobile.js', () => ({ MOBILE: false, shareExport: vi.fn(), syncReminder: vi.fn() }))+ vi.mock('../lib/mobile.js', () => ({ MOBILE: false, isAndroid: () => Promise.resolve(false), shareExport: vi.fn(), syncReminder: vi.fn() }))vi.mock('./MobileOnboarding.jsx', () => ({ ConnectSheet: () => null }))vi.mock('../sheets.jsx', () => ({- loadStarterPlan: vi.fn(), confirmSheet: vi.fn(), importFromApp: vi.fn(),+ starterPlanSheet: vi.fn(), confirmSheet: vi.fn(), importFromApp: vi.fn(),importFromHevy: vi.fn(), equipmentProfileSheet: vi.fn(),}))diff --cc frontend/src/views/Settings.jsxindex 1949e34d6,c2fe23c60..f96cc5c8b--- a/frontend/src/views/Settings.jsx+++ b/frontend/src/views/Settings.jsx@@@ -1,8 -1,6 +1,8 @@@- import { useEffect, useRef, useState } from 'react'+ import { useEffect, useRef, useState, forwardRef } from 'react'import { useNavigate } from 'react-router-dom'import { useStore, DEF, hasData } from '../store/useStore.js'+import { workoutControls } from '../lib/workout-controls.js'+import { convertStateUnit } from '../lib/units.js'import { useUI } from '../store/useUI.js'import { ACCENTS, todayISO, localTZ, weekStartOf, MONDAY, SUNDAY } from '../lib/format.js'import { effortOf } from '../lib/history.js'@@@ -11,9 -9,10 +11,10 @@@ import { pushSupported, enablePush, disimport { wakeLockSupported } from '../lib/wakelock.js'import { t, LANGS, INSTR_LANGS } from '../lib/i18n.js'import { DEMO, REPO } from '../lib/demo.js'- import { MOBILE, shareExport, syncReminder } from '../lib/mobile.js'+ import { MOBILE, isAndroid, shareExport, syncReminder } from '../lib/mobile.js'+ import { checkForUpdate, downloadAndInstall } from '../lib/update.js'import { ConnectSheet } from './MobileOnboarding.jsx'-import { loadStarterPlan, confirmSheet, importFromApp, importFromHevy, equipmentProfileSheet } from '../sheets.jsx'+import { starterPlanSheet, confirmSheet, importFromApp, importFromHevy, equipmentProfileSheet, menuSheet } from '../sheets.jsx'import Icon from '../components/Icon.jsx'import { Section, Row, SelectRow, Switch, Segmented, Button, TextField } from '../components/ui.jsx'@@@ -28,21 -27,58 +29,75 @@@ export default function Settings()const importRef = useRef(null)const wakeOK = wakeLockSupported()- // --- update check state ---+ // Two honest choices on a unit switch (issue #22): convert the numbers, or keep them and only+ // change the label — the old behaviour, still right for someone who logged in lb all along+ // under a kg label. Closing the sheet leaves the unit as it was.+ const switchUnit = v => {+ if (v === S.unit) return+ menuSheet({+ title: t('Convert to {0}?', v),+ subtitle: t('Every stored weight — logged sets, working weights, routine targets, body weight, bar weights — is in {0}. Convert the numbers, or keep them and only change the label?', S.unit),+ items: [+ { icon: 'shuffle', label: t('Convert the numbers'), onClick: () => replaceState(convertStateUnit(useStore.getState().S, v)) },+ { icon: 'pencil', label: t('Keep the numbers, change the label'), onClick: () => update(s => { s.unit = v }) },+ ],+ })+ }++ // --- update check state ---+ const [updateInfo, setUpdateInfo] = useState(null) // { hasUpdate, latestVersion, apkUrl, hashUrl } | null++ useEffect(() => {+ // The in-app updater installs an .apk, so it only applies to the native Android build.- // On iOS and the web this check is skipped and the update row never appears.++ // On iOS and the web this check is skipped and the update row never appears. isAndroid()++ // already answers false off the mobile build; the MOBILE check on top keeps the web bundle++ // from even asking (and from calling gitlab.com on every Settings visit).++ if (!MOBILE) return+ isAndroid().then(ok => { if (ok) checkForUpdate().then(setUpdateInfo).catch(() => {}) })+ }, [])++ const onUpdateRowClick = () => {+ if (!updateInfo?.hasUpdate) return+ if (updateInfo.apkUrl) {+ // Start download & install+ const version = updateInfo.latestVersion+ confirmSheet({+ title: t('Update to {0}?', version),+ message: t('The latest version will be downloaded and the installer will open.'),+ confirmText: t('Download & Install'),+ onConfirm: async () => {+ // Open a progress sheet+ let closeProgress = null+ let setProgress = null+ useUI.getState().openSheet(close => {+ closeProgress = close+ return <DownloadProgress ref={fn => { setProgress = fn }} />+ }, { locked: true })+ try {+ // Fetch the expected SHA-256 hash if available+ let expectedHash = null+ if (updateInfo.hashUrl) {+ try {+ const hashRes = await fetch(updateInfo.hashUrl)+ if (hashRes.ok) expectedHash = (await hashRes.text()).split(/\s/)[0]+ } catch (e) { /* proceed without hash verification */ }+ }+ await downloadAndInstall(updateInfo.apkUrl, expectedHash, (received, total) => {+ if (setProgress) setProgress(received, total)+ })+ if (closeProgress) closeProgress()+ } catch (e) {+ if (closeProgress) closeProgress()+ toast(t('Update failed: {0}', e.message))+ }+ },+ })+ } else {+ // Update available but no APK asset — open the releases page+ window.open('https://gitlab.com/DuarteSantos8/opengym/-/releases', '_blank', 'noopener')+ }+ }+const doExport = async () => {const json = JSON.stringify(S, null, 2)const name = 'opengym-backup-' + todayISO() + '.json'@@@ -261,7 -279,10 +316,10 @@@{/* ---------- data: fill it, bring things over, back it up, wipe it ---------- */}<Section title={t('Data')}>- {updateInfo?.hasUpdate && <Row icon="info" iconTint="var(--purple)" title={t('openGym v{0} available', updateInfo.latestVersion)}++ {MOBILE && updateInfo?.hasUpdate && <Row icon="info" iconTint="var(--purple)" title={t('openGym v{0} available', updateInfo.latestVersion)}+ accessory="chevron"+ onClick={onUpdateRowClick} />}- <Row icon="sparkles" iconTint="var(--acc)" title={t('Load starter plan (PPL)')} accessory="chevron" onClick={loadStarterPlan} />+ <Row icon="sparkles" iconTint="var(--acc)" title={t('Load starter plan')} accessory="chevron" onClick={starterPlanSheet} /><Row icon="shuffle" iconTint="var(--teal)" title={t('Import from another app')}subtitle={t('FitNotes, Strong, Hevy — or body weight from Apple Health')}accessory="chevron" onClick={() => importRef.current.click()} />@@@ -314,36 -335,32 +372,62 @@@ const EFFORT_ROWS =// against. Not where the stepper starts; + walks up from the bottom of the scale.const EFFORT_TYPICAL = 2+// Settings → During a workout → Workout controls. S.wc overlays DEF.wc, so a profile from+// before this setting existed reads as the lean default.+function WorkoutControlsSheet() {+ const S = useStore(s => s.S)+ const update = useStore(s => s.update)+ const wc = workoutControls(S)+ const set = (k, v) => update(s => { s.wc = { ...workoutControls(s), [k]: v } })+ return <>+ <h3>{t('Workout controls')}</h3>+ <div className="muted small" style={{ marginBottom: 12 }}>{t('Everything hidden here stays one tap away: the ⋯ button of an exercise and the number of a set.')}</div>+ <Section>+ <Row icon="plus" iconTint="var(--acc)" title={t('Weight and reps buttons')} subtitle={t('Off: tap the number and type it')}>+ <Switch checked={wc.steppers} onChange={v => set('steppers', v)} />+ </Row>+ <Row icon="bolt" iconTint="var(--orange)" title={t('Drop and burst shortcuts on every set')}>+ <Switch checked={wc.setShortcuts} onChange={v => set('setShortcuts', v)} />+ </Row>+ <Row icon="link" iconTint="var(--blue)" title={t('Superset buttons in the exercise header')}>+ <Switch checked={wc.pairButtons} onChange={v => set('pairButtons', v)} />+ </Row>+ <Row icon="shuffle" iconTint="var(--teal)" title={t('Move, swap and remove buttons below the exercise')}>+ <Switch checked={wc.exerciseButtons} onChange={v => set('exerciseButtons', v)} />+ </Row>+ </Section>+ </>+}+function workoutControlsSheet() {+ useUI.getState().openSheet(() => <WorkoutControlsSheet />)+}++ // Download progress sheet — receives a ref callback that exposes a (received, total) setter.+ // Uses forwardRef so the caller can push byte counts in without re-rendering the whole Settings tree.+ const DownloadProgress = forwardRef(function DownloadProgress(_, ref) {+ const [pct, setPct] = useState(0)+ const [text, setText] = useState(t('Starting download…'))+ // Expose a setter the caller can invoke directly+ if (ref) ref(function update(received, total) {+ if (total > 0) {+ const p = Math.min(100, Math.round((received / total) * 100))+ setPct(p)+ setText(t('{0} %', p))+ } else {+ setText(t('{0} MB', (received / 1_000_000).toFixed(1)))+ }+ })+ return (+ <div style={{ textAlign: 'center', padding: '8px 0' }}>+ <h3>{t('Downloading update…')}</h3>+ <div style={{ margin: '16px 0', height: 6, borderRadius: 3, background: 'var(--fill-3)', overflow: 'hidden' }}>+ <div style={{ height: '100%', width: pct + '%', background: 'var(--acc)', borderRadius: 3, transition: 'width .2s' }} />+ </div>+ <div className="muted small">{text}</div>+ </div>+ )+ })+function effortHelpSheet() {useUI.getState().openSheet(close => <><h3>{t('Effort per set')}</h3>diff --cc frontend/src/views/Settings.update.test.jsxindex 000000000,000000000..b4ec847ebnew file mode 100644--- /dev/null+++ b/frontend/src/views/Settings.update.test.jsx@@@ -1,0 -1,0 +1,132 @@@++// @vitest-environment happy-dom++import React, { act } from 'react'++import { createRoot } from 'react-dom/client'++import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'++import Settings from './Settings.jsx'++++globalThis.IS_REACT_ACT_ENVIRONMENT = true++++// The updater downloads an .apk and hands it to the Android package installer, so its row++// may only ever show on the native Android build: never on the web, never on iOS. Each test++// flips the two gates (MOBILE flag, Capacitor platform) and watches whether Settings even++// asks gitlab.com for the latest release.++const mocks = vi.hoisted(() => {++ const state = { S: null, MOBILE: false, android: false }++ state.snapshot = () => ({++ S: state.S,++ user: null,++ update: mut => {++ const next = structuredClone(state.S)++ mut(next)++ state.S = next++ },++ replaceState: vi.fn(), setUser: vi.fn(), pullState: vi.fn(), pushState: vi.fn(),++ signOut: vi.fn(), signOutAll: vi.fn(), resetDemo: vi.fn(), disconnectServer: vi.fn(),++ })++ state.checkForUpdate = vi.fn(() => Promise.resolve({ hasUpdate: true, latestVersion: '9.9.9', apkUrl: 'https://x/opengym.apk', hashUrl: null }))++ state.confirmSheet = vi.fn()++ return state++})++vi.mock('../store/useStore.js', () => {++ const useStore = selector => selector ? selector(mocks.snapshot()) : mocks.snapshot()++ useStore.getState = mocks.snapshot++ return { useStore, DEF: { reminder: { time: '17:30' } }, hasData: () => false }++})++vi.mock('../store/useUI.js', () => {++ const snap = () => ({ toast: vi.fn(), openSheet: vi.fn() })++ const useUI = selector => selector ? selector(snap()) : snap()++ useUI.getState = snap++ return { useUI }++})++vi.mock('react-router-dom', () => ({ useNavigate: () => () => {} }))++vi.mock('../lib/api.js', () => ({++ api: vi.fn(), webauthnOK: () => false, passkeyLogin: vi.fn(), passkeyRegister: vi.fn(), IS_ANDROID: false,++}))++vi.mock('../lib/push.js', () => ({ pushSupported: () => false, enablePush: vi.fn(), disablePush: vi.fn(), sendTestPush: vi.fn() }))++vi.mock('../lib/wakelock.js', () => ({ wakeLockSupported: () => false }))++// MOBILE is read at render time through a getter so one module mock serves both builds.++vi.mock('../lib/mobile.js', () => ({++ get MOBILE() { return mocks.MOBILE },++ isAndroid: () => Promise.resolve(mocks.android),++ shareExport: vi.fn(), syncReminder: vi.fn(),++}))++vi.mock('../lib/update.js', () => ({++ checkForUpdate: (...a) => mocks.checkForUpdate(...a),++ downloadAndInstall: vi.fn(),++}))++vi.mock('./MobileOnboarding.jsx', () => ({ ConnectSheet: () => null }))++vi.mock('../sheets.jsx', () => ({++ starterPlanSheet: vi.fn(), confirmSheet: (...a) => mocks.confirmSheet(...a), importFromApp: vi.fn(),++ importFromHevy: vi.fn(), equipmentProfileSheet: vi.fn(), menuSheet: vi.fn(),++}))++++globalThis.__APP_VERSION__ ??= 'test'++++let host, root++beforeEach(() => {++ mocks.S = {++ unit: 'kg', restSec: 90, restPauseSec: 15, sound: false, effort: 'none',++ gifSize: 'full', workouts: [], routines: [], exWeights: {},++ }++ mocks.MOBILE = false++ mocks.android = false++ mocks.checkForUpdate.mockClear()++ mocks.confirmSheet.mockClear()++ host = document.createElement('div')++ document.body.appendChild(host)++ root = createRoot(host)++})++afterEach(() => {++ act(() => root.unmount())++ host.remove()++})++++// The effect resolves two promises (isAndroid, then checkForUpdate) before the row can render.++const mount = async () => {++ await act(async () => { root.render(<Settings />) })++ await act(async () => { await Promise.resolve(); await Promise.resolve() })++}++const updateRow = () => [...host.querySelectorAll('.lrow')].find(r => r.textContent.includes('openGym v9.9.9 available'))++++describe('Settings — in-app update check', () => {++ it('web build: never asks for releases and shows no update row', async () => {++ await mount()++ expect(mocks.checkForUpdate).not.toHaveBeenCalled()++ expect(updateRow()).toBeUndefined()++ })++++ it('mobile build on iOS: no check, no row', async () => {++ mocks.MOBILE = true++ await mount()++ expect(mocks.checkForUpdate).not.toHaveBeenCalled()++ expect(updateRow()).toBeUndefined()++ })++++ it('mobile build on Android: checks once and shows the row, tapping it asks before downloading', async () => {++ mocks.MOBILE = true++ mocks.android = true++ await mount()++ expect(mocks.checkForUpdate).toHaveBeenCalledTimes(1)++ expect(updateRow()).toBeTruthy()++ act(() => { updateRow().click() })++ expect(mocks.confirmSheet).toHaveBeenCalledTimes(1)++ expect(mocks.confirmSheet.mock.calls[0][0].title).toBe('Update to 9.9.9?')++ })++++ it('Android without a newer release: no row', async () => {++ mocks.MOBILE = true++ mocks.android = true++ mocks.checkForUpdate.mockResolvedValueOnce({ hasUpdate: false, latestVersion: 'test', apkUrl: null, hashUrl: null })++ await mount()++ expect(mocks.checkForUpdate).toHaveBeenCalledTimes(1)++ expect(updateRow()).toBeUndefined()++ })++++ it('Android when gitlab.com is unreachable: stays quiet', async () => {++ mocks.MOBILE = true++ mocks.android = true++ mocks.checkForUpdate.mockRejectedValueOnce(new Error('offline'))++ await mount()++ expect(updateRow()).toBeUndefined()++ })++})diff --cc frontend/src/views/Settings.workoutview.test.jsxindex a2c040505,000000000..2bd990b9fmode 100644,000000..100644--- a/frontend/src/views/Settings.workoutview.test.jsx+++ b/frontend/src/views/Settings.workoutview.test.jsx@@@ -1,89 -1,0 +1,89 @@@+// @vitest-environment happy-dom+import React, { act } from 'react'+import { createRoot } from 'react-dom/client'+import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'+import Settings from './Settings.jsx'++globalThis.IS_REACT_ACT_ENVIRONMENT = true++const mocks = vi.hoisted(() => {+ const state = { S: null }+ state.snapshot = () => ({+ S: state.S,+ user: null,+ update: mut => {+ const next = structuredClone(state.S)+ mut(next)+ state.S = next+ },+ replaceState: vi.fn(), setUser: vi.fn(), pullState: vi.fn(), pushState: vi.fn(),+ signOut: vi.fn(), signOutAll: vi.fn(), resetDemo: vi.fn(), disconnectServer: vi.fn(),+ })+ return state+})+vi.mock('../store/useStore.js', () => {+ const useStore = selector => selector ? selector(mocks.snapshot()) : mocks.snapshot()+ useStore.getState = mocks.snapshot+ return { useStore, DEF: { reminder: { time: '17:30' } }, hasData: () => false }+})+vi.mock('../store/useUI.js', () => {+ const snap = () => ({ toast: vi.fn(), openSheet: vi.fn() })+ const useUI = selector => selector ? selector(snap()) : snap()+ useUI.getState = snap+ return { useUI }+})+vi.mock('react-router-dom', () => ({ useNavigate: () => () => {} }))+vi.mock('../lib/api.js', () => ({+ api: vi.fn(), webauthnOK: () => false, passkeyLogin: vi.fn(), passkeyRegister: vi.fn(), IS_ANDROID: false,+}))+vi.mock('../lib/push.js', () => ({ pushSupported: () => false, enablePush: vi.fn(), disablePush: vi.fn(), sendTestPush: vi.fn() }))+vi.mock('../lib/wakelock.js', () => ({ wakeLockSupported: () => false }))- vi.mock('../lib/mobile.js', () => ({ MOBILE: false, shareExport: vi.fn(), syncReminder: vi.fn() }))++vi.mock('../lib/mobile.js', () => ({ MOBILE: false, isAndroid: () => Promise.resolve(false), shareExport: vi.fn(), syncReminder: vi.fn() }))+vi.mock('./MobileOnboarding.jsx', () => ({ ConnectSheet: () => null }))+vi.mock('../sheets.jsx', () => ({+ loadStarterPlan: vi.fn(), starterPlanSheet: vi.fn(), confirmSheet: vi.fn(), importFromApp: vi.fn(),+ importFromHevy: vi.fn(), equipmentProfileSheet: vi.fn(),+}))++// The Settings view reads the build-time version constant at render time.+globalThis.__APP_VERSION__ ??= 'test'++let host, root+beforeEach(() => {+ mocks.S = {+ unit: 'kg', restSec: 90, restPauseSec: 15, sound: false, effort: 'none',+ gifSize: 'full', workouts: [], routines: [], exWeights: {},+ }+ host = document.createElement('div')+ document.body.appendChild(host)+ root = createRoot(host)+})+afterEach(() => {+ act(() => root.unmount())+ host.remove()+})++const mount = () => act(() => root.render(<Settings />))+const segButton = label => [...host.querySelectorAll('.seg button')].find(b => b.textContent === label)++describe('Settings — workout view', () => {+ it('offers Cards / List and writes workoutView to the store', () => {+ mount()+ expect(segButton('Cards')).toBeTruthy()+ expect(segButton('List')).toBeTruthy()+ expect(segButton('Cards').getAttribute('aria-pressed')).toBe('true')+ act(() => { segButton('List').click() })+ expect(mocks.S.workoutView).toBe('list')+ mount()+ expect(segButton('List').getAttribute('aria-pressed')).toBe('true')+ act(() => { segButton('Cards').click() })+ expect(mocks.S.workoutView).toBe('cards')+ })++ it('shows a legacy/absent value as Cards', () => {+ delete mocks.S.workoutView+ mount()+ expect(segButton('Cards').getAttribute('aria-pressed')).toBe('true')+ expect(segButton('List').getAttribute('aria-pressed')).toBe('false')+ })+})diff --cc frontend/src/views/week-start.test.jsxindex e05c0c573,0792e1108..84014e730--- a/frontend/src/views/week-start.test.jsx+++ b/frontend/src/views/week-start.test.jsx@@@ -41,10 -41,10 +41,10 @@@ vi.mock('../lib/api.js', () => (}))vi.mock('../lib/push.js', () => ({ pushSupported: () => false, enablePush: vi.fn(), disablePush: vi.fn(), sendTestPush: vi.fn() }))vi.mock('../lib/wakelock.js', () => ({ wakeLockSupported: () => false }))- vi.mock('../lib/mobile.js', () => ({ MOBILE: false, shareExport: vi.fn(), syncReminder: vi.fn() }))+ vi.mock('../lib/mobile.js', () => ({ MOBILE: false, isAndroid: () => Promise.resolve(false), shareExport: vi.fn(), syncReminder: vi.fn() }))vi.mock('./MobileOnboarding.jsx', () => ({ ConnectSheet: () => null }))vi.mock('../sheets.jsx', () => ({- loadStarterPlan: vi.fn(), confirmSheet: vi.fn(), importFromApp: vi.fn(),+ starterPlanSheet: vi.fn(), confirmSheet: vi.fn(), importFromApp: vi.fn(),importFromHevy: vi.fn(), equipmentProfileSheet: vi.fn(),dayAssignSheet: vi.fn(), planToolsSheet: vi.fn(),}))