Plan: a day with one routine says "1 routine", and so does the toast after importing a one-routine plan file (QA copy)
The weekday header on the Plan screen and the toast after "Add to my plan" both formatted
their count with the plural key only, so a single routine read "1 routines". The singular
"{0} routine" has been in every pack all along — a routineCount helper next to exCount in
lib/format.js now picks the form, and the import sheet's own summary line uses it too instead
of spelling the choice out again. The toast needed a real singular string, "Added {0} routine
to your plan", added to all 14 packs; pt-BR overrides it like the plural, so the inherited
pt-PT set and its fingerprint are unchanged and only the override count moves to 645.
This commit is contained in:
1 parent
83b2a140d6
commit
d0c7d40a68
20 files changed
+137
-6
No files matched your search
@@ -3,7 +3,7 @@ import { useStore } from './store/useStore.js'
|
||||
import { useUI } from './store/useUI.js'
|
||||
import { EXDB, EXIDX, BODYPARTS, isCardio, isBodyweightEq, allExercises, equipmentOf, smOf, matchExercise, exOr } from './lib/exercises.js'
|
||||
import { activeProfile, exAvailable, ALL_EQUIPMENT, newProfile } from './lib/equipment.js'
|
||||
import { fmtDate, fmtNum, capWords, fmtVol, fmtDur, durPart, todayISO, isoOf, uid, exCount, DAYN, DAYS, weekOrder, weekStartOf, weekDayOffset, MONTHS_LONG, ACCENTS } from './lib/format.js'
|
||||
import { fmtDate, fmtNum, capWords, fmtVol, fmtDur, durPart, todayISO, isoOf, uid, exCount, routineCount, DAYN, DAYS, weekOrder, weekStartOf, weekDayOffset, MONTHS_LONG, ACCENTS } from './lib/format.js'
|
||||
import { lastEntryFor, bestWeightFor, bestWeightForEntry, buildSets, effectiveRoutineIds, workoutVolume, setsDone, setsDoneActive, setUnitsTotal, lastBW, supersetUnits, unitOf, setLabel, defaultConfig, cleanupSg, modeOf, effortOf, EFFORT, capEffort, stepEffort, isBw, isPerSide, sideReps, workSetsDone, applyIntensifierPlan, MAX_PLANNED_WARMUPS, NOTE_MAX } from './lib/history.js'
|
||||
import { usesBar, barWeightFor, defaultBarWeight, hasBarOverride } from './lib/bar.js'
|
||||
import { toScale, rirOf, EFFORT_PRESETS, effortColor } from './lib/effort.js'
|
||||
@@ -1517,13 +1517,13 @@ function PlanImport({ bundle, close }) {
|
||||
const apply = () => {
|
||||
update(s => mergePlan(s, bundle, { schedule }))
|
||||
close()
|
||||
toast(t('Added {0} routines to your plan', bundle.routineCount))
|
||||
toast(t(bundle.routineCount === 1 ? 'Added {0} routine to your plan' : 'Added {0} routines to your plan', bundle.routineCount))
|
||||
nav('/plan')
|
||||
}
|
||||
return <>
|
||||
<h3>{bundle.name ? t('Import “{0}”', bundle.name) : t('Import this plan')}</h3>
|
||||
<div className="muted small" style={{ marginBottom: 14 }}>
|
||||
{t(bundle.routineCount === 1 ? '{0} routine' : '{0} routines', bundle.routineCount)}
|
||||
{routineCount(bundle.routineCount)}
|
||||
{' · ' + exCount(bundle.exerciseCount)}
|
||||
{bundle.scheduledDays > 0
|
||||
? ' · ' + t(bundle.scheduledDays === 1 ? 'scheduled on {0} day' : 'scheduled on {0} days', bundle.scheduledDays)
|
||||
|
||||
Reference in new issue
Block a user