Skip to content

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.

Merge PR #365: i18n: three-form plurals, and the Russian forms (@dima-po)

Duarte Santosb47027ab610d
diff --cc frontend/src/lib/mobile.js
index 4b7e15261,ae1fcde46..a6905dffd
--- a/frontend/src/lib/mobile.js
+++ b/frontend/src/lib/mobile.js
@@@ -108,12 -108,10 +108,12 @@@ export function buildReminderNotificati
day.setDate(date.getDate() + offset)
const iso = isoOf(day)
if (completed.has(iso)) continue
- // A weekday can hold several routines; name them all, or fall back to a count.
- const dayRoutines = effectiveRoutineIds(state, iso).map(id => routines.find(x => x.id === id)).filter(Boolean)
+ // A weekday can hold several routines; name them all, or fall back to a count. Each day is
+ // asked as if it were today: a coach week's next session is due every day until it is done,
+ // so it is reminded every day (the app re-syncs these after every workout and on open).
+ const dayRoutines = effectiveRoutineIds(state, iso, iso).map(id => routines.find(x => x.id === id)).filter(Boolean)
if (!dayRoutines.length) continue
- const label = dayRoutines.length <= 2 ? dayRoutines.map(r => r.name).join(' + ') : t('{0} routines', dayRoutines.length)
+ const label = dayRoutines.length <= 2 ? dayRoutines.map(r => r.name).join(' + ') : tn('{0} routine', '{0} routines', dayRoutines.length)
const at = new Date(day)
at.setHours(hour, minute, 0, 0)
if (at <= now) continue
diff --cc frontend/src/locales/ru.js
index 080d166e5,e4de31e4a..b51b1da42
--- a/frontend/src/locales/ru.js
+++ b/frontend/src/locales/ru.js
@@@ -1670,29 -1619,52 +1626,77 @@@ export default
'Teal': 'Бирюзовый',
'Yellow': 'Жёлтый',
'Enter how long it took — at least 1 minute.': 'Укажите, сколько это длилось — не меньше 1 минуты.',
+ 'Coach week': 'Неделя тренера',
+ // Rotation (lib/rotation.js) — an in-app alternative to the weekday plan.
+ 'Rotation': 'Ротация',
+ 'Fixed Week': 'Фиксированная неделя',
+ 'Scheduling': 'Расписание',
+ 'Externally managed': 'Управляется извне',
+ 'Position {0}': 'Позиция {0}',
+ 'Add routine to the rotation': 'Добавить программу в ротацию',
+ 'Add to the rotation': 'Добавить в ротацию',
+ 'Build a rotation instead': 'Создать ротацию вместо этого',
+ 'No rotation yet. Add routines in the order you want to train them — the first one you have not logged stays next.': 'Ротации пока нет. Добавляй программы в том порядке, в котором хочешь их тренировать — первая незалогированная всегда следующая.',
+ 'Use this rotation': 'Использовать эту ротацию',
+ 'Use this rotation?': 'Использовать эту ротацию?',
+ 'Your coach gives up control of this week: openGym owns the queue from here on and repeats these sessions by itself once they are all done. A new week from the coach’s app would replace this rotation.': 'Твой тренер отказывается от контроля над этой неделей: очередь с этого момента принадлежит openGym, который сам повторяет эти сессии, как только они все завершены. Новая неделя из приложения тренера заменит эту ротацию.',
+ 'Start new pass': 'Начать новый проход',
+ 'Start pass': 'Начать проход',
+ 'This rotation could not be read — it may have been written by another device.': 'Не удалось прочитать эту ротацию — возможно, она была записана с другого устройства.',
+ 'Discard it': 'Отменить её',
+ 'Switch to Fixed Week?': 'Переключиться на фиксированную неделю?',
+ 'The rotation stops and its current pass is dropped. Your weekday plan is untouched, and the sequence is kept so you can start a new pass later.': 'Ротация останавливается, и текущий проход отменяется. Твой недельный план остаётся нетронутым, а последовательность сохраняется, чтобы позже начать новый проход.',
+ 'Use Fixed Week': 'Использовать фиксированную неделю',
+ 'No rotation yet — add routines to it in Plan.': 'Ротации пока нет — добавь программы в разделе «План».',
+ 'Set up in Plan': 'Настроить в Плане',
+ 'Pass complete': 'Проход завершён',
+ 'Next pass starts {0}': 'Следующий проход начнётся {0}',
+ // --- plural forms, read by tn(). Russian needs three where English has two, so these
+ // --- keys answer with the forms instead of one string. The key stays the English plural.
+ '{0} exercises': { one: '{0} упражнение', few: '{0} упражнения', many: '{0} упражнений' },
+ '{0} routines': { one: '{0} программа', few: '{0} программы', many: '{0} программ' },
+ '{0} changes': { one: '{0} изменение', few: '{0} изменения', many: '{0} изменений' },
+ '{0} changes applied': { one: 'Применено {0} изменение', few: 'Применено {0} изменения', many: 'Применено {0} изменений' },
+ '{0} sets · {1} work': { one: '{0} подход · {1} рабочих', few: '{0} подхода · {1} рабочих', many: '{0} подходов · {1} рабочих' },
+ '{0} workouts': { one: '{0} тренировка', few: '{0} тренировки', many: '{0} тренировок' },
+ '{0} workouts total': { one: 'всего {0} тренировка', few: 'всего {0} тренировки', many: 'всего {0} тренировок' },
+ '{0} sessions': { one: '{0} сессия', few: '{0} сессии', many: '{0} сессий' },
+ '{0} weigh-ins': { one: '{0} взвешивание', few: '{0} взвешивания', many: '{0} взвешиваний' },
+ '{0} suggestions': { one: '{0} предложение', few: '{0} предложения', many: '{0} предложений' },
+ '{0} days a week': { one: '{0} день в неделю', few: '{0} дня в неделю', many: '{0} дней в неделю' },
+ '{0} passkeys': { one: '{0} ключ доступа', few: '{0} ключа доступа', many: '{0} ключей доступа' },
+ '{0} photos or videos': { one: '{0} фото или видео', few: '{0} фото или видео', many: '{0} фото или видео' },
+ '{0} files could not be included': { one: '{0} файл не удалось включить', few: '{0} файла не удалось включить', many: '{0} файлов не удалось включить' },
+ 'scheduled on {0} days': { one: 'запланировано на {0} день', few: 'запланировано на {0} дня', many: 'запланировано на {0} дней' },
+ 'Added {0} routines to your plan': { one: 'В план добавлена {0} программа', few: 'В план добавлено {0} программы', many: 'В план добавлено {0} программ' },
+ 'Applied {0} changes to your plan.': { one: 'В план внесено {0} изменение.', few: 'В план внесено {0} изменения.', many: 'В план внесено {0} изменений.' },
+ 'Apply {0} changes': { one: 'Применить {0} изменение', few: 'Применить {0} изменения', many: 'Применить {0} изменений' },
+ '{0} sets still unchecked. Finish the workout now?': { one: 'Не отмечен {0} подход. Завершить тренировку?', few: 'Не отмечено {0} подхода. Завершить тренировку?', many: 'Не отмечено {0} подходов. Завершить тренировку?' },
+ '{0} photos or videos have not reached your server yet.': { one: '{0} фото или видео ещё не дошло до вашего сервера.', few: '{0} фото или видео ещё не дошли до вашего сервера.', many: '{0} фото или видео ещё не дошли до вашего сервера.' },
+ 'Its {0} photos or videos are deleted with it.': { one: 'Вместе с ней удалится {0} фото или видео.', few: 'Вместе с ней удалятся {0} фото или видео.', many: 'Вместе с ней удалятся {0} фото или видео.' },
+ 'Its {0} photos or videos move to the new workout.': { one: 'Её {0} фото или видео перейдёт к новой тренировке.', few: 'Её {0} фото или видео перейдут к новой тренировке.', many: 'Её {0} фото или видео перейдут к новой тренировке.' },
+ // --- singular strings kept for pack parity: tn() reads the plural key, but every other
+ // --- pack still carries these and check-locales.mjs compares the union of all packs.
+ '{0} exercise': 'Упражнение: {0}',
+ '{0} workout': 'Тренировок: {0}',
+ '{0} set still unchecked. Finish the workout now?': 'Не отмечен {0} подход. Завершить сейчас?',
+ '{0} workout total': 'всего тренировок: {0}',
+ '1 passkey': '1 ключ доступа',
+ '{0} routine': 'Программа: {0}',
+ 'scheduled on {0} day': 'запланировано на {0} день',
+ 'Added {0} routine to your plan': 'В твой план добавлена {0} программа',
+ '{0} session': '{0} сессия',
+ '1 day a week': '1 день в неделю',
+ 'Applied {0} change to your plan.': 'В план внесено {0} изменение.',
+ '{0} change applied': '{0} изменение применено',
+ '{0} suggestion': '{0} предложение',
+ 'Apply {0} change': 'Применить {0} изменение',
+ '{0} change': '{0} изменение',
+ '{0} weigh-in': 'Взвешиваний: {0}',
+ '{0} set · {1} work': '{0} подход · рабочих: {1}',
+ '{0} file could not be included': 'Не удалось добавить {0} файл',
+ '{0} photo or video has not reached your server yet.': 'Фото или видео, ещё не попавшее на ваш сервер: {0}.',
+ '{0} photo or video': 'Фото или видео: {0}',
+ 'Its photo or video is deleted with it.': 'Фото или видео тоже будет удалено.',
+ 'Its photo or video moves to the new workout.': 'Фото или видео перейдёт в новую тренировку.',
}
diff --cc frontend/src/views/Home.jsx
index 21e115bf8,479600b56..fef599f20
--- a/frontend/src/views/Home.jsx
+++ b/frontend/src/views/Home.jsx
@@@ -2,8 -2,8 +2,8 @@@ import { useState } from 'react
import { useNavigate } from 'react-router-dom'
import { useStore } from '../store/useStore.js'
import { effectiveRoutines, effectiveRoutineIds, nextTrainingDay, streakWeeks, lastBW, setsDoneActive } from '../lib/history.js'
-import { fmtNum, fmtDate, todayISO, isoOf, weekKey, weekStartOf, weekDayOffset, DAYS, DAYN } from '../lib/format.js'
+import { fmtNum, fmtDate, todayISO, isoOf, weekStartOf, weekDayOffset, DAYS, DAYN } from '../lib/format.js'
- import { t, dateLocale } from '../lib/i18n.js'
+ import { t, tn, dateLocale } from '../lib/i18n.js'
import { bwSheet, goalSheet, dayOverrideSheet, calendarSheet, startFlow, starterPlanSheet, bwDeltaColor, weighInsSheet } from '../sheets.jsx'
import LineChart from '../components/LineChart.jsx'
import Icon from '../components/Icon.jsx'
@@@ -218,7 -185,7 +218,7 @@@ export default function Home()
<Icon name="flame" style={{ color: 'var(--orange)' }} />
{t('{0} week streak', streakWeeks(S))}
</div>
- <div className="muted small" style={{ marginTop: 2 }}>{doneThisWeek}{plannedPerWeek ? ' / ' + plannedPerWeek : ''} {t('this week')} · {t(S.workouts.length === 1 ? '{0} workout total' : '{0} workouts total', S.workouts.length)}</div>
- <div className="muted small" style={{ marginTop: 2 }}>{wThisWeek}{plannedPerWeek ? ' / ' + plannedPerWeek : ''} {t('this week')} · {tn('{0} workout total', '{0} workouts total', S.workouts.length)}</div>
++ <div className="muted small" style={{ marginTop: 2 }}>{doneThisWeek}{plannedPerWeek ? ' / ' + plannedPerWeek : ''} {t('this week')} · {tn('{0} workout total', '{0} workouts total', S.workouts.length)}</div>
</div>
<Icon name="calendar" className="chev" style={{ fontSize: 20 }} />
</div>