diff --git a/frontend/src/components/LineChart.jsx b/frontend/src/components/LineChart.jsx
index 8f9302e..c236464 100644
--- a/frontend/src/components/LineChart.jsx
+++ b/frontend/src/components/LineChart.jsx
@@ -4,8 +4,15 @@ import { t } from '../lib/i18n.js'
const W = 340 // viewBox width; the svg stretches to its container, height comes from `h`
-// points: [{ t: ms, y: num, d?: iso }] sorted by t. opts: { h, unit, color, axes, goal }
-export default function LineChart({ points, h = 150, unit = '', color = 'var(--acc)', axes = true, goal = null }) {
+// points: [{ t: ms, y: num, d?: iso, m?: 0..1, note?: str }] sorted by t.
+// m marks the point — a second reading carried by the same dot (bigger and more solid =
+// more of it). Used for effort on the weight curve, where the two belong on one line:
+// the same weight with less left in the tank is not the same session.
+// note extra text for that point's tooltip.
+// opts: { h, unit, color, axes, goal, invert }
+// invert flips the y axis, for a scale that counts down as it gets harder (RIR). Without it
+// a curve of reps-in-reserve reads upside down, with the hardest sets at the floor.
+export default function LineChart({ points, h = 150, unit = '', color = 'var(--acc)', axes = true, goal = null, invert = false }) {
const svgRef = useRef(null)
const wrapRef = useRef(null)
const tipRef = useRef(null)
@@ -42,7 +49,10 @@ export default function LineChart({ points, h = 150, unit = '', color = 'var(--a
const pad = (ymax - ymin) * 0.12; ymin -= pad; ymax += pad
const t0 = pts[0].t, t1 = pts[pts.length - 1].t || t0 + 1
const X = t => (t1 === t0 ? (P.l + W - P.r) / 2 : P.l + (t - t0) / (t1 - t0) * (W - P.l - P.r))
- const Y = y => P.t + (1 - (y - ymin) / (ymax - ymin)) * (H - P.t - P.b)
+ const Y = y => {
+ const f = (y - ymin) / (ymax - ymin)
+ return P.t + (invert ? f : 1 - f) * (H - P.t - P.b)
+ }
const gridlines = []
if (axes) {
@@ -81,7 +91,8 @@ export default function LineChart({ points, h = 150, unit = '', color = 'var(--a
const poly = pts.map(p => X(p.t).toFixed(1) + ',' + Y(p.y).toFixed(1)).join(' ')
const last = pts[pts.length - 1]
const gid = 'g' + Math.round(t0 % 1e7) + '_' + H
- const hoverPts = (single ? [points[0]] : points).map(p => ({ x: X(p.t), y: Y(p.y), iso: p.d || isoOf(new Date(p.t)), v: p.y }))
+ const hoverPts = (single ? [points[0]] : points).map(p => ({ x: X(p.t), y: Y(p.y), iso: p.d || isoOf(new Date(p.t)), v: p.y, note: p.note }))
+ const marked = points.some(p => p.m != null)
const onMove = e => {
const c = e.touches ? e.touches[0] : e
@@ -111,6 +122,8 @@ export default function LineChart({ points, h = 150, unit = '', color = 'var(--a
>}
+ {marked && pts.map((p, i) => (p.m == null ? null :
+ ))}
{hover &&
@@ -119,7 +132,7 @@ export default function LineChart({ points, h = 150, unit = '', color = 'var(--a
}
{hover &&
}
)
diff --git a/frontend/src/index.css b/frontend/src/index.css
index 47123d7..e3eba27 100644
--- a/frontend/src/index.css
+++ b/frontend/src/index.css
@@ -784,6 +784,9 @@ h4.sec{
.mrow .bar{width:74px;height:5px;border-radius:3px;background:var(--surface-2);flex:none;overflow:hidden}
.mrow .bar i{display:block;height:100%;background:var(--acc);border-radius:3px}
.mrow .v{font-size:12px;color:var(--label-2);min-width:52px;text-align:right;flex:none}
+/* A headline number inside a card — tile weight without a tile around it, for the pair of
+ readings at the top of the effort card. */
+.stat-v{font-size:26px;font-weight:600;letter-spacing:-.026em;line-height:1.1}
.mchips{display:flex;flex-wrap:wrap;gap:6px;margin-top:4px}
.mchip{font-size:12px;padding:4px 9px;border-radius:99px;background:var(--surface-2);color:var(--label-2)}
.mchip.miss{background:color-mix(in srgb,var(--orange) 16%,transparent);color:var(--orange)}
diff --git a/frontend/src/lib/effort.js b/frontend/src/lib/effort.js
new file mode 100644
index 0000000..8f83d96
--- /dev/null
+++ b/frontend/src/lib/effort.js
@@ -0,0 +1,139 @@
+// Effort as a statistic: one internal scale, both display scales.
+//
+// A set carries either `rir` or `rpe` and is never rewritten — switching the setting changes
+// what new sets ask for, nothing else (see history.js). For a *chart* that is a problem: a
+// history that mixes the two (own logs in RIR, an imported file in RPE) would draw two
+// half-empty series. So everything aggregates in RIR and is converted back for display.
+// RIR is the internal unit because it has a real zero — a set taken to failure — where RPE's
+// floor of 6 is only a convention about which sets are worth rating. RPE 8 == RIR 2.
+import { EFFORT, effortOf } from './history.js'
+import { weekKey } from './format.js'
+
+// At or below this a set is close enough to failure to be the kind that drives adaptation.
+// 3 rather than 2: the line is a convention, and drawn one rep too generously it still
+// separates working sets from the ones left in the warm-up range.
+export const HARD_RIR = 3
+// Below this many rated sets an average is noise. Showing "RIR 1.0" off a single set reads
+// like a finding when it is one tap, so the callers show a dash instead.
+export const MIN_RATED = 5
+
+/** A set's effort in RIR, or null when it was never rated. 0 is a rating, not "empty". */
+export const rirOf = s =>
+ !s ? null : s.rir != null ? s.rir : s.rpe != null ? 10 - s.rpe : null
+
+/** RIR → the scale being displayed. The reverse of rirOf, for one number. */
+export const toScale = (kind, rir) =>
+ rir == null ? null : Math.round((kind === 'rpe' ? 10 - rir : rir) * 10) / 10
+
+/**
+ * Which scale to *label* aggregates with. The profile's own setting wins; a profile that
+ * logs nothing itself but carries rated history (the imported-from-Hevy case) is shown the
+ * scale that history is actually written in, rather than an RIR it has never seen.
+ */
+export function displayScale(S) {
+ const k = effortOf(S)
+ if (EFFORT[k]) return k
+ let rir = 0, rpe = 0
+ eachDoneSet(S, s => { if (s.rir != null) rir++; else if (s.rpe != null) rpe++ })
+ return rpe > rir ? 'rpe' : 'rir'
+}
+export const scaleName = kind => EFFORT[kind].hd
+
+// Every finished set in the profile, oldest first. `fn` gets the set plus the workout it
+// belongs to, which is what the windowed and per-week views need.
+function eachDoneSet(S, fn) {
+ ;(S.workouts || []).forEach(w =>
+ (w.entries || []).forEach(e =>
+ (e.sets || []).forEach(s => { if (s.done) fn(s, w, e) })))
+}
+
+// A window in days, counted back from now. 0 = everything, which is also what an empty
+// history means for every caller here.
+const inWindow = (w, days) =>
+ !days || (w.start || new Date(w.d).getTime()) > Date.now() - days * 86400000
+
+export const avgRir = sets => {
+ const vs = (sets || []).map(rirOf).filter(v => v != null)
+ return vs.length ? vs.reduce((a, b) => a + b, 0) / vs.length : null
+}
+
+/**
+ * The headline numbers for a window: how hard, how much of it was hard, and — the part that
+ * keeps the rest honest — how much of the training was rated at all. Effort is optional and
+ * off by default, so partial coverage is the normal case; an average without its denominator
+ * would quietly speak for sets that were never rated.
+ */
+export function effortSummary(S, days) {
+ let done = 0, rated = 0, sum = 0, hard = 0
+ eachDoneSet(S, (s, w) => {
+ if (!inWindow(w, days)) return
+ done++
+ const r = rirOf(s)
+ if (r == null) return
+ rated++; sum += r
+ if (r <= HARD_RIR) hard++
+ })
+ return {
+ done, rated, hard,
+ avg: rated >= MIN_RATED ? sum / rated : null,
+ hardPct: rated >= MIN_RATED ? hard / rated : null
+ }
+}
+
+/** Does this profile hold any rated set at all? Decides whether the effort UI exists. */
+export function hasEffort(S) {
+ let any = false
+ eachDoneSet(S, s => { if (!any && rirOf(s) != null) any = true })
+ return any
+}
+
+/**
+ * Average effort per calendar week, with the week's set count alongside: the pair is the
+ * point. Volume up with effort up is fatigue accumulating; volume up with effort flat is the
+ * adaptation you were training for. Weeks with a single rated set are dropped rather than
+ * drawn — one tap should not become a peak in the curve.
+ */
+export function effortWeeks(S, days) {
+ const wk = new Map()
+ eachDoneSet(S, (s, w) => {
+ if (!inWindow(w, days)) return
+ const k = weekKey(w.d)
+ let e = wk.get(k)
+ if (!e) wk.set(k, e = { k, t: mondayOf(w.d), sum: 0, n: 0, sets: 0 })
+ e.sets++
+ const r = rirOf(s)
+ if (r != null) { e.sum += r; e.n++ }
+ })
+ return [...wk.values()].filter(e => e.n >= 2).sort((a, b) => a.t - b.t)
+ .map(e => ({ t: e.t, rir: e.sum / e.n, n: e.n, sets: e.sets }))
+}
+// The Monday of an ISO date, as ms — the x position a week's point sits at.
+function mondayOf(iso) {
+ const d = new Date(iso + 'T12:00:00')
+ d.setDate(d.getDate() - ((d.getDay() + 6) % 7))
+ d.setHours(12, 0, 0, 0)
+ return +d
+}
+
+/**
+ * How the rated sets spread across the scale, in whole steps with everything past the top
+ * bucket collapsed into it. This is the chart that answers "am I training too far from
+ * failure, or leaving nothing for the next session" — an average alone hides both, because
+ * half the sets at 0 and half at 4 average to a healthy-looking 2.
+ */
+export const BUCKETS = 4 // 0,1,2,3 and a "4+" tail
+export function effortHistogram(S, days) {
+ const bins = new Array(BUCKETS + 1).fill(0)
+ let rated = 0
+ eachDoneSet(S, (s, w) => {
+ if (!inWindow(w, days)) return
+ const r = rirOf(s)
+ if (r == null) return
+ rated++
+ bins[Math.min(BUCKETS, Math.max(0, Math.floor(r)))]++
+ })
+ return bins.map((n, i) => ({ rir: i, tail: i === BUCKETS, n, pct: rated ? n / rated : 0 }))
+}
+
+/** A set that counts as hard — the filter behind the muscle map's "hard sets" mode. */
+export const isHardSet = s => { const r = rirOf(s); return r != null && r <= HARD_RIR }
diff --git a/frontend/src/lib/effort.test.js b/frontend/src/lib/effort.test.js
new file mode 100644
index 0000000..b313f2e
--- /dev/null
+++ b/frontend/src/lib/effort.test.js
@@ -0,0 +1,175 @@
+import { describe, it, expect } from 'vitest'
+import {
+ rirOf, toScale, displayScale, avgRir, effortSummary, hasEffort, effortWeeks,
+ effortHistogram, isHardSet, HARD_RIR, MIN_RATED
+} from './effort.js'
+import { isoOf } from './format.js'
+
+const daysAgo = n => { const d = new Date(); d.setDate(d.getDate() - n); return d }
+// One workout on a day, with the sets given. Everything here is a finished set unless a set
+// says otherwise, because that is what the stats read.
+const W = (n, sets) => {
+ const d = daysAgo(n)
+ return { id: 'w' + n, d: isoOf(d), start: +d, entries: [{ id: '0025', sets: sets.map(s => ({ w: 60, r: 8, done: true, ...s })) }] }
+}
+const S = (...workouts) => ({ workouts })
+
+describe('rirOf', () => {
+ it('reads RIR straight and RPE as its mirror — RPE 8 is RIR 2', () => {
+ expect(rirOf({ rir: 2 })).toBe(2)
+ expect(rirOf({ rpe: 8 })).toBe(2)
+ expect(rirOf({ rpe: 9.5 })).toBe(0.5)
+ })
+
+ it('keeps a rated 0 and rejects everything that only looks like one', () => {
+ expect(rirOf({ rir: 0 })).toBe(0) // taken to failure — a rating, not "empty"
+ expect(rirOf({ rpe: 10 })).toBe(0)
+ expect(rirOf({})).toBe(null)
+ expect(rirOf({ rir: null })).toBe(null)
+ expect(rirOf(null)).toBe(null)
+ })
+
+ it('prefers the scale the set itself was logged on when a file wrote both', () => {
+ expect(rirOf({ rir: 3, rpe: 9 })).toBe(3)
+ })
+})
+
+describe('toScale', () => {
+ it('converts back to whichever scale is on screen', () => {
+ expect(toScale('rir', 2)).toBe(2)
+ expect(toScale('rpe', 2)).toBe(8)
+ expect(toScale('rpe', 0)).toBe(10)
+ expect(toScale('rir', null)).toBe(null)
+ })
+
+ it('does not let the round trip produce float dust', () => {
+ expect(toScale('rpe', 10 - 7.5)).toBe(7.5)
+ })
+})
+
+describe('displayScale', () => {
+ it('follows the profile setting when it has one', () => {
+ expect(displayScale({ effort: 'rpe', workouts: [] })).toBe('rpe')
+ expect(displayScale({ effort: 'rir', workouts: [] })).toBe('rir')
+ })
+
+ it('shows an unrated profile the scale its imported history is written in', () => {
+ // Effort off, but a file brought RPE with it: labelling that history "RIR" would show a
+ // number the profile has never entered and mean the opposite of what it says.
+ expect(displayScale({ effort: 'none', ...S(W(3, [{ rpe: 8 }, { rpe: 9 }])) })).toBe('rpe')
+ expect(displayScale({ effort: 'none', ...S(W(3, [{ rir: 2 }])) })).toBe('rir')
+ expect(displayScale({ effort: 'none', workouts: [] })).toBe('rir')
+ })
+})
+
+describe('avgRir', () => {
+ it('averages the rated sets and ignores the rest', () => {
+ expect(avgRir([{ rir: 1 }, { rir: 3 }])).toBe(2)
+ expect(avgRir([{ rir: 1 }, {}, { rpe: 7 }])).toBe(2) // RPE 7 = RIR 3
+ })
+
+ it('is null rather than 0 when nothing was rated', () => {
+ expect(avgRir([{}, { rir: null }])).toBe(null)
+ expect(avgRir([])).toBe(null)
+ expect(avgRir(null)).toBe(null)
+ })
+})
+
+describe('effortSummary', () => {
+ const st = S(
+ W(2, [{ rir: 1 }, { rir: 3 }, { rir: 2 }]),
+ W(4, [{ rir: 0 }, { rpe: 6 }, {}]), // RPE 6 = RIR 4, one set unrated
+ W(40, [{ rir: 5 }, { rir: 5 }])
+ )
+
+ it('counts rated sets against every finished set, not against itself', () => {
+ const r = effortSummary(st, 0)
+ expect(r.done).toBe(8)
+ expect(r.rated).toBe(7)
+ })
+
+ it('leaves unrated sets out of the average instead of reading them as failure', () => {
+ const r = effortSummary(S(W(2, [{ rir: 4 }, {}, {}, {}, {}, {}])), 0)
+ expect(r.rated).toBe(1)
+ expect(r.avg).toBe(null) // one rating is not an average
+ })
+
+ it('waits for a real sample before reporting a number', () => {
+ const few = S(W(2, new Array(MIN_RATED - 1).fill({ rir: 2 })))
+ expect(effortSummary(few, 0).avg).toBe(null)
+ const enough = S(W(2, new Array(MIN_RATED).fill({ rir: 2 })))
+ expect(effortSummary(enough, 0).avg).toBe(2)
+ })
+
+ it('counts the sets taken close to failure', () => {
+ const r = effortSummary(st, 0)
+ expect(r.hard).toBe(4) // 1, 3, 2, 0 — the 4 and the two 5s are not
+ expect(r.hardPct).toBeCloseTo(4 / 7)
+ })
+
+ it('honours the window', () => {
+ const r = effortSummary(st, 7)
+ expect(r.rated).toBe(5) // the 40-day-old session is out
+ expect(effortSummary(st, 3).rated).toBe(3)
+ })
+
+ it('survives a profile with no training at all', () => {
+ expect(effortSummary({ workouts: [] }, 30)).toEqual({ done: 0, rated: 0, hard: 0, avg: null, hardPct: null })
+ })
+})
+
+describe('hasEffort', () => {
+ it('decides whether the effort UI exists at all', () => {
+ expect(hasEffort(S(W(2, [{ rir: 0 }])))).toBe(true)
+ expect(hasEffort(S(W(2, [{ rpe: 8 }])))).toBe(true)
+ expect(hasEffort(S(W(2, [{}, { rir: null }])))).toBe(false)
+ expect(hasEffort({ workouts: [] })).toBe(false)
+ })
+
+ it('ignores sets that were never finished', () => {
+ expect(hasEffort(S(W(2, [{ rir: 2, done: false }])))).toBe(false)
+ })
+})
+
+describe('effortWeeks', () => {
+ it('averages per calendar week and carries the week volume alongside', () => {
+ const pts = effortWeeks(S(W(1, [{ rir: 1 }, { rir: 3 }, {}])), 0)
+ expect(pts).toHaveLength(1)
+ expect(pts[0].rir).toBe(2)
+ expect(pts[0].n).toBe(2) // rated
+ expect(pts[0].sets).toBe(3) // trained
+ })
+
+ it('drops a week that rests on a single tap', () => {
+ expect(effortWeeks(S(W(1, [{ rir: 1 }])), 0)).toEqual([])
+ })
+
+ it('comes back oldest first, whatever order the workouts arrived in', () => {
+ const pts = effortWeeks(S(W(2, [{ rir: 1 }, { rir: 1 }]), W(30, [{ rir: 3 }, { rir: 3 }])), 0)
+ expect(pts.map(p => p.rir)).toEqual([3, 1])
+ expect(pts[0].t).toBeLessThan(pts[1].t)
+ })
+})
+
+describe('effortHistogram', () => {
+ it('bins by whole steps and collapses the far end into a tail', () => {
+ const h = effortHistogram(S(W(2, [{ rir: 0 }, { rir: 1.5 }, { rir: 4 }, { rir: 7 }])), 0)
+ expect(h.map(b => b.n)).toEqual([1, 1, 0, 0, 2])
+ expect(h[4].tail).toBe(true)
+ expect(h[0].pct).toBe(0.25)
+ })
+
+ it('is all zeroes, not NaN, when nothing is rated', () => {
+ const h = effortHistogram(S(W(2, [{}])), 0)
+ expect(h.every(b => b.n === 0 && b.pct === 0)).toBe(true)
+ })
+})
+
+describe('isHardSet', () => {
+ it('draws the line at the effort that actually drives adaptation', () => {
+ expect(isHardSet({ rir: HARD_RIR })).toBe(true)
+ expect(isHardSet({ rir: HARD_RIR + 0.5 })).toBe(false)
+ expect(isHardSet({ rpe: 10 })).toBe(true)
+ expect(isHardSet({})).toBe(false) // unrated is not hard, and not easy either
+ })
+})
diff --git a/frontend/src/lib/muscles.js b/frontend/src/lib/muscles.js
index 660bbd0..c744812 100644
--- a/frontend/src/lib/muscles.js
+++ b/frontend/src/lib/muscles.js
@@ -100,10 +100,15 @@ export function loadOf(items) {
return load
}
-/** Load for finished workouts (only sets actually ticked off count). */
-export const loadOfWorkouts = workouts =>
+/**
+ * Load for finished workouts (only sets actually ticked off count). `pick` narrows that
+ * further — the map can then answer "where did the *hard* sets go", which is a different
+ * question from where the sets went: a muscle can lead on volume and still never be trained
+ * near failure.
+ */
+export const loadOfWorkouts = (workouts, pick) =>
loadOf((workouts || []).flatMap(w =>
- (w.entries || []).map(e => ({ id: e.id, sets: (e.sets || []).filter(s => s.done).length }))))
+ (w.entries || []).map(e => ({ id: e.id, sets: (e.sets || []).filter(s => s.done && (!pick || pick(s))).length }))))
/** Load a routine *would* produce, from its planned set counts. */
export const loadOfRoutine = routine =>
diff --git a/frontend/src/locales/de.js b/frontend/src/locales/de.js
index 21c106c..9985918 100644
--- a/frontend/src/locales/de.js
+++ b/frontend/src/locales/de.js
@@ -531,4 +531,22 @@ export default {
'Easy — warm-up territory': 'Locker — Aufwärmbereich',
'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.': 'RIR zählt die Wiederholungen, die du übrig lässt; RPE liest dieselbe Anstrengung auf einer 10er-Skala ab — also RPE ≈ 10 − RIR. Nimm die Skala, in der du ohnehin denkst.',
'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.': 'Die hervorgehobene Zeile ist der Bereich, in dem die meisten Arbeitssätze landen. Bereits protokollierte Sätze behalten ihre eigene Skala, und sonst liest den Wert nichts — Progression und geschätztes 1RM bleiben unberührt.',
+ // --- effort in the stats ---
+ 'Effort': 'Anstrengung',
+ 'how close to failure': 'wie nah am Muskelversagen',
+ 'by hard sets': 'nach harten Sätzen',
+ 'Hard': 'Hart',
+ 'no hard sets': 'keine harten Sätze',
+ 'No hard sets in this period': 'Keine harten Sätze in diesem Zeitraum',
+ 'Every muscle group got at least one hard set in this period.': 'Jede Muskelgruppe hat in diesem Zeitraum mindestens einen harten Satz bekommen.',
+ 'No rated sets in this period.': 'Keine bewerteten Sätze in diesem Zeitraum.',
+ 'average effort': 'durchschnittliche Anstrengung',
+ 'at {0} {1} or harder': 'bei {0} {1} oder härter',
+ '{0} of {1} finished sets rated': '{0} von {1} erledigten Sätzen bewertet',
+ 'Effort per set is switched off — turn it on in Settings to keep rating.': 'Anstrengung pro Satz ist ausgeschaltet — schalte sie in den Einstellungen ein, um weiter zu bewerten.',
+ 'Week by week': 'Woche für Woche',
+ 'Where the sets land': 'Wo die Sätze landen',
+ 'Most working sets belong close to failure without living there — half at the floor and half at the top average out to a healthy-looking middle.': 'Die meisten Arbeitssätze gehören nah ans Muskelversagen, ohne dort zu wohnen — die Hälfte ganz unten und die Hälfte ganz oben mittelt sich zu einem gesund aussehenden Mittelwert.',
+ 'Average effort per workout': 'Durchschnittliche Anstrengung pro Training',
+ 'A fuller dot means less left in the tank — the same weight at a lower {0} is progress the line alone does not show.': 'Ein vollerer Punkt heißt: weniger im Tank — dasselbe Gewicht bei niedrigerem {0} ist Fortschritt, den die Linie allein nicht zeigt.',
}
diff --git a/frontend/src/locales/es.js b/frontend/src/locales/es.js
index 4b2e707..2c2cc31 100644
--- a/frontend/src/locales/es.js
+++ b/frontend/src/locales/es.js
@@ -513,4 +513,22 @@ export default {
'Easy — warm-up territory': 'Fácil — zona de calentamiento',
'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.': 'El RIR cuenta las repeticiones que dejas; el RPE lee ese mismo esfuerzo en una escala de 10 — así que RPE ≈ 10 − RIR. Elige la que ya usas para pensar.',
'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.': 'La fila resaltada es donde cae la mayoría de las series efectivas. Las series ya registradas conservan su escala, y nada más lee el valor: la progresión y el 1RM estimado no cambian.',
+ // --- effort in the stats ---
+ 'Effort': 'Esfuerzo',
+ 'how close to failure': 'qué tan cerca del fallo',
+ 'by hard sets': 'por series duras',
+ 'Hard': 'Duras',
+ 'no hard sets': 'sin series duras',
+ 'No hard sets in this period': 'Sin series duras en este periodo',
+ 'Every muscle group got at least one hard set in this period.': 'Todos los grupos musculares recibieron al menos una serie dura en este periodo.',
+ 'No rated sets in this period.': 'Ninguna serie valorada en este periodo.',
+ 'average effort': 'esfuerzo medio',
+ 'at {0} {1} or harder': 'a {0} {1} o más duro',
+ '{0} of {1} finished sets rated': '{0} de {1} series completadas valoradas',
+ 'Effort per set is switched off — turn it on in Settings to keep rating.': 'El esfuerzo por serie está desactivado — actívalo en Ajustes para seguir valorando.',
+ 'Week by week': 'Semana a semana',
+ 'Where the sets land': 'Dónde caen las series',
+ 'Most working sets belong close to failure without living there — half at the floor and half at the top average out to a healthy-looking middle.': 'La mayoría de las series efectivas van cerca del fallo sin vivir allí — la mitad abajo y la mitad arriba dan una media que solo parece sana.',
+ 'Average effort per workout': 'Esfuerzo medio por entrenamiento',
+ 'A fuller dot means less left in the tank — the same weight at a lower {0} is progress the line alone does not show.': 'Un punto más lleno significa menos reserva — el mismo peso con un {0} más bajo es progreso que la línea por sí sola no muestra.',
}
diff --git a/frontend/src/locales/fr.js b/frontend/src/locales/fr.js
index 12fed6b..5faf1f2 100644
--- a/frontend/src/locales/fr.js
+++ b/frontend/src/locales/fr.js
@@ -513,4 +513,22 @@ export default {
'Easy — warm-up territory': 'Facile — zone d’échauffement',
'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.': 'Le RIR compte les répétitions qu’il te restait ; le RPE lit le même effort sur une échelle de 10 — donc RPE ≈ 10 − RIR. Prends celle dans laquelle tu penses déjà.',
'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.': 'La ligne mise en avant est celle où tombent la plupart des séries de travail. Les séries déjà enregistrées gardent leur échelle, et rien d’autre ne lit la valeur — la progression et le 1RM estimé ne changent pas.',
+ // --- effort in the stats ---
+ 'Effort': 'Effort',
+ 'how close to failure': 'à quel point près de l’échec',
+ 'by hard sets': 'par séries dures',
+ 'Hard': 'Dures',
+ 'no hard sets': 'aucune série dure',
+ 'No hard sets in this period': 'Aucune série dure sur cette période',
+ 'Every muscle group got at least one hard set in this period.': 'Chaque groupe musculaire a eu au moins une série dure sur cette période.',
+ 'No rated sets in this period.': 'Aucune série notée sur cette période.',
+ 'average effort': 'effort moyen',
+ 'at {0} {1} or harder': 'à {0} {1} ou plus dur',
+ '{0} of {1} finished sets rated': '{0} séries notées sur {1} terminées',
+ 'Effort per set is switched off — turn it on in Settings to keep rating.': 'L’effort par série est désactivé — active-le dans les Réglages pour continuer à noter.',
+ 'Week by week': 'Semaine par semaine',
+ 'Where the sets land': 'Où tombent les séries',
+ 'Most working sets belong close to failure without living there — half at the floor and half at the top average out to a healthy-looking middle.': 'La plupart des séries de travail se placent près de l’échec sans y vivre — la moitié tout en bas et la moitié tout en haut donnent une moyenne qui n’a l’air saine que sur le papier.',
+ 'Average effort per workout': 'Effort moyen par séance',
+ 'A fuller dot means less left in the tank — the same weight at a lower {0} is progress the line alone does not show.': 'Un point plus plein veut dire moins de réserve — le même poids à un {0} plus bas, c’est un progrès que la ligne seule ne montre pas.',
}
diff --git a/frontend/src/locales/hi.js b/frontend/src/locales/hi.js
index 8f4db4f..744a4e0 100644
--- a/frontend/src/locales/hi.js
+++ b/frontend/src/locales/hi.js
@@ -513,4 +513,22 @@ export default {
'Easy — warm-up territory': 'आसान — वॉर्म-अप का दायरा',
'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.': 'RIR बचे हुए रेप्स गिनता है; RPE उसी मेहनत को 10 के पैमाने पर पढ़ता है — यानी RPE ≈ 10 − RIR. वही चुनें जिसमें आप पहले से सोचते हैं।',
'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.': 'हाइलाइट की गई पंक्ति वह है जहाँ ज़्यादातर वर्किंग सेट आते हैं। पहले दर्ज किए सेट अपना पैमाना बनाए रखते हैं, और इस मान को और कुछ नहीं पढ़ता — प्रोग्रेशन और अनुमानित 1RM अछूते रहते हैं।',
+ // --- effort in the stats ---
+ 'Effort': 'मेहनत',
+ 'how close to failure': 'फेलियर के कितने पास',
+ 'by hard sets': 'कठिन सेट के हिसाब से',
+ 'Hard': 'कठिन',
+ 'no hard sets': 'कोई कठिन सेट नहीं',
+ 'No hard sets in this period': 'इस अवधि में कोई कठिन सेट नहीं',
+ 'Every muscle group got at least one hard set in this period.': 'इस अवधि में हर मांसपेशी समूह को कम से कम एक कठिन सेट मिला।',
+ 'No rated sets in this period.': 'इस अवधि में कोई आँका गया सेट नहीं।',
+ 'average effort': 'औसत मेहनत',
+ 'at {0} {1} or harder': '{0} {1} या उससे कठिन',
+ '{0} of {1} finished sets rated': '{1} पूरे किए सेट में से {0} आँके गए',
+ 'Effort per set is switched off — turn it on in Settings to keep rating.': 'हर सेट की मेहनत बंद है — आँकना जारी रखने के लिए सेटिंग्स में चालू करें।',
+ 'Week by week': 'हफ़्ते दर हफ़्ते',
+ 'Where the sets land': 'सेट कहाँ गिरते हैं',
+ 'Most working sets belong close to failure without living there — half at the floor and half at the top average out to a healthy-looking middle.': 'ज़्यादातर वर्किंग सेट फेलियर के पास होने चाहिए, पर वहीं बसे नहीं — आधे सबसे नीचे और आधे सबसे ऊपर मिलकर एक ऐसा औसत बनाते हैं जो सिर्फ़ देखने में सेहतमंद लगता है।',
+ 'Average effort per workout': 'हर वर्कआउट की औसत मेहनत',
+ 'A fuller dot means less left in the tank — the same weight at a lower {0} is progress the line alone does not show.': 'ज़्यादा भरा बिंदु मतलब टंकी में कम बचा — वही वज़न कम {0} पर उठाना वह प्रगति है जो अकेली लाइन नहीं दिखाती।',
}
diff --git a/frontend/src/locales/it.js b/frontend/src/locales/it.js
index e06f6c7..1a282c9 100644
--- a/frontend/src/locales/it.js
+++ b/frontend/src/locales/it.js
@@ -513,4 +513,22 @@ export default {
'Easy — warm-up territory': 'Facile — zona riscaldamento',
'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.': 'Il RIR conta le ripetizioni che ti restavano; l’RPE legge lo stesso sforzo su una scala da 10 — quindi RPE ≈ 10 − RIR. Scegli quella con cui già ragioni.',
'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.': 'La riga evidenziata è dove finisce la maggior parte delle serie di lavoro. Le serie già registrate mantengono la loro scala, e nient’altro legge il valore: progressione e 1RM stimato non cambiano.',
+ // --- effort in the stats ---
+ 'Effort': 'Sforzo',
+ 'how close to failure': 'quanto vicino al cedimento',
+ 'by hard sets': 'per serie dure',
+ 'Hard': 'Dure',
+ 'no hard sets': 'nessuna serie dura',
+ 'No hard sets in this period': 'Nessuna serie dura in questo periodo',
+ 'Every muscle group got at least one hard set in this period.': 'Ogni gruppo muscolare ha avuto almeno una serie dura in questo periodo.',
+ 'No rated sets in this period.': 'Nessuna serie valutata in questo periodo.',
+ 'average effort': 'sforzo medio',
+ 'at {0} {1} or harder': 'a {0} {1} o più duro',
+ '{0} of {1} finished sets rated': '{0} di {1} serie completate valutate',
+ 'Effort per set is switched off — turn it on in Settings to keep rating.': 'Lo sforzo per serie è disattivato — attivalo nelle Impostazioni per continuare a valutare.',
+ 'Week by week': 'Settimana per settimana',
+ 'Where the sets land': 'Dove cadono le serie',
+ 'Most working sets belong close to failure without living there — half at the floor and half at the top average out to a healthy-looking middle.': 'La maggior parte delle serie di lavoro sta vicino al cedimento senza viverci — metà in fondo e metà in cima danno una media che sembra sana solo all’apparenza.',
+ 'Average effort per workout': 'Sforzo medio per allenamento',
+ 'A fuller dot means less left in the tank — the same weight at a lower {0} is progress the line alone does not show.': 'Un punto più pieno significa meno riserva — lo stesso peso con un {0} più basso è progresso che la linea da sola non mostra.',
}
diff --git a/frontend/src/locales/ko.js b/frontend/src/locales/ko.js
index 7e83dfa..0b6f695 100644
--- a/frontend/src/locales/ko.js
+++ b/frontend/src/locales/ko.js
@@ -513,4 +513,22 @@ export default {
'Easy — warm-up territory': '가벼움 — 웜업 구간',
'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.': 'RIR은 남긴 횟수를 세고, RPE는 같은 노력을 10점 척도로 읽습니다 — 즉 RPE ≈ 10 − RIR. 평소에 쓰던 쪽을 고르세요.',
'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.': '강조된 줄은 대부분의 본세트가 들어가는 구간입니다. 이미 기록한 세트는 원래 척도를 그대로 유지하며, 이 값을 읽는 곳은 없습니다 — 프로그레션과 예상 1RM은 영향을 받지 않습니다.',
+ // --- effort in the stats ---
+ 'Effort': '강도',
+ 'how close to failure': '실패 지점에 얼마나 가까운지',
+ 'by hard sets': '힘든 세트 기준',
+ 'Hard': '힘든 세트',
+ 'no hard sets': '힘든 세트 없음',
+ 'No hard sets in this period': '이 기간에 힘든 세트 없음',
+ 'Every muscle group got at least one hard set in this period.': '이 기간에 모든 근육군이 최소 한 세트는 힘들게 훈련했습니다.',
+ 'No rated sets in this period.': '이 기간에 평가된 세트가 없습니다.',
+ 'average effort': '평균 강도',
+ 'at {0} {1} or harder': '{0} {1} 이상',
+ '{0} of {1} finished sets rated': '완료한 {1}세트 중 {0}세트 평가됨',
+ 'Effort per set is switched off — turn it on in Settings to keep rating.': '세트당 강도가 꺼져 있습니다 — 계속 평가하려면 설정에서 켜세요.',
+ 'Week by week': '주별 변화',
+ 'Where the sets land': '세트가 몰리는 곳',
+ 'Most working sets belong close to failure without living there — half at the floor and half at the top average out to a healthy-looking middle.': '대부분의 본세트는 실패 지점 가까이에 있어야 하지만 거기 머물면 안 됩니다 — 절반은 바닥에 절반은 꼭대기에 있으면 평균만 건강해 보입니다.',
+ 'Average effort per workout': '운동당 평균 강도',
+ 'A fuller dot means less left in the tank — the same weight at a lower {0} is progress the line alone does not show.': '점이 진할수록 남은 여력이 적다는 뜻입니다 — 같은 무게를 더 낮은 {0}로 든 것은 선만 봐서는 알 수 없는 발전입니다.',
}
diff --git a/frontend/src/locales/pl.js b/frontend/src/locales/pl.js
index 6441b6a..5ea873a 100644
--- a/frontend/src/locales/pl.js
+++ b/frontend/src/locales/pl.js
@@ -513,4 +513,22 @@ export default {
'Easy — warm-up territory': 'Lekko — poziom rozgrzewki',
'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.': 'RIR liczy powtórzenia, które zostały w zapasie; RPE odczytuje ten sam wysiłek w skali 10 — czyli RPE ≈ 10 − RIR. Wybierz tę, w której już myślisz.',
'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.': 'Wyróżniony wiersz to miejsce, w które trafia większość serii roboczych. Zapisane wcześniej serie zachowują swoją skalę, a wartości nic więcej nie czyta — progresja i szacowany 1RM pozostają bez zmian.',
+ // --- effort in the stats ---
+ 'Effort': 'Wysiłek',
+ 'how close to failure': 'jak blisko upadku',
+ 'by hard sets': 'wg ciężkich serii',
+ 'Hard': 'Ciężkie',
+ 'no hard sets': 'brak ciężkich serii',
+ 'No hard sets in this period': 'Brak ciężkich serii w tym okresie',
+ 'Every muscle group got at least one hard set in this period.': 'Każda grupa mięśniowa dostała w tym okresie co najmniej jedną ciężką serię.',
+ 'No rated sets in this period.': 'Brak ocenionych serii w tym okresie.',
+ 'average effort': 'średni wysiłek',
+ 'at {0} {1} or harder': 'przy {0} {1} lub ciężej',
+ '{0} of {1} finished sets rated': 'ocenione serie: {0} z {1} ukończonych',
+ 'Effort per set is switched off — turn it on in Settings to keep rating.': 'Wysiłek na serię jest wyłączony — włącz go w Ustawieniach, aby dalej oceniać.',
+ 'Week by week': 'Tydzień po tygodniu',
+ 'Where the sets land': 'Gdzie lądują serie',
+ 'Most working sets belong close to failure without living there — half at the floor and half at the top average out to a healthy-looking middle.': 'Większość serii roboczych należy blisko upadku, ale nie na nim — połowa na dole i połowa na górze uśrednia się do zdrowo wyglądającego środka.',
+ 'Average effort per workout': 'Średni wysiłek na trening',
+ 'A fuller dot means less left in the tank — the same weight at a lower {0} is progress the line alone does not show.': 'Pełniejsza kropka znaczy mniej zapasu — ten sam ciężar przy niższym {0} to postęp, którego sama linia nie pokazuje.',
}
diff --git a/frontend/src/locales/pt.js b/frontend/src/locales/pt.js
index 529d7df..d6996f1 100644
--- a/frontend/src/locales/pt.js
+++ b/frontend/src/locales/pt.js
@@ -513,4 +513,22 @@ export default {
'Easy — warm-up territory': 'Fácil — zona de aquecimento',
'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 deixaste; o RPE lê o mesmo esforço numa escala de 10 — ou seja, RPE ≈ 10 − RIR. Escolhe aquela em que já pensas.',
'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 é onde cai a maioria das séries de trabalho. As séries já registadas mantêm a sua escala, e mais nada lê o valor — a progressão e o 1RM estimado não mudam.',
+ // --- effort in the stats ---
+ 'Effort': 'Esforço',
+ 'how close to failure': 'quão perto da falha',
+ 'by hard sets': 'por séries duras',
+ 'Hard': 'Duras',
+ 'no hard sets': 'sem séries duras',
+ 'No hard sets in this period': 'Sem séries duras neste período',
+ 'Every muscle group got at least one hard set in this period.': 'Todos os grupos musculares tiveram pelo menos uma série dura neste período.',
+ 'No rated sets in this period.': 'Nenhuma série avaliada neste período.',
+ 'average effort': 'esforço médio',
+ 'at {0} {1} or harder': 'a {0} {1} ou mais duro',
+ '{0} of {1} finished sets rated': '{0} de {1} séries concluídas avaliadas',
+ 'Effort per set is switched off — turn it on in Settings to keep rating.': 'O esforço por série está desligado — liga-o nas Definições para continuares a avaliar.',
+ 'Week by week': 'Semana a semana',
+ 'Where the sets land': 'Onde caem as séries',
+ 'Most working sets belong close to failure without living there — half at the floor and half at the top average out to a healthy-looking middle.': 'A maioria das séries de trabalho fica perto da falha sem viver lá — metade no fundo e metade no topo dão uma média que só parece saudável.',
+ 'Average effort per workout': 'Esforço médio por treino',
+ 'A fuller dot means less left in the tank — the same weight at a lower {0} is progress the line alone does not show.': 'Um ponto mais cheio significa menos margem — o mesmo peso com um {0} mais baixo é progresso que a linha sozinha não mostra.',
}
diff --git a/frontend/src/locales/ru.js b/frontend/src/locales/ru.js
index a610e15..053171e 100644
--- a/frontend/src/locales/ru.js
+++ b/frontend/src/locales/ru.js
@@ -513,4 +513,22 @@ export default {
'Easy — warm-up territory': 'Легко — разминочная зона',
'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.': 'RIR считает повторения, оставшиеся в запасе; RPE читает то же усилие по 10-балльной шкале — то есть RPE ≈ 10 − RIR. Выберите ту, в которой вы уже думаете.',
'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.': 'Выделенная строка — это диапазон, в который попадает большинство рабочих подходов. Уже записанные подходы сохраняют свою шкалу, и больше это значение нигде не используется: прогрессия и расчётный 1ПМ не меняются.',
+ // --- effort in the stats ---
+ 'Effort': 'Усилие',
+ 'how close to failure': 'насколько близко к отказу',
+ 'by hard sets': 'по тяжёлым подходам',
+ 'Hard': 'Тяжёлые',
+ 'no hard sets': 'нет тяжёлых подходов',
+ 'No hard sets in this period': 'Нет тяжёлых подходов за этот период',
+ 'Every muscle group got at least one hard set in this period.': 'За этот период каждая группа мышц получила хотя бы один тяжёлый подход.',
+ 'No rated sets in this period.': 'Нет оценённых подходов за этот период.',
+ 'average effort': 'среднее усилие',
+ 'at {0} {1} or harder': 'при {0} {1} или тяжелее',
+ '{0} of {1} finished sets rated': 'оценено {0} из {1} выполненных подходов',
+ 'Effort per set is switched off — turn it on in Settings to keep rating.': 'Усилие в подходе выключено — включи его в настройках, чтобы продолжать оценивать.',
+ 'Week by week': 'Неделя за неделей',
+ 'Where the sets land': 'Куда попадают подходы',
+ 'Most working sets belong close to failure without living there — half at the floor and half at the top average out to a healthy-looking middle.': 'Большинство рабочих подходов должны идти близко к отказу, но не жить на нём — половина внизу и половина вверху дают среднее, которое лишь выглядит здоровым.',
+ 'Average effort per workout': 'Среднее усилие за тренировку',
+ 'A fuller dot means less left in the tank — the same weight at a lower {0} is progress the line alone does not show.': 'Более плотная точка означает меньше запаса — тот же вес при меньшем {0} это прогресс, которого одна линия не показывает.',
}
diff --git a/frontend/src/locales/tr.js b/frontend/src/locales/tr.js
index ee991c7..de694c2 100644
--- a/frontend/src/locales/tr.js
+++ b/frontend/src/locales/tr.js
@@ -513,4 +513,22 @@ export default {
'Easy — warm-up territory': 'Kolay — ısınma bölgesi',
'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.': 'RIR yedekte bıraktığın tekrarları sayar; RPE aynı eforu 10’luk ölçekte okur — yani RPE ≈ 10 − RIR. Zaten hangisiyle düşünüyorsan onu seç.',
'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.': 'Vurgulanan satır, çalışma setlerinin çoğunun denk geldiği yerdir. Daha önce kaydettiğin setler kendi ölçeğini korur ve bu değeri başka hiçbir şey okumaz — ilerleme ve tahmini 1RM etkilenmez.',
+ // --- effort in the stats ---
+ 'Effort': 'Zorluk',
+ 'how close to failure': 'tükenmeye ne kadar yakın',
+ 'by hard sets': 'zor setlere göre',
+ 'Hard': 'Zor',
+ 'no hard sets': 'zor set yok',
+ 'No hard sets in this period': 'Bu dönemde zor set yok',
+ 'Every muscle group got at least one hard set in this period.': 'Bu dönemde her kas grubu en az bir zor set aldı.',
+ 'No rated sets in this period.': 'Bu dönemde puanlanmış set yok.',
+ 'average effort': 'ortalama zorluk',
+ 'at {0} {1} or harder': '{0} {1} veya daha zor',
+ '{0} of {1} finished sets rated': '{1} tamamlanan setin {0} tanesi puanlandı',
+ 'Effort per set is switched off — turn it on in Settings to keep rating.': 'Set başına zorluk kapalı — puanlamaya devam etmek için Ayarlar’dan aç.',
+ 'Week by week': 'Hafta hafta',
+ 'Where the sets land': 'Setler nereye düşüyor',
+ 'Most working sets belong close to failure without living there — half at the floor and half at the top average out to a healthy-looking middle.': 'Çalışma setlerinin çoğu tükenmeye yakın olmalı ama orada yaşamamalı — yarısı en altta yarısı en üstte, ortalaması sağlıklı görünür.',
+ 'Average effort per workout': 'Antrenman başına ortalama zorluk',
+ 'A fuller dot means less left in the tank — the same weight at a lower {0} is progress the line alone does not show.': 'Daha dolu bir nokta depoda daha az kaldı demek — aynı ağırlığı daha düşük {0} ile kaldırmak, çizginin tek başına göstermediği bir ilerlemedir.',
}
diff --git a/frontend/src/locales/zh.js b/frontend/src/locales/zh.js
index 20d6b89..e9045ce 100644
--- a/frontend/src/locales/zh.js
+++ b/frontend/src/locales/zh.js
@@ -513,4 +513,22 @@ export default {
'Easy — warm-up territory': '轻松——热身区间',
'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.': 'RIR 数的是你还留了几次;RPE 把同样的吃力程度换成 10 分制来读——所以 RPE ≈ 10 − RIR。选你习惯的那一种。',
'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.': '高亮那一行是大多数正式组落在的位置。已经记录的组保留原来的标度,而且这个值不会被别处读取——进阶计划和预估 1RM 都不受影响。',
+ // --- effort in the stats ---
+ 'Effort': '强度',
+ 'how close to failure': '离力竭有多近',
+ 'by hard sets': '按硬组',
+ 'Hard': '硬组',
+ 'no hard sets': '没有硬组',
+ 'No hard sets in this period': '此期间没有硬组',
+ 'Every muscle group got at least one hard set in this period.': '此期间每个肌群都至少练了一个硬组。',
+ 'No rated sets in this period.': '此期间没有已评分的组。',
+ 'average effort': '平均强度',
+ 'at {0} {1} or harder': '{0} {1} 或更硬',
+ '{0} of {1} finished sets rated': '{1} 个已完成组中有 {0} 个已评分',
+ 'Effort per set is switched off — turn it on in Settings to keep rating.': '每组强度已关闭——在设置中打开即可继续评分。',
+ 'Week by week': '逐周变化',
+ 'Where the sets land': '组都落在哪里',
+ 'Most working sets belong close to failure without living there — half at the floor and half at the top average out to a healthy-looking middle.': '大多数正式组应该接近力竭,但不要一直待在那里——一半在最底、一半在最顶,平均下来只是看着健康。',
+ 'Average effort per workout': '每次训练的平均强度',
+ 'A fuller dot means less left in the tank — the same weight at a lower {0} is progress the line alone does not show.': '点越实,油箱里剩得越少——同样的重量配上更低的 {0},是曲线本身看不出的进步。',
}
diff --git a/frontend/src/views/Stats.jsx b/frontend/src/views/Stats.jsx
index 01897cc..f25b3cd 100644
--- a/frontend/src/views/Stats.jsx
+++ b/frontend/src/views/Stats.jsx
@@ -2,7 +2,7 @@ import { useState } from 'react'
import { useNavigate } from 'react-router-dom'
import { useStore } from '../store/useStore.js'
import { EXIDX } from '../lib/exercises.js'
-import { lastBW, streakWeeks, setLabel, modeOf } from '../lib/history.js'
+import { lastBW, streakWeeks, setLabel, modeOf, effortOf } from '../lib/history.js'
import { fmtNum, fmtDate, fmtVol, todayISO, weekKey } from '../lib/format.js'
import { t } from '../lib/i18n.js'
import { bwSheet, goalSheet, calendarSheet, workoutDetailSheet, WorkoutRow, bwDeltaColor } from '../sheets.jsx'
@@ -12,26 +12,41 @@ import Icon from '../components/Icon.jsx'
import BodyMap, { BodyMapLegend } from '../components/BodyMap.jsx'
import { loadOfWorkouts, rankOf, MUSCLE_NAME } from '../lib/muscles.js'
import { e1rmSeries, best1RM } from '../lib/onerm.js'
+import {
+ hasEffort, displayScale, scaleName, toScale, avgRir, effortSummary, effortWeeks,
+ effortHistogram, isHardSet, HARD_RIR
+} from '../lib/effort.js'
import { Button, Segmented, SelectRow } from '../components/ui.jsx'
// Which muscles the training in a window actually hit — and, the point of the card,
// which ones it keeps missing. Shading is relative within the window (lib/muscles.js).
function MuscleBalance({ S }) {
const [win, setWin] = useState(7)
+ const [hard, setHard] = useState(false)
const [sel, setSel] = useState(null)
const now = Date.now()
const inWin = S.workouts.filter(w =>
win === 0 ? true
: win === 7 ? weekKey(w.d) === weekKey(todayISO())
: (w.start || new Date(w.d).getTime()) > now - win * 86400000)
- const load = loadOfWorkouts(inWin)
+ // Counting only the sets taken near failure turns the map from "where did the volume go"
+ // into "where did the stimulus go" — a muscle can lead on sets and still never be trained
+ // hard. Offered only when the window holds ratings at all, since with none the hard map
+ // would just be empty and read as "you trained nothing".
+ const rated = inWin.some(w => w.entries.some(e => e.sets.some(s => s.done && isHardSet(s))))
+ const on = hard && rated
+ const load = loadOfWorkouts(inWin, on ? isHardSet : null)
const { worked, missed } = rankOf(load)
const top = worked.slice(0, 4)
const max = worked.length ? load[worked[0]] : 0
const sets = m => Math.round((load[m] || 0) * 10) / 10
return
{on ? t('No hard sets in this period') : t('Not trained in this period')}
{missed.map(m => {t(MUSCLE_NAME[m])})}
>}
{!missed.length && worked.length > 0 &&
-
{t('Every muscle group got some work in this period.')}
}
+
{on
+ ? t('Every muscle group got at least one hard set in this period.')
+ : t('Every muscle group got some work in this period.')}
}
> :
{t('No workouts in this period yet.')}
}
}
+// How hard the training was — the half of the picture a volume chart cannot show. Everything
+// is computed in RIR (lib/effort.js) and converted to whichever scale this profile reads.
+// Every number carries how much of the training it speaks for: rating is optional and off by
+// default, so a partly rated history is the normal case, and an average without its
+// denominator would quietly speak for sets that were never rated.
+function EffortCard({ S }) {
+ const [win, setWin] = useState(90)
+ const kind = displayScale(S)
+ const hd = scaleName(kind)
+ const sum = effortSummary(S, win)
+ const weeks = effortWeeks(S, win)
+ const hist = effortHistogram(S, win)
+ const maxBin = Math.max(1, ...hist.map(b => b.n))
+ // The week's set count rides along in the tooltip, because the pair is the reading:
+ // volume up with effort up is fatigue piling up, volume up with effort flat is adaptation.
+ const pts = weeks.map(w => ({ t: w.t, y: toScale(kind, w.rir), note: t('{0} sets', w.sets) }))
+ // Bins run hardest-first in both scales: RIR 0 and RPE 10 are the same set.
+ const binLabel = b => kind === 'rpe' ? (b.tail ? '≤ 6' : String(10 - b.rir)) : (b.tail ? b.rir + '+' : String(b.rir))
+
+ return
+ {t('Most working sets belong close to failure without living there — half at the floor and half at the top average out to a healthy-looking middle.')}
+
+ >}
+
+}
+
// Stats = the analytics hub: all charts, progress and history live here.
export default function Stats() {
const nav = useNavigate()
@@ -65,6 +137,9 @@ export default function Stats() {
const [exId, setExId] = useState(null)
const [exMetric, setExMetric] = useState('top')
const now = Date.now()
+ const anyEffort = hasEffort(S)
+ const kind = displayScale(S)
+ const hd = scaleName(kind)
const bwPts = S.bodyweight.filter(b => range === 0 || (b.t || new Date(b.d).getTime()) > now - range * 86400000)
.map(b => ({ t: b.t || new Date(b.d).getTime(), y: b.w, d: b.d }))
@@ -101,7 +176,23 @@ export default function Stats() {
const e1Pts = curEx ? e1rmSeries(S, curEx) : []
const e1Best = curEx ? best1RM(S, curEx) : null
const showE1 = e1Pts.length > 0
+ // Effort on this exercise, per session. It rides on the top-set curve as well as having a
+ // curve of its own, because the two only mean something together: the same weight moved
+ // with more left in the tank is progress a weight-only chart draws as a flat line.
+ const exRir = exPts.map(p => avgRir(p.sets))
+ const showEff = exRir.filter(v => v != null).length >= 3
+ const effPts = exPts.map((p, i) => (exRir[i] == null ? null : { t: p.t, y: toScale(kind, exRir[i]), d: p.d })).filter(Boolean)
const onE1 = showE1 && exMetric === 'e1rm'
+ const onEff = showEff && exMetric === 'effort'
+ const topPts = exPts.map((p, i) => ({
+ t: p.t, y: p.y, d: p.d,
+ // 0 RIR (nothing left) is a full dot, 4+ a faint one; unrated sessions keep the plain line.
+ m: exRir[i] == null ? null : 1 - Math.min(4, Math.max(0, exRir[i])) / 4,
+ note: exRir[i] == null ? undefined : hd + ' ' + fmtNum(toScale(kind, exRir[i]))
+ }))
+ const exOpts = [{ value: 'top', label: t('Top set') }]
+ if (showE1) exOpts.push({ value: 'e1rm', label: t('Est. 1RM') })
+ if (showEff) exOpts.push({ value: 'effort', label: t('Effort') })
return <>
{t('Stats')}
{t('Progress & history')}
@@ -120,6 +211,7 @@ export default function Stats() {