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 main (v1.2.11) into coach: Pairing, Notizen, Aufwaerm-Saetze, GitLab-CI
Duarte Santos4a9e1e345614
diff --cc README.mdindex 8df65f7e5,c1128eb93..5e82ebaf5--- a/README.md+++ b/README.md@@@ -164,9 -178,11 +179,13 @@@ All via `.env` (see `.env.example`)| `ADMIN_UIDS` | User ids that get the admin dashboard (comma-separated) | *(none)* || `INVITE_ONLY` | Require an invite code to create a profile | *(off)* || `ALLOW_GUEST` | Offer "Continue without account" — set `0` to require a profile | *(on)* |+ | `AUDIT_LOG` | Record sign-ins and admin actions — set `0` to record nothing | *(on)* |+ | `AUDIT_MAX` | Events kept in the activity log; `0` for no limit | `5000` |+ | `AUDIT_DAYS` | Days kept in the activity log; `0` to keep until `AUDIT_MAX` | `90` |+ | `AUDIT_IP` | Record the caller's address: `off`, `net` (network only) or `full` | `off` || `VAPID_SUBJECT` | Contact URL sent with push notifications | your `ORIGIN` |+| `API_TARGET` | Which API image to build: `default` (no AI runtime) or `coach` | `default` |+| `COACH_DISABLED` | Set to `1` to force the AI Coach off instance-wide, whatever the admin toggled | *(unset)* |Push notification keys are generated on first run and saved to `./data/vapid.json` — nothing to set.`DATA_DIR` is pinned to `/data` by `docker-compose.yml` and mapped to `./data` on the host; change thediff --cc api/Dockerfileindex 9bfa0241b,d2d65a949..92f187f7f--- a/api/Dockerfile+++ b/api/Dockerfile@@@ -30,26 -16,13 +30,26 @@@ LABEL maintainer="Duarte Santos https:/org.opencontainers.image.created=$BUILD_DATEWORKDIR /app++# The unprivileged user Coach jobs drop to. Its uid cannot read /data, which is the control that+# keeps a provider runtime away from users, passkeys and the session secret.+#+# Not optional, and not only for the real providers: canDropPrivileges() fails closed on Linux,+# so in an image without this user *every* job is refused with "no `coach` user exists in this+# image" — including the fixture provider that exists precisely so the loop can be walked before+# an account is connected. It costs one line and no bytes worth measuring.+RUN adduser -D -H -s /sbin/nologin coach+COPY package.json package-lock.json* ./-RUN npm install --omit=dev && npm cache clean --force-COPY server.js push-messages.js verify-error.js ./+# `npm ci` rather than `npm install`: the lockfile is the point of committing one, and the SDK's+# per-platform runtime is resolved from it (musl on this base) rather than from whatever the+# build host happened to be.+RUN npm ci --omit=dev --omit=optional && npm cache clean --force- COPY server.js ./++COPY server.js push-messages.js verify-error.js ./+COPY coach ./coachENV NODE_ENV=productionENV PORT=3000-EXPOSE 3000CMD ["node", "server.js"]diff --cc api/server.jsindex de431b611,cee77c11c..c700ca476--- a/api/server.js+++ b/api/server.js@@@ -9,10 -11,8 +11,12 @@@ importgenerateAuthenticationOptions, verifyAuthenticationResponse} from '@simplewebauthn/server';import webpush from 'web-push';+import * as coachConfig from './coach/config.js';+import * as coachJobs from './coach/jobs.js';+import { coachRoutes } from './coach/routes.js';+import { startCadence } from './coach/cadence.js';+ import { dayReminderPush, restTimerPush, testPush } from './push-messages.js';+ import { verifyError } from './verify-error.js';const PORT = +(process.env.PORT || 3000);const DATA = process.env.DATA_DIR || '/data';@@@ -570,34 -902,62 +930,85 @@@ const routes =if (inv.usedBy) return json(res, 400, { error: 'already used — cannot revoke' });db.invites = db.invites.filter(i => i.code !== inv.code);saveDb();+ audit(req, 'admin.invite.revoke', { user: admin, msg: inv.code });+ json(res, 200, { ok: true });+ },++ /* ---------- activity log ---------- */+ // Newest first, paged by id. Not by offset: the log grows at the front of this view, so an+ // offset cursor would repeat a row whenever an event lands between two pages; and not by+ // timestamp, because two events can share a millisecond. auditKeep() runs on read as well as+ // on the hourly compaction, so nothing past its retention is ever served.+ 'GET /api/admin/audit': async (req, res) => {+ if (!requireAdmin(req, res)) return;+ const q = new URL(req.url, 'http://x').searchParams;+ const limit = Math.max(1, Math.min(200, +q.get('limit') || 100));+ const before = +q.get('before') || Infinity;+ const cat = q.get('cat') || '';+ let rows = auditKeep(auditLines()).reverse();+ if (cat === 'fail') rows = rows.filter(r => !r.ok);+ else if (cat) rows = rows.filter(r => String(r.ev).startsWith(cat + '.'));+ const page = rows.filter(r => r.id < before).slice(0, limit);+ json(res, 200, {+ events: page,+ total: rows.length,+ nextBefore: page.length === limit ? page[page.length - 1].id : null,+ enabled: AUDIT_ON, ip_mode: AUDIT_IP,+ retention: { max: AUDIT_MAX, days: AUDIT_DAYS },+ now: Date.now()+ });+ },++ // Deleting the log is itself logged, and auditSeq is not reset — so a clear always leaves a+ // visible gap in the ids and can't be used to quietly erase a trace. There is no export route:+ // ./data/audit.log already is the export, in a format jq reads directly.+ 'POST /api/admin/audit/clear': async (req, res) => {+ const admin = requireAdmin(req, res); if (!admin) return;+ try { fs.unlinkSync(auditFile); } catch { /* nothing logged yet */ }+ auditCount = 0;+ audit(req, 'admin.audit.clear', { user: admin });json(res, 200, { ok: true });- }+ },++ /* ---------- AI Coach ---------- */+ // Routes live in coach/routes.js and are handed the helpers above rather than importing+ // them: they are closures over db and SECRET, and passing them in keeps that module free of+ // a cycle. Every one of them is inert while the feature is unconfigured.+ ...coachRoutes({ json, readBody, readSession, requireAdmin })};+/* ---------- Coach: boot recovery, notifications, scheduled reviews ---------- */+// A job that was running when the process died is not coming back; say so rather than leaving+// a spinner that never resolves.+coachJobs.recoverOnBoot();+// A ready proposal is the one Coach event worth a notification. Failures and "nothing to+// change" stay silent on purpose (FR-38/E4).+coachJobs.setProposalHook((uid, pending) => {+ const n = (pending?.changes || []).length;+ if (!n) return;+ sendPush(uid, {+ title: 'Your Coach has been reading',+ body: n === 1 ? '1 suggestion after this week' : `${n} suggestions after this week`,+ tag: 'coach-proposal', url: '#/coach'+ });+});+startCadence({ users: () => db.users, userNow });+http.createServer(async (req, res) => {+ // Same-origin (the deployed nginx-proxied web app) never triggers CORS, so this only matters+ // for the paired mobile app calling in from its own WebView origin. It carries no cookie+ // (auth is the Authorization header instead), so Allow-Credentials is deliberately never set —+ // reflecting the origin here can't expose the cookie session to anyone.+ const origin = req.headers.origin;+ if (origin) { res.setHeader('Access-Control-Allow-Origin', origin); res.setHeader('Vary', 'Origin'); }+ if (req.method === 'OPTIONS') {+ res.writeHead(204, {+ 'Access-Control-Allow-Methods': 'GET,POST,PUT,DELETE,OPTIONS',+ 'Access-Control-Allow-Headers': 'Content-Type, Authorization',+ 'Access-Control-Max-Age': '86400'+ });+ return res.end();+ }const url = new URL(req.url, 'http://x');const key = req.method + ' ' + url.pathname;const handler = routes[key];diff --cc docker-compose.ymlindex b755f87b0,dd3e1383f..50e8a673a--- a/docker-compose.yml+++ b/docker-compose.yml@@@ -24,15 -35,8 +35,15 @@@ services# Passkey auth + per-user data (Node, no framework).# image: prebuilt (docker compose pull). build: from source (docker compose up --build).api:- image: ghcr.io/duartesantos8/opengym-api:latest+ image: registry.gitlab.com/duartesantos8/opengym/api:latest- build: ./api+ # Default target: no AI runtime, no AI dependency — the image every instance has always had.+ # To opt into the AI Coach, build the other target instead:+ # API_TARGET=coach docker compose up --build api+ # `--build` matters: with an `image:` also set, compose would otherwise pull the prebuilt+ # default rather than build the coach one.+ build:+ context: ./api+ target: ${API_TARGET:-default}restart: unless-stoppedenv_file: .envenvironment:diff --cc docs/SELF_HOSTING.mdindex 068073cc2,6fc0abb8e..bbd7f3f5d--- a/docs/SELF_HOSTING.md+++ b/docs/SELF_HOSTING.md@@@ -149,16 -186,11 +186,18 @@@ Everything is in `./data`tar czf opengym-backup-$(date +%F).tar.gz data/```- That archive contains all profiles, passkeys and workout history. Restore by unpacking it back- into the project folder. (Individual users can also export their own data as JSON from Settings.)+ That archive contains all profiles, passkeys and workout history — and, if the activity log is+ on, `audit.log` with everyone's sign-in times. Worth knowing before you ship the archive to a+ backup service you don't run. Restore by unpacking it back into the project folder. (Individual+ users can also export their own data as JSON from Settings.)+If you enabled the AI Coach with the Codex provider, note what this archive deliberately does+**not** contain: `./coach-auth`, where that provider keeps its refreshable sign-in. It is a+sibling of `./data` rather than a folder inside it precisely so that a live credential does not+end up in every backup you are told to make — an archive like this gets copied to laptops and+cloud drives, and a refresh token keeps working wherever it lands. Nothing in `./coach-auth`+needs backing up: if you lose it, sign the provider in again.+## 7. NotificationsopenGym can push two kinds of alert to your phone/desktop, even when the app isn't open:diff --cc frontend/src/lib/history.jsindex 6fe01f71e,edac2772f..4edef1c51--- a/frontend/src/lib/history.js+++ b/frontend/src/lib/history.js@@@ -249,26 -284,30 +284,49 @@@ export function effectiveRoutine(S, isoconst id = effectiveRoutineId(S, iso)return id ? S.routines.find(r => r.id === id) || null : null}++/**+ * The next day that actually has something to train, looking forward from `iso` (exclusive).+ *+ * Takes a date string rather than reading the clock so callers and tests agree on "today".+ * A routine with no exercises does not count: starting one lands you in an empty session, so+ * it is not an answer to "what is next" (the same guard TabBar applies before starting).+ * Returns null when the whole week is rest.+ */+export function nextTrainingDay(S, iso) {+ for (let i = 1; i <= 7; i++) {+ const d = new Date(iso + 'T12:00:00')+ d.setDate(d.getDate() + i)+ const nextIso = isoOf(d)+ const routine = effectiveRoutine(S, nextIso)+ if (routine && (routine.ex || []).length) return { iso: nextIso, weekday: d.getDay(), routine }+ }+ return null+}+ /**+ * Build the rows a planned exercise starts a session with: its work sets, preceded by however+ * many warm-up sets the routine asks for (`cfg.warmupSets`, 0 by default so an existing plan+ * behaves exactly as before).+ *+ * The warm-ups are stacked with insertWarmupRow, one call each, so the ramp is the same one+ * the in-session "Add warm-up set" button produces: each row halves the gap left to the work+ * weight, giving 50% / 75% / 87.5% for three. `options.step` is the exercise's loading step,+ * passed in by the caller (see insertWarmupRow for why this module cannot read it itself).+ */export function buildSets(S, cfg, options = {}) {+ const rows = buildWorkSets(S, cfg, options)+ const warm = Math.max(0, Math.min(MAX_PLANNED_WARMUPS, Math.round(cfg.warmupSets) || 0))+ if (!warm) return rows+ const mode = modeOf(cfg)+ let out = rows+ for (let i = 0; i < warm; i++) out = insertWarmupRow(out, mode, cfg, options.step)+ return out+ }++ /** Beyond this a "warm-up" is its own workout; the config stepper stops here too. */+ export const MAX_PLANNED_WARMUPS = 5++ function buildWorkSets(S, cfg, options = {}) {const last = lastEntryFor(S, cfg.id)const n = Math.max(1, cfg.sets || 1)const mode = modeOf(cfg)diff --cc frontend/src/lib/history.test.jsindex c04a1f3be,12eec2b90..5340cd3f6--- a/frontend/src/lib/history.test.js+++ b/frontend/src/lib/history.test.js@@@ -1,5 -1,5 +1,5 @@@import { describe, it, expect } from 'vitest'- import { nextTrainingDay, modeOf, isTimed, fmtSec, setLabel, defaultConfig, buildSets, freestyleConfig, exLine, workoutVolume, bestWeightFor, bestWeightForEntry, effortOf, stepEffort, capEffort, isBw, isPerSide, sideReps, repStep, cascadeWeight, insertWarmupRow, removeRowAt, workSetsDone, pairAdjacent, unpairSuperset, supersetUnits } from './history.js'-import { modeOf, isTimed, fmtSec, setLabel, defaultConfig, buildSets, freestyleConfig, exLine, workoutVolume, bestWeightFor, bestWeightForEntry, effortOf, stepEffort, capEffort, isBw, isPerSide, sideReps, repStep, cascadeWeight, insertWarmupRow, removeRowAt, workSetsDone, pairAdjacent, unpairSuperset, supersetUnits, applyIntensifierPlan, pinnedNoteFor, exNoteFor } from './history.js'++import { nextTrainingDay, modeOf, isTimed, fmtSec, setLabel, defaultConfig, buildSets, freestyleConfig, exLine, workoutVolume, bestWeightFor, bestWeightForEntry, effortOf, stepEffort, capEffort, isBw, isPerSide, sideReps, repStep, cascadeWeight, insertWarmupRow, removeRowAt, workSetsDone, pairAdjacent, unpairSuperset, supersetUnits, applyIntensifierPlan, pinnedNoteFor, exNoteFor } from './history.js'import { EXDB } from './exercises.js'// Real ids out of the shipped catalogue, so the body-part fallback is exercised for real.@@@ -685,52 -814,34 +814,84 @@@ describe('warm-up rows identified by ph})})+describe('nextTrainingDay', () => {+ // 2026-08-18 is a Tuesday; the week map is keyed by getDay(), so 0 is Sunday.+ const TUE = '2026-08-18'+ const base = (over = {}) => ({+ dayPlan: {},+ routines: [{ id: 'r1', name: 'A', ex: [{ id: '0001' }] }, { id: 'r2', name: 'B', ex: [{ id: '0002' }] }],+ week: {},+ ...over+ })++ it('finds the next scheduled day and names its routine', () => {+ const S = base({ week: { 4: 'r2' } }) // Thursday+ expect(nextTrainingDay(S, TUE)).toMatchObject({ iso: '2026-08-20', weekday: 4 })+ expect(nextTrainingDay(S, TUE).routine.name).toBe('B')+ })++ it('looks forward only — today itself is never the answer', () => {+ // Only Tuesday is scheduled and today is Tuesday, so the next one is a week out. (The UI+ // cannot reach this: a day with a session takes the other branch and never asks.)+ const S = base({ week: { 2: 'r1' } })+ expect(nextTrainingDay(S, TUE)).toMatchObject({ iso: '2026-08-25', weekday: 2 })+ })++ it('wraps around the end of the week', () => {+ const S = base({ week: { 1: 'r1' } }) // Monday, six days on+ expect(nextTrainingDay(S, TUE)).toMatchObject({ iso: '2026-08-24', weekday: 1 })+ })++ it('is null when every day is rest', () => {+ expect(nextTrainingDay(base(), TUE)).toBeNull()+ })++ it('skips a day whose routine no longer exists', () => {+ const S = base({ week: { 3: 'gone', 5: 'r1' } })+ expect(nextTrainingDay(S, TUE)).toMatchObject({ iso: '2026-08-21', weekday: 5 })+ })++ it('skips a routine with no exercises — starting it would open an empty session', () => {+ const S = base({ routines: [{ id: 'r1', name: 'A', ex: [] }, { id: 'r2', name: 'B', ex: [{ id: '1' }] }], week: { 3: 'r1', 5: 'r2' } })+ expect(nextTrainingDay(S, TUE)).toMatchObject({ weekday: 5 })+ })++ it('respects a per-date override in both directions', () => {+ const moved = base({ week: {}, dayPlan: { '2026-08-19': 'r1' } })+ expect(nextTrainingDay(moved, TUE)).toMatchObject({ iso: '2026-08-19' })+ const off = base({ week: { 3: 'r1', 5: 'r2' }, dayPlan: { '2026-08-19': 'rest' } })+ expect(nextTrainingDay(off, TUE)).toMatchObject({ weekday: 5 })+ })+})+++ describe('pinnedNoteFor', () => {+ const S = {+ workouts: [+ { d: '2026-08-01', entries: [{ id: '0025', note: 'felt heavy', notePin: true }] },+ { d: '2026-08-08', entries: [{ id: '0025', note: 'just a diary line' }] },+ { d: '2026-08-15', entries: [{ id: '0025', note: 'go narrower', notePin: true }] },+ { d: '2026-08-22', entries: [{ id: '0293', note: 'other exercise', notePin: true }] },+ ],+ }++ it('returns only the newest pinned note for that exercise', () => {+ expect(pinnedNoteFor(S, '0025')).toEqual({ note: 'go narrower', d: '2026-08-15' })+ })++ it('ignores notes that were not pinned', () => {+ expect(pinnedNoteFor({ workouts: [{ d: '2026-08-08', entries: [{ id: '0025', note: 'diary' }] }] }, '0025')).toBeNull()+ })++ it('is null for an exercise with no notes, and safe on empty state', () => {+ expect(pinnedNoteFor(S, '9999')).toBeNull()+ expect(pinnedNoteFor({}, '0025')).toBeNull()+ })+ })++ describe('exNoteFor', () => {+ it('reads the standing note and trims it away when blank', () => {+ expect(exNoteFor({ exNotes: { '0025': ' seat 4, pin 7 ' } }, '0025')).toBe('seat 4, pin 7')+ expect(exNoteFor({ exNotes: { '0025': ' ' } }, '0025')).toBeNull()+ expect(exNoteFor({}, '0025')).toBeNull()+ })+ })diff --cc frontend/src/lib/pt-br-locale.test.jsindex 000000000,91a4a63a8..4315a72ccmode 000000,100644..100644--- a/frontend/src/lib/pt-br-locale.test.js+++ b/frontend/src/lib/pt-br-locale.test.js@@@ -1,0 -1,54 +1,54 @@@+ import { describe, expect, test } from 'vitest'+ import { createHash } from 'node:crypto'+ import pt from '../locales/pt.js'+ import ptBR, { PT_BR_OVERRIDES } from '../locales/pt-BR.js'+ import { DATE_LOCALES, LANGS } from './i18n-core.js'++ const placeholders = value => [...String(value).matchAll(/\{\d+\}/g)].map(match => match[0]).sort()+ const byCodeUnit = ([a], [b]) => (a < b ? -1 : a > b ? 1 : 0)++ describe('Brazilian Portuguese locale', () => {+ test('is a separately selectable locale with Brazilian date formatting', () => {+ expect(LANGS.pt).toBe('Português (Portugal)')+ expect(LANGS['pt-BR']).toBe('Português (Brasil)')+ expect(DATE_LOCALES['pt-BR']).toBe('pt-BR')+ })++ test('matches the source key set and preserves interpolation placeholders', () => {+ expect(Object.keys(ptBR).sort()).toEqual(Object.keys(pt).sort())+ for (const [source, translated] of Object.entries(ptBR)) {+ expect(placeholders(translated), source).toEqual(placeholders(source))+ }+ })++ test('makes every inherited pt-PT value an explicit reviewed snapshot', () => {+ const inherited = Object.entries(pt)+ .filter(([key]) => !(key in PT_BR_OVERRIDES))+ .sort(byCodeUnit)+ const fingerprint = createHash('sha256').update(JSON.stringify(inherited)).digest('hex')+- expect(Object.keys(PT_BR_OVERRIDES)).toHaveLength(291)- expect(inherited).toHaveLength(449)++ expect(Object.keys(PT_BR_OVERRIDES)).toHaveLength(362)++ expect(inherited).toHaveLength(517)+ // 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('09c4fa5e04c8d3ea21916a6c07f074a35013b33d5d945ecfc13cd54cc8b7d41d')++ expect(fingerprint, 'pt-PT inheritance changed; review the inherited pt-BR wording').toBe('56fd46aefb32a69e0bd6ed0c9f263d521113d3db6f44cfdcefb66d88d26312e5')+ })++ test('does not leak European Portuguese UI terms', () => {+ const text = Object.values(ptBR).join('\n')+ const europeanPortuguese = /(?:^|[^\p{L}])(?:ficheiro\p{L}*|telemóvel\p{L}*|ecrã\p{L}*|regist(?:o|am|ado|ada|ados|adas)|eliminad\p{L}*|definições|cronómetro|detetad\p{L}*|gémeos|abdómen|anca|coifa dos rotadores|escadora|completaste|acabaste|aguentas|definires|completares|aguenta|aguentaste|ficaste|viajares)(?=$|[^\p{L}])/iu+ expect(text).not.toMatch(europeanPortuguese)+ expect(text).not.toMatch(/[«»]/u)+ expect(ptBR.Save).toBe('Salvar')+ expect(ptBR.Settings).toBe('Configurações')+ expect(ptBR['Delete workout']).toBe('Excluir treino')+ expect(ptBR.Superset).toBe('Superset')+ expect(ptBR['Guest mode — data lives only in this browser.']).toContain('visitante')+ expect(ptBR['Sign in with passkey']).toContain('chave de acesso')+ expect(ptBR.band).toBe('elástico')+ expect(ptBR['resistance band']).toBe('faixa elástica')+ expect(ptBR.soleus).toBe('sóleo')+ expect(ptBR.Unpair).toBe('Desvincular')+ expect(ptBR['Starter plan loaded — Mon Push · Wed Pull · Fri Legs']).toContain('Seg Push · Qua Pull')+ })+ })diff --cc frontend/src/locales/pt-BR.jsindex 000000000,11022ba6b..dba31daf1mode 000000,100644..100644--- a/frontend/src/locales/pt-BR.js+++ b/frontend/src/locales/pt-BR.js@@@ -1,0 -1,308 +1,383 @@@+ // Brazilian Portuguese overrides. Shared, region-neutral strings inherit from pt-PT.+ // Tests fingerprint every deliberately inherited entry so upstream changes require review.+ // Some byte-identical overrides intentionally pin wording that must not drift with pt-PT.+ import pt from './pt.js'++ export const PT_BR_OVERRIDES = {+ 'Press back again to exit': 'Pressione voltar novamente para sair',+ 'Delete': 'Excluir',+ 'Save': 'Salvar',+ 'Log': 'Registrar',+ 'Settings': 'Configurações',+ 'Log body weight': 'Registrar peso corporal',+ 'Slide or tap to set your weight — tracked before every workout so your curve stays honest.': 'Deslize ou toque para informar seu peso — ele é registrado antes de cada treino para manter a curva precisa.',+ 'Save & start workout': 'Salvar e iniciar treino',+ 'Start without weighing in': 'Iniciar sem se pesar',+ 'Choose a different workout': 'Escolher outro treino',+ 'Recent weigh-ins': 'Pesagens recentes',+ 'Enter a valid weight': 'Informe um peso válido',+ 'Weight saved': 'Peso salvo',+ 'Your goal is drawn as a line through the weight charts, and gains/losses are colored by whether they move toward it.': 'Sua meta aparece como uma linha nos gráficos de peso, e os ganhos ou perdas mudam de cor conforme você se aproxima dela.',+ 'Save goal': 'Salvar meta',+ "No entries yet — log your weight to start the curve. It's also asked before every workout.": 'Ainda não há registros — informe seu peso para começar a curva. Ele também será solicitado antes de cada treino.',+ 'Add to my plan': 'Adicionar ao meu plano',+ 'Add “{0}”': 'Adicionar “{0}”',+ '“{0}” added to {1}': '“{0}” adicionado a {1}',+ 'Pick a routine — sets, reps & weight come next.': 'Escolha uma rotina — séries, repetições e peso vêm em seguida.',+ 'Create one and start with this exercise': 'Crie uma e comece com este exercício',+ 'Search {0} exercises…': 'Buscar entre {0} exercícios…',+ 'Nothing chosen yet — add exercises and they’ll show up here.': 'Nenhum exercício escolhido — adicione exercícios e eles aparecerão aqui.',+ 'The sets you logged for this exercise in this session will be lost.': 'As séries registradas para este exercício nesta sessão serão perdidas.',+ 'This removes the exercise from your current session.': 'Isso remove o exercício da sua sessão atual.',+ 'Which exercise in this superset do you want to remove?': 'Qual exercício deste superset você quer remover?',+ 'Pick an icon': 'Escolha um ícone',+ 'Sick, missed a day or want a different session? Pick what to train instead.': 'Ficou doente, perdeu um dia ou quer outro treino? Escolha o que treinar no lugar.',+ 'Tap a trained day for details · tap any other day to plan a session': 'Toque em um dia treinado para ver detalhes · toque em outro dia para planejar uma sessão',+ 'Delete workout?': 'Excluir treino?',+ 'This removes it from your history for good.': 'Isso remove o treino definitivamente do seu histórico.',+ 'Delete workout': 'Excluir treino',+ 'Confirm the weight you worked with — your highest becomes the default next time.': 'Confirme o peso usado — o maior valor será o padrão na próxima vez.',+ 'Then finish the superset partner.': 'Depois, termine o outro exercício do superset.',+ 'Save & next exercise': 'Salvar e ir para o próximo exercício',+ 'Save weight': 'Salvar peso',+ 'Tracked — next time starts at {0}': 'Registrado — na próxima vez você começa em {0}',+ 'Every exercise done — great work. Finish up, or keep going and add another exercise.': 'Todos os exercícios concluídos — ótimo trabalho! Finalize ou continue e adicione outro exercício.',+ 'Keep going — tap “+ Add exercise” below': 'Continue — toque em “+ Adicionar exercício” abaixo',+ 'Nothing logged yet': 'Ainda não há nada registrado',+ 'You haven’t checked off any sets. Finish the workout anyway?': 'Você não marcou nenhuma série. Deseja finalizar o treino mesmo assim?',+ 'Freestyle workout (pick as you go)': 'Treino livre (escolha durante o treino)',+ 'Build a plan first': 'Crie um plano primeiro',+ 'Cardio logged': 'Cardio registrado',+ 'The sets you logged in this session will be lost.': 'As séries registradas nesta sessão serão perdidas.',+ 'Superset · do these back-to-back, rest when done': 'Superset · faça estes exercícios em sequência e descanse ao terminar',+ 'Freestyle workout — add your first exercise.': 'Treino livre — adicione seu primeiro exercício.',+ 'Set up your weekly routine to get going — or load a ready-made Push / Pull / Legs plan.': 'Configure sua rotina semanal para começar ou carregue um plano pronto de Push / Pull / Legs.',+ 'Load starter plan (PPL)': 'Carregar plano inicial (PPL)',+ 'Build my own plan': 'Criar meu próprio plano',+ 'Finish your first workout to see progress curves here.': 'Finalize seu primeiro treino para ver os gráficos de progresso aqui.',+ 'Your weekly routine': 'Sua rotina semanal',+ 'Create one or load the starter plan.': 'Crie uma ou carregue o plano inicial.',+ 'Load starter plan (Push / Pull / Legs)': 'Carregar plano inicial (Push / Pull / Legs)',+ 'No exercises yet — add your first one.': 'Ainda não há exercícios — adicione o primeiro.',+ 'Tap the link button on an exercise to superset it with the one above — you’ll do them back-to-back.': 'Toque no botão de vínculo de um exercício para combiná-lo em um superset com o exercício acima — eles serão feitos em sequência.',+ 'Delete routine?': 'Excluir rotina?',+ 'Delete routine': 'Excluir rotina',+ 'Search…': 'Buscar…',+ 'Starter plan loaded — Mon Push · Wed Pull · Fri Legs': 'Plano inicial carregado — Seg Push · Qua Pull · Sex Pernas',+ '{0} planned for {1}': '{0} planejado para {1}',+ 'Planned': 'Planejado',+ 'Enter a name': 'Informe um nome',+ 'Registration failed': 'Falha no cadastro',+ 'Create your profile': 'Crie seu perfil',+ 'Pick a name, then confirm with {0}. The passkey is saved in your device — no password needed.': 'Escolha um nome e confirme com {0}. A chave de acesso fica salva no seu dispositivo — não é preciso usar senha.',+ 'Pick a name, then confirm with your device.': 'Escolha um nome e confirme com seu dispositivo.',+ 'Your name': 'Seu nome',+ 'Create passkey': 'Criar chave de acesso',+ 'Your workouts. Your weights. Your profile.': 'Seus treinos. Seus pesos. Seu perfil.',+ 'Create new profile': 'Criar novo perfil',+ "This browser doesn't support passkeys — you can still use openGym locally on this device.": 'Este navegador não oferece suporte a chaves de acesso — você ainda pode usar o openGym localmente neste dispositivo.',+ 'Signed in with passkey — data syncs to this profile.': 'Sessão iniciada com chave de acesso — os dados são sincronizados com este perfil.',+ 'Sign out?': 'Sair?',+ 'Your data is synced to your profile first, then cleared from this device.': 'Seus dados serão sincronizados com o perfil e depois apagados deste dispositivo.',+ 'Sign out': 'Sair',+ 'Sign out everywhere?': 'Sair de todos os dispositivos?',+ 'Signs this profile out on every device, including this one. Your passkeys keep working — sign in with them again anytime.': 'Encerra a sessão deste perfil em todos os dispositivos, inclusive neste. Suas chaves de acesso continuam funcionando — entre novamente quando quiser.',+ 'Sign out everywhere': 'Sair de todos os dispositivos',+ 'Ends this profile’s sessions on all your devices.': 'Encerra as sessões deste perfil em todos os seus dispositivos.',+ 'Signed out on all devices': 'Sessão encerrada em todos os dispositivos',+ 'Could not sign out everywhere — you are still signed in.': 'Não foi possível sair de todos os dispositivos — sua sessão continua ativa.',+ 'Guest mode — data lives only in this browser. Create a passkey profile to keep it safe and separate per person.': 'Modo visitante — os dados ficam somente neste navegador. Crie um perfil com chave de acesso para mantê-los seguros e separados por pessoa.',+ 'Create passkey profile': 'Criar perfil com chave de acesso',+ 'synced with your profile': 'sincronizado com seu perfil',+ 'The screen stays on while a workout is running, so you don’t have to unlock your phone between sets.': 'A tela permanece ligada durante o treino, para você não precisar desbloquear o celular entre as séries.',+ 'Note: switching units only changes the label — logged numbers are not converted.': 'Observação: trocar a unidade altera somente o rótulo — os valores registrados não são convertidos.',+ 'Export backup (JSON)': 'Exportar backup (JSON)',+ 'Import backup': 'Importar backup',+ 'Reset everything?': 'Redefinir tudo?',+ 'Reset everything': 'Redefinir tudo',+ 'Deletes your plan, workouts and body weight on this device. This cannot be undone.': 'Exclui seu plano, seus treinos e seu peso corporal deste dispositivo. Esta ação não pode ser desfeita.',+ 'Delete everything': 'Excluir tudo',+ 'Backup exported': 'Backup exportado',+ 'Import backup?': 'Importar backup?',+ 'This replaces all current data with the backup file.': 'Isso substitui todos os dados atuais pelo arquivo de backup.',+ 'Backup imported': 'Backup importado',+ 'In Chrome: ⋮ menu → Add to Home screen': 'No Chrome: menu ⋮ → Adicionar à tela inicial',+ 'In Safari: Share → Add to Home Screen': 'No Safari: Compartilhar → Adicionar à Tela de Início',+ 'Your data syncs with your profile — sign in anywhere to see it.': 'Seus dados são sincronizados com o perfil — entre em qualquer dispositivo para acessá-los.',+ 'Guest data stays on this device — export a backup now and then!': 'Os dados de visitante ficam neste dispositivo — exporte um backup de vez em quando!',+ 'Only sent on days you have a routine planned and haven\'t logged a workout yet.': 'Enviado somente nos dias em que há uma rotina planejada e você ainda não registrou um treino.',+ 'Could not change notification settings': 'Não foi possível alterar as configurações de notificação',+ 'tap to pause': 'toque para pausar',+ 'tap to play': 'toque para reproduzir',+ 'Keeps your data safe and separate per person.': 'Mantém seus dados seguros e separados por pessoa.',+ 'Create your own exercise': 'Crie seu próprio exercício',+ 'Give it a name': 'Dê um nome',+ 'Description (optional) — setup, cues, anything you want to remember': 'Descrição (opcional) — preparação, dicas ou qualquer observação que você queira guardar',+ 'Name it and pick a body part — it behaves like any other exercise, just without an animation.': 'Dê um nome e escolha uma parte do corpo — ele funciona como qualquer outro exercício, mas sem animação.',+ 'Pick a body part': 'Escolha uma parte do corpo',+ 'Saved': 'Salvo',+ 'Delete “{0}”?': 'Excluir “{0}”?',+ 'It will be removed from your routines. Already-logged workouts keep their sets.': 'Ele será removido das suas rotinas. Os treinos já registrados manterão suas séries.',+ 'Finish your current workout first': 'Finalize o treino atual primeiro',+ 'Delete exercise': 'Excluir exercício',+ 'Edit or delete this exercise': 'Editar ou excluir este exercício',+ 'This app is invite-only — enter the code you were given.': 'Este aplicativo é somente para convidados — informe o código que você recebeu.',+ 'Passkeys use {0} — no passwords.': 'As chaves de acesso usam {0} — sem senhas.',+ 'Strength shows retained muscle strength. Train again to reset it.': 'A força mostra quanto da força muscular foi mantida. Treine novamente para redefinir o valor.',+ 'Added as your own': 'Adicionados como seus',+ 'The file is in {0} and your profile is in {1} — weights will be converted.': 'O arquivo está em {0} e seu perfil em {1} — os pesos serão convertidos.',+ 'The file does not say which unit it uses — numbers are imported as they are.': 'O arquivo não informa qual unidade utiliza — os valores serão importados como estão.',+ 'The file mixes kg and lb — each set is converted to {0}.': 'O arquivo mistura kg e lb — cada série será convertida para {0}.',+ '{0} days already have data here and will be left alone.': '{0} dias já têm dados aqui e não serão alterados.',+ 'Not in the library — added as your own exercises': 'Não estão na biblioteca — foram adicionados como exercícios próprios',+ 'Could not read that file': 'Não foi possível ler esse arquivo',+ 'That file\'s columns aren\'t recognised — see the docs for supported apps.': 'Colunas não reconhecidas — consulte a documentação dos aplicativos compatíveis.',+ 'That file is empty': 'Esse arquivo está vazio',+ 'Nothing to import from that file': 'Não há nada para importar desse arquivo',+ 'Your data': 'Seus dados',+ 'All data stays on this phone': 'Todos os dados ficam neste celular',+ 'No account, no cloud — back it up anytime with Export below.': 'Sem conta e sem nuvem — faça um backup quando quiser usando a opção Exportar abaixo.',+ '{0} is on the plan today — let’s go!': 'Hoje tem {0} no plano — vamos lá!',+ 'Share your plan': 'Compartilhar seu plano',+ 'Shared routine': 'Rotina compartilhada',+ 'Got a plan from a friend?': 'Recebeu um plano de um amigo?',+ 'Send your routines to a friend, or put your week on paper.': 'Envie suas rotinas para um amigo ou coloque sua semana no papel.',+ 'Export plan file': 'Exportar arquivo do plano',+ 'A small file a friend imports into their own openGym — routines only, none of your workouts or weigh-ins.': 'Um pequeno arquivo que um amigo pode importar no próprio openGym — somente rotinas, sem seus treinos ou pesagens.',+ 'Print / Save as PDF': 'Imprimir / Salvar como PDF',+ 'Add an exercise to a routine first — an empty plan has nothing to share.': 'Adicione primeiro um exercício a uma rotina — um plano vazio não tem nada para compartilhar.',+ 'Import a plan file': 'Importar arquivo do plano',+ 'Plan file saved — send it to a friend': 'Arquivo do plano salvo — envie-o para um amigo',+ 'These are added as new routines — nothing you already have is changed.': 'Elas serão adicionadas como novas rotinas — nada do que você já tem será alterado.',+ '{0} exercise in the file isn’t in your library and was left out.': '{0} exercício do arquivo não está na sua biblioteca e foi ignorado.',+ '{0} exercises in the file aren’t in your library and were left out.': '{0} exercícios do arquivo não estão na sua biblioteca e foram ignorados.',+ 'Replaces your current Mon–Sun assignments.': 'Substitui os dias definidos de segunda a domingo.',+ 'Added {0} routines to your plan': '{0} rotinas adicionadas ao seu plano',+ 'this isn’t an openGym plan file': 'este não é um arquivo de plano do openGym',+ 'This screen could not be drawn. Your data is safe on this device.': 'Não foi possível exibir esta tela. Seus dados estão seguros neste dispositivo.',+ 'From your log:': 'Do seu registro:',+ 'Enter a weight and 1–{0} reps — beyond that an estimate is guesswork.': 'Informe um peso e de 1 a {0} repetições — acima disso, a estimativa é apenas um palpite.',+ 'Hold logged': 'Isometria registrada',+ 'Work up through a rep range at the same weight. Reach the top of the range in every set and the weight goes up, reps back to the bottom.': 'Avance por uma faixa de repetições com o mesmo peso. Ao atingir o topo da faixa em todas as séries, o peso aumenta e as repetições voltam ao mínimo.',+ 'Nothing logged yet — this session sets the baseline.': 'Ainda não há nada registrado — esta sessão define o ponto de partida.',+ 'Reminds you at this time on days that have a routine planned.': 'Lembra você neste horário nos dias em que há uma rotina planejada.',+ 'Each profile keeps its own plan, workouts & body weight.': 'Cada perfil mantém seu próprio plano, seus treinos e seu peso corporal.',+ 'Short {0} sessions in a row — back off to {1}s and build up again.': '{0} sessões seguidas abaixo da meta — reduza para {1} s e volte a progredir.',+ 'Top of the rep range in every set — {0} {1} more, back to {2} reps.': 'Topo da faixa de repetições em todas as séries — aumente {0} {1} e volte para {2} repetições.',+ 'Missed reps {0} sessions running — reset to {1} {2} and work back up.': 'Repetições não concluídas em {0} sessões seguidas — volte para {1} {2} e progrida novamente.',+ 'Missed reps — reset to {0} {1} and work back up.': 'Repetições não concluídas — volte para {0} {1} e progrida novamente.',+ 'Missed reps last time — same weight again ({0} of {1} to go).': 'Você não concluiu as repetições na última vez — mantenha o mesmo peso (faltam {0} de {1}).',+ '{0} sets bring an {1} with them — switch on Effort per set in Settings to see it.': '{0} séries incluem um {1} — ative “Esforço por série” nas Configurações para exibi-lo.',+ 'RIR counts the reps you left; RPE reads the same effort off a 10-point scale — so RPE ≈ 10 − RIR. Pick the one you already think in.': 'O RIR conta as repetições que você ainda conseguiria fazer; o RPE representa o mesmo esforço em uma escala de 10 — portanto, RPE ≈ 10 − RIR. Escolha a escala que você já usa.',+ 'The highlighted row is where most working sets land. Sets you have already logged keep their own scale, and nothing else reads the value — progression and estimated 1RM are unaffected.': 'A linha destacada representa a maioria das séries de trabalho. As séries já registradas mantêm sua escala, e nenhum outro recurso usa esse valor — a progressão e o 1RM estimado não são afetados.',+ 'Effort per set is switched off — turn it on in Settings to keep rating.': 'O esforço por série está desativado — ative-o nas Configurações para continuar avaliando.',+ 'No weight to enter — just log the reps.': 'Não é preciso informar peso — registre apenas as repetições.',+ 'Reps climb by one whenever every set was clean. Set a ceiling to add sets instead of reps forever.': 'As repetições aumentam em uma quando todas as séries são concluídas. Defina um limite para adicionar séries em vez de aumentar repetições indefinidamente.',+ '{0} reps in every set — add a set and go back to {1}.': '{0} repetições em todas as séries — adicione uma série e volte para {1}.',+ 'You still log the total: {0} is {1} per side.': 'Você ainda registra o total: {0} corresponde a {1} de cada lado.',+ 'Two straight sets plus a final set taken to failure. Beat the target on that set and the weight goes up — double if you double the reps. One failure resets 10 %.': 'Duas séries normais mais uma série final até a falha. Se você superar a meta nessa série, o peso aumenta — em dobro se você dobrar as repetições. Uma falha reduz 10%.',+ 'Reps climb to {0}, then a set is added and the reps start over. At {1} sets it asks you to add weight instead.': 'As repetições aumentam até {0}; depois, uma série é adicionada e as repetições recomeçam. Ao chegar a {1} séries, o app sugere adicionar peso.',++ // Regional wording inherited from pt-PT would otherwise leak into pt-BR.+ 'Next': 'Próximo',+ '{0} to gain': '{0} para ganhar',+ '{0} to lose': '{0} para perder',+ '{0} set still unchecked. Finish the workout now?': 'Falta {0} série sem marcar. Finalizar o treino agora?',+ '{0} sets still unchecked. Finish the workout now?': 'Faltam {0} séries sem marcar. Finalizar o treino agora?',+ 'band': 'elástico',+ 'resistance band': 'faixa elástica',+ 'core': 'abdômen',+ 'lower back': 'lombar',+ 'shins': 'canelas',+ 'soleus': 'sóleo',+ 'Lower back': 'Lombar',+ 'Shins': 'Canelas',+ 'Import from another app': 'Importar de outro aplicativo',+ 'Stalled {0} sessions — deload to {1} {2}.': '{0} sessões sem progresso — reduza a carga para {1} {2}.',+ 'Bodyweight — every rep last time, so go for {0} this time.': 'Peso corporal — você concluiu todas as repetições na última vez; tente {0} desta vez.',+ 'Bodyweight — same target again until every set is clean.': 'Peso corporal — mantenha a mesma meta até concluir todas as séries.',+ 'Top of the range': 'Topo da faixa',+ 'Unpair': 'Desvincular',+ 'Skip': 'Pular',+ 'Rest / skip this day': 'Descansar / pular este dia',+ 'Workout deleted': 'Treino excluído',+ 'Last time you hit all reps — try {0}': 'Na última vez você concluiu todas as repetições — tente {0}',+ '{0} — in progress': '{0} — em andamento',+ '“{0}” and its exercises will be removed.': '“{0}” e seus exercícios serão removidos.',+ 'Sign-in failed': 'Falha ao entrar',+ "This browser doesn't support passkeys, and this instance requires an account. Try a browser or device with passkey support.": 'Este navegador não oferece suporte a chaves de acesso e este servidor exige uma conta. Tente usar outro navegador ou dispositivo compatível.',+ 'Keep screen awake': 'Manter a tela ligada',+ 'All data reset': 'Todos os dados redefinidos',+ 'to install openGym as a full-screen app.': 'para instalar o openGym como aplicativo em tela cheia.',+ 'Timezone: {0} (auto-detected, updates if you travel).': 'Fuso horário: {0} (detectado automaticamente e atualizado se você viajar).',+ 'lower legs': 'panturrilhas',+ 'waist': 'abdômen',+ 'stepmill machine': 'simulador de escada',+ 'upper body ergometer': 'ergômetro de braços',+ 'calves': 'panturrilhas',+ 'levator scapulae': 'levantador da escápula',+ 'hip flexors': 'flexores do quadril',+ 'rotator cuff': 'manguito rotador',+ '“{0}” already exists': '“{0}” já existe',+ '“{0}” created': '“{0}” criado',+ 'Cardio exercises log time + speed instead of weight × reps.': 'Exercícios de cardio registram tempo e velocidade em vez de peso × repetições.',+ 'Exercise deleted': 'Exercício excluído',+ 'What you just trained': 'O que você acabou de treinar',+ 'Import “{0}”': 'Importar “{0}”',+ 'Something went wrong': 'Algo deu errado',+ 'Discard the running workout': 'Descartar o treino em andamento',+ 'A timer runs while you hold the set. Leave the weight at 0 for bodyweight holds.': 'Um cronômetro funciona enquanto você mantém a posição. Deixe o peso em 0 para isometrias com o peso do corpo.',+ 'Targets stay where you set them.': 'As metas permanecem como você definir.',+ 'Hit every rep in every set and the weight goes up. Repeated misses trigger a deload.': 'Conclua todas as repetições de todas as séries para aumentar o peso. Falhas repetidas acionam uma redução de carga.',+ 'Hold every set for the full duration and the target goes up.': 'Mantenha todas as séries pela duração completa para aumentar a meta.',+ 'Held every set for the full time — target up by {0}s.': 'Você manteve todas as séries pelo tempo completo — meta aumentada em {0} s.',+ 'Last time came up short — same target again.': 'Na última vez você ficou abaixo da meta — repita a mesma meta.',+ 'Same weight — aim for {0} reps this time.': 'Mesmo peso — desta vez, tente fazer {0} repetições.',+ 'Nothing left — went to failure': 'Sem repetições restantes — até a falha',+ 'Tap a muscle to see its exercises.': 'Toque em um músculo para ver seus exercícios.',+ 'Superset': 'Superset',+ 'Superset {0} / {1}': 'Superset {0} / {1}',+ 'Superset with exercise above': 'Superset com o exercício acima',+ 'Guest mode — data lives only in this browser.': 'Modo visitante — os dados ficam somente neste navegador.',+ 'Sign in with passkey': 'Entrar com chave de acesso',+ 'Passkeys not supported in this browser.': 'Chaves de acesso não são compatíveis com este navegador.',+ 'Su': 'D',+ 'Mo': 'S',+ 'Tu': 'T',+ 'We': 'Q',+ 'Th': 'Q',+ 'Fr': 'S',+ 'Sa': 'S',++ // --- equipment profiles ---+ 'Showing all equipment': 'Mostrando todos os equipamentos',+ 'Showing what you have in "{0}"': 'Mostrando o que você tem em “{0}”',+ 'Show all equipment': 'Mostrar todos os equipamentos',+ 'Filter by "{0}"': 'Filtrar por “{0}”',+ 'Edit profile': 'Editar perfil',+ 'New equipment profile': 'Novo perfil de equipamentos',+ 'Name it after where you train — e.g. "Home" or "Gym" — then check what you have there.': 'Dê a ele o nome do lugar onde você treina — por exemplo, “Casa” ou “Academia” — e marque o que você tem lá.',+ 'Profile name': 'Nome do perfil',+ 'Body-weight exercises are always available, in every profile.': 'Exercícios com o peso do corpo estão sempre disponíveis, em todos os perfis.',+ '{0} of {1} exercises need equipment outside "{2}"': '{0} de {1} exercícios precisam de equipamentos fora de “{2}”',+ 'Needs {0} — not in your active profile': 'Precisa de {0} — não está no seu perfil ativo',+ 'Filter by equipment': 'Filtrar por equipamento',+ 'Active profile': 'Perfil ativo',+ '{0} equipment types': '{0} tipos de equipamento',+ 'Add equipment profile': 'Adicionar perfil de equipamentos',+ 'Delete profile?': 'Excluir perfil?',+ '"{0}" and its equipment list will be removed.': '“{0}” e sua lista de equipamentos serão removidos.',+ 'Filters the exercise library and picker, and flags routine exercises that need something you don’t have in the active profile.': 'Filtra a biblioteca de exercícios e o seletor, e sinaliza os exercícios das rotinas que precisam de algo que você não tem no perfil ativo.',++ // --- drop-sets, auto-backup and server pairing ---+ 'Auto-backup on changes': 'Backup automático ao alterar',+ 'Saves a dated copy to the Documents folder after finishing a workout or editing a routine — point a sync app at it, or copy it out by hand.': 'Salva uma cópia datada na pasta Documentos depois de terminar um treino ou editar uma rotina — aponte um aplicativo de sincronização para ela, ou copie o arquivo na mão.',+ 'Your server': 'Seu servidor',+ 'Synced with your openGym server.': 'Sincronizado com o seu servidor openGym.',+ 'Disconnect': 'Desconectar',+ 'Disconnect from your server?': 'Desconectar do seu servidor?',+ 'Your data is synced to your server first, then this device switches back to local-only.': 'Seus dados são sincronizados com o seu servidor primeiro, depois este dispositivo volta ao modo somente local.',+ 'Disconnected — back to local-only': 'Desconectado — de volta ao modo somente local',+ 'Connect to my server': 'Conectar ao meu servidor',+ 'Sync this device to your own self-hosted openGym instead.': 'Sincronize este dispositivo com o seu próprio openGym auto-hospedado.',+ 'Pair the mobile app': 'Parear o aplicativo',+ 'Connect the openGym app on your phone to this account.': 'Conecte o aplicativo openGym do seu celular a esta conta.',+ 'On the openGym app, choose “Connect to my server”, then enter this address and the code below. It expires in 5 minutes.': 'No aplicativo openGym, escolha “Conectar ao meu servidor”, depois digite este endereço e o código abaixo. Ele expira em 5 minutos.',+ 'Enter your server address and the code': 'Digite o endereço do seu servidor e o código',+ 'Connected': 'Conectado',+ 'Could not connect': 'Não foi possível conectar',+ 'Open Settings → “Pair the mobile app” on the openGym site you’re already signed into, then enter its address and the code shown there.': 'No site openGym em que você já está conectado, abra Configurações → “Parear o aplicativo”, depois digite o endereço e o código mostrado lá.',+ 'Connecting…': 'Conectando…',+ 'Connect': 'Conectar',+ 'How do you want to use openGym?': 'Como você quer usar o openGym?',+ 'Local keeps everything on this phone. Connecting syncs to your own openGym server instead — you can switch later in Settings.': 'Local mantém tudo neste celular. Conectar sincroniza com o seu próprio servidor openGym — você pode mudar depois em Configurações.',+ 'Every set becomes a drop-set: after the main set, {0} drop(s) with no rest, each about {1}% lighter.': 'Cada série vira uma série decrescente: depois da série principal, {0} queda(s) sem descanso, cada uma cerca de {1}% mais leve.',+ 'Every set becomes rest-pause: {0} reps to start, then {1} more split into short bursts, {2}s rest before each, roughly halving each time.': 'Cada série vira rest-pause: {0} repetições para começar, depois mais {1} divididas em rajadas curtas, com {2}s de descanso antes de cada uma, caindo cerca de metade a cada vez.',++ // --- workout notes and planned warm-ups ---+ 'Most reps in a set per workout': 'Mais reps em uma série por treino',+ 'Added before your work sets and left out of volume, records and progression. Each one closes half the gap to the work weight — you can still change any of them mid-session.': 'São adicionadas antes das suas séries de trabalho e ficam de fora do volume, dos recordes e da progressão. Cada uma reduz pela metade a distância até o peso de trabalho — você ainda pode alterá-las durante o treino.',+ 'Ramp-up sets added before the work sets, so you do not have to add them by hand each session.': 'Séries de aproximação antes das séries de trabalho, para você não precisar adicioná-las na mão a cada treino.',+ 'How it went, what to change — kept with today’s workout.': 'Como foi, o que mudar — fica salvo com o treino de hoje.',+ 'Brings it up again the next time you train this exercise.': 'Aparece de novo na próxima vez que você treinar este exercício.',+ 'Seat height, pin position, a form cue — shown every session.': 'Altura do banco, posição do pino, uma dica de execução — aparece em todos os treinos.',+ 'How the session went as a whole.': 'Como foi o treino como um todo.',- 'Rest-pause always trains as one warm-up set at this rep count, then one rest-pause work set — "Sets" is not used.': 'O rest-pause sempre treina como uma série de aquecimento com essas repetições e uma série de trabalho rest-pause — “Séries” não é usado.'++ 'Rest-pause always trains as one warm-up set at this rep count, then one rest-pause work set — "Sets" is not used.': 'O rest-pause sempre treina como uma série de aquecimento com essas repetições e uma série de trabalho rest-pause — “Séries” não é usado.',++++ // --- AI Coach ---++ // pt-PT addresses the lifter as "tu"; Brazil says "você", and a few words differ outright++ // (ecrã → tela, anular → desfazer, controlos → controles, «» → “”).++ 'The Coach is reading your training…': 'O Treinador está lendo seu treino…',++ 'Any pending suggestion is discarded and scheduled reviews stop. Your Coach history stays, and you can turn it back on anytime.': 'Qualquer sugestão pendente é descartada e as revisões agendadas param. Seu histórico do Treinador fica, e você pode ligá-lo de novo quando quiser.',++ 'Undo the last Coach changes?': 'Desfazer as últimas alterações do Treinador?',++ 'Your plan goes back to how it was before you accepted them. Workouts you have logged since are untouched.': 'Seu plano volta ao que era antes de você aceitá-las. Os treinos registrados desde então não são alterados.',++ 'Undo': 'Desfazer',++ 'Nothing to undo': 'Nada para desfazer',++ 'Plan design and reviews, from your own training': 'Criação de planos e revisões, a partir do seu próprio treino',++ 'The Coach reads what you have actually logged since its last look and suggests changes to your plan — each one with its reason.': 'O Treinador lê o que você registrou desde a última vez e sugere alterações no seu plano — cada uma com o seu motivo.',++ 'Anything it should know? (optional) — e.g. “right shoulder pinches on overhead work”': 'Algo que ele deva saber? (opcional) — ex.: “o ombro direito incomoda em movimentos acima da cabeça”',++ '{0} of {1} Coach runs used today': '{0} de {1} usos do Treinador hoje',++ 'No plan yet — the Coach can build you one from a few questions.': 'Ainda não há plano — o Treinador pode criar um a partir de algumas perguntas.',++ 'Let the Coach build my plan': 'Deixar o Treinador criar meu plano',++ 'Used by every proposal — keep limitations here up to date.': 'Usado em cada proposta — mantenha suas limitações atualizadas aqui.',++ 'Your answers': 'Suas respostas',++ 'Not set yet': 'Ainda não definido',++ 'Controls': 'Controles',++ 'Undo the last Coach changes': 'Desfazer as últimas alterações do Treinador',++ 'When you ask for a plan or a review, this instance sends the following to {0}, running on this server under the instance owner’s account.': 'Quando você pede um plano ou uma revisão, esta instância envia o seguinte para {0}, que roda neste servidor na conta do proprietário.',++ 'the configured AI provider': 'o provedor de IA configurado',++ 'Your name, your sign-in details and everything else about your account stay here. Other people’s data is never included.': 'Seu nome, seus dados de acesso e todo o resto da sua conta ficam aqui. Os dados de outras pessoas nunca são incluídos.',++ 'Nothing the Coach suggests is applied on its own — you review every change and can undo it afterwards.': 'Nada do que o Treinador sugere é aplicado sozinho — você revisa cada alteração e pode desfazê-la depois.',++ 'You can turn this off at any time, which also discards anything the Coach is holding for you.': 'Você pode desligar isto a qualquer momento, o que também descarta o que o Treinador estiver guardando para você.',++ 'The Coach is not a doctor or a physiotherapist. If something hurts, ask a professional.': 'O Treinador não é médico nem fisioterapeuta. Se algo doer, procure um profissional.',++ 'I understand — turn the Coach on': 'Entendi — ligar o Treinador',++ 'Meet the Coach': 'Conheça o Treinador',++ 'An AI coach that can design your plan and adjust it from what you actually log. It runs on this server, it never changes anything without your say-so, and it is off until you turn it on.': 'Um treinador com IA que cria seu plano e o ajusta com base no que você registra. Roda neste servidor, nunca muda nada sem a sua autorização e fica desligado até você ligá-lo.',++ 'The Coach is thinking…': 'O Treinador está pensando…',++ 'This takes a minute or two. You can leave this screen — it keeps going.': 'Isto leva um ou dois minutos. Você pode sair desta tela — ele continua trabalhando.',++ 'Your plan is ready': 'Seu plano está pronto',++ '{0} routines to look over': '{0} rotinas para revisar',++ 'Review': 'Revisar',++ 'Off — the Coach only looks when you ask it to.': 'Desligado — o Treinador só analisa quando você pede.',++ 'You are only notified when the Coach actually has something to suggest.': 'Você só é avisado quando o Treinador realmente tem algo a sugerir.',++ 'On a day and time you choose': 'No dia e hora que você escolher',++ 'As soon as you have logged enough': 'Assim que você tiver registrado o suficiente',++ 'Reviewed your training': 'Revisou seu treino',++ 'The Coach is building your plan…': 'O Treinador está criando seu plano…',++ 'Your plan': 'Seu plano',++ 'What are you training for?': 'Para que você treina?',++ 'Where are you starting from?': 'De onde você está partindo?',++ 'Which days suit you? (optional)': 'Quais dias são melhores para você? (opcional)',++ 'The Coach fits the volume to the time you actually have, including rest between sets.': 'O Treinador ajusta o volume ao tempo que você realmente tem, incluindo o descanso entre séries.',++ 'What can you train with?': 'Com o que você pode treinar?',++ 'Pick everything you have access to. Leave it empty and the Coach will use the whole library.': 'Marque tudo a que você tem acesso. Se deixar vazio, o Treinador usa a biblioteca inteira.',++ 'Injuries, joints that complain, movements you cannot do, or practical limits like training at 6am in a flat.': 'Lesões, articulações que reclamam, movimentos que você não consegue fazer ou limites práticos como treinar às 6h em um apartamento.',++ 'e.g. “dodgy left shoulder — no barbell overhead press”': 'ex.: “ombro esquerdo sensível — nada de desenvolvimento com barra”',++ 'If something actually hurts, see a professional — the Coach will program conservatively but it cannot diagnose anything.': 'Se algo realmente doer, procure um profissional — o Treinador vai programar de forma conservadora, mas não pode diagnosticar nada.',++ 'Exercises you love': 'Exercícios que você adora',++ 'e.g. “deadlifts, anything with a kettlebell”': 'ex.: “levantamento terra, qualquer coisa com kettlebell”',++ 'Exercises you would rather not': 'Exercícios que você prefere evitar',++ 'e.g. “I hate lunges”': 'ex.: “odeio afundos”',++ 'Anything you want the Coach to know': 'Algo que você queira que o Treinador saiba',++ 'e.g. “I want visible arms progress by spring”': 'ex.: “quero ver progresso visível nos braços até a primavera”',++ 'Build my plan': 'Criar meu plano',++ 'Pick a goal and where you are starting from to continue.': 'Escolha um objetivo e seu ponto de partida para continuar.',++ 'Your plan is live': 'Seu plano está ativo',++ 'Nothing is saved, and you can ask again anytime.': 'Nada é salvo, e você pode pedir de novo quando quiser.',++ 'The Coach is revising it…': 'O Treinador está revisando…',++ 'Replaces your current week. Days this plan leaves empty become rest days.': 'Substitui sua semana atual. Os dias que este plano deixar vazios viram dias de descanso.',++ 'Want something different?': 'Quer algo diferente?',++ 'Say it in your own words and the Coach will revise the whole plan.': 'Diga com suas palavras e o Treinador revisa o plano inteiro.',++ 'e.g. “swap the squats for split squats, and Mondays are short”': 'ex.: “troque os agachamentos por afundos búlgaros, e às segundas tenho pouco tempo”',++ 'Nothing changes, and the Coach will remember you turned these down.': 'Nada muda, e o Treinador vai lembrar que você recusou estas.',++ 'Based on your last {0} sessions': 'Com base nas suas últimas {0} sessões',++ 'Your plan changed since the Coach looked at it. Suggestions that no longer match are greyed out — ask for a fresh review to see them again.': 'Seu plano mudou desde que o Treinador o viu. As sugestões que não se encaixam mais aparecem esmaecidas — peça uma nova revisão para vê-las de novo.',++ 'Doesn’t match your plan any more — can’t be applied.': 'Não corresponde mais ao seu plano — não pode ser aplicada.',++ 'Reverted the last Coach changes.': 'As últimas alterações do Treinador foram desfeitas.',++ 'Undid the last changes': 'Desfez as últimas alterações',++ '{0}: hold time': '{0}: tempo de isometria',++ 'Add routine “{0}”': 'Adicionar rotina “{0}”',++ 'Rename routine to “{0}”': 'Renomear rotina para “{0}”'+ }++ export default { ...pt, ...PT_BR_OVERRIDES }diff --cc frontend/src/store/useStore.jsindex d64aba181,133dfcf61..f6b73f61a--- a/frontend/src/store/useStore.js+++ b/frontend/src/store/useStore.js@@@ -84,11 -92,7 +92,12 @@@ export const useStore = create((set, geS: (() => { const s = loadState(); registerCustom(s.customEx); return s })(),user: (() => { try { return JSON.parse(localStorage.getItem('gym_user')) || null } catch { return null } })(),ready: false,+ /* Instance capabilities from GET /api/config. `config.coach` is present only when the owner+ has both enabled the Coach and connected a provider — every Coach entry point in the app+ hangs off it via coachAvailable(), so an unconfigured instance renders exactly what it+ always did, and a configured one is the only place any of it appears. */+ config: null,+ needsMobileOnboarding: false, // mobile build only — set true by boot() on a genuine first launch// Mutate a draft of S via producer fn, then persist + schedule sync.update(mut, push = true) {diff --cc frontend/src/views/Home.jsxindex 34b9b2760,a7abcc72d..ab853d091--- a/frontend/src/views/Home.jsx+++ b/frontend/src/views/Home.jsx@@@ -67,8 -74,9 +76,10 @@@ export default function Home()</span><div style={{ minWidth: 0 }}><div className="lbl2">{t('Today')}</div>- <div className="ttl">{S.active ? t('{0} — in progress', S.active.name) : routine ? routine.name : t('Rest day')}{todayOvr && routine ? ' · ' + t('rescheduled') : ''}</div>+ <div className="ttl">{S.active ? t('{0} — in progress', S.active.name)+ : doneToday ? (doneToday.name ? t('{0} — done', doneToday.name) : t('Workout done'))+ : routine ? routine.name : t('Rest day')}{todayOvr && routine && !doneToday ? ' · ' + t('rescheduled') : ''}</div>+ {next && <div className="ss">{t('Next session: {0}, {1}', t(DAYN[next.weekday]), next.routine.name)}</div>}</div></div>{S.active ? <span className="tag" style={{ color: 'var(--orange)', background: 'color-mix(in srgb,var(--orange) 16%,transparent)' }}>{t('Resume')}</span>diff --cc website/docs.htmlindex e222c8b2b,7275ca4f4..f6f71b5b8--- a/website/docs.html+++ b/website/docs.html@@@ -112,28 -135,8 +136,28 @@@ docker compose up -d</code></pre<p>It runs on your machine, is spawned by the client, and reads your exported data directly.Nothing is sent anywhere, and it is <b>not part of the Docker build</b> — if you don't usean AI assistant, it simply isn't there. Setup is a few lines of client config:- <a href="https://github.com/DuarteSantos8/openGym/blob/main/mcp/README.md" rel="noopener">mcp/README.md</a>.</p>+ <a href="https://gitlab.com/DuarteSantos8/opengym/-/blob/main/mcp/README.md" rel="noopener">mcp/README.md</a>.</p>+ <h2 id="coach">Let an AI coach write your plan</h2>+ <p>Separate from the read-only bridge above, openGym has an optional <b>AI Coach</b> that can+ design a training plan and, later, review what you actually logged and propose changes to+ it. Answer a few questions — goal, days a week, session length, equipment, anything to work+ around — and it builds a week of routines. Every suggestion carries the evidence behind it,+ you approve or reject each one, and you can undo the last set of changes.</p>+ <p>It is <b>off by default and not in the default image</b>. The Coach needs a build that+ includes an AI runtime, which the normal one deliberately does not carry:</p>+ <pre><code>API_TARGET=coach docker compose up -d --build api</code></pre>+ <p>Then an admin turns it on in <b>Settings → Admin → AI Coach</b> and connects a provider+ account. It runs on <b>your</b> server under <b>your</b> account — there is no openGym+ service in the middle, and nothing is sent anywhere until you ask it for something. What+ leaves the server is a by-name allowlist (your plan, your logged sets, body weight if you+ track it) under a pseudonym; your name, sign-in details and other profiles never do. What+ comes back can only touch routines and your weekly schedule, and is applied on your device+ after you approve it.</p>+ <p>The Coach is not a doctor or a physiotherapist. If something hurts, ask a professional.+ Full details, including exactly what is sent and how credentials are stored:+ <a href="https://github.com/DuarteSantos8/openGym/blob/main/docs/AI_COACH.md" rel="noopener">docs/AI_COACH.md</a>.</p>+<h2 id="import">Import your training history</h2><p>Coming from another tracker? <b>Settings → Data → Import from another app</b> reads:</p><ul>