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.

Watch app: speaks the app's language, asks for the weigh-in, easy weight and reps, a logo complication

Duarte Santos7021a817eb79
diff --git a/.github/workflows/ios.yml b/.github/workflows/ios.yml
index efcb25e66..dac880ea5 100644
--- a/.github/workflows/ios.yml
+++ b/.github/workflows/ios.yml
@@ -146,11 +146,17 @@ jobs:
sleep 6
xcrun simctl io "$UDID" screenshot "build/watch/$size-$file.png" >/dev/null
}
- for screen in idle empty set warmup weight rest hold bodyweight side superset offline finish summary summary-end ended; do
+ for screen in idle empty set warmup edit-weight edit-reps weighin rest hold bodyweight side superset offline finish summary summary-end ended; do
shot "$screen" "$screen"
done
+ # The app's language, not the watch's (the phone in German here); every optional thing
+ # on (Settings → Apple Watch); the rest as the countdown alone.
+ shot "lang-de" set -OpenGymWatchLang de
+ shot "lang-de-rest" rest -OpenGymWatchLang de
+ shot "show-all" set -OpenGymWatchShow all
+ shot "rest-plain" rest -OpenGymWatchShow plain
# The largest text size (accessibility XXXL) on the screens with the most on them.
- for screen in set side rest hold summary summary-end; do
+ for screen in set side edit-weight weighin rest hold summary summary-end; do
shot "ax-$screen" "$screen" -OpenGymWatchAX
done
# What each screen costs: the app's CPU time over 20 s once it is up (the simulator's
diff --git a/frontend/ios/App/Watch/OpenGymWatchApp.swift b/frontend/ios/App/Watch/OpenGymWatchApp.swift
index 33d783aeb..905d303a1 100644
--- a/frontend/ios/App/Watch/OpenGymWatchApp.swift
+++ b/frontend/ios/App/Watch/OpenGymWatchApp.swift
@@ -85,7 +85,9 @@ struct RootView: View {
var body: some View {
Group {
- if let summary = store.summary {
+ if store.weighInFor != nil {
+ WeighInView()
+ } else if let summary = store.summary {
SummaryView(summary: summary)
} else if store.workout == nil {
IdleView()
@@ -97,6 +99,9 @@ struct RootView: View {
ExercisePager()
}
}
+ // The app's language, as the phone sends it, not the watch's own (SwiftUI looks every
+ // Text's words up by this locale).
+ .environment(\.locale, store.locale)
// Any touch: the rest-over alarm was noticed (it would tap once more otherwise).
.simultaneousGesture(TapGesture().onEnded { store.ackRestOver() })
// The complication's Start: today's workout, when none runs yet.
@@ -238,9 +243,10 @@ struct IdleView: View {
}
} else {
VStack(spacing: 10) {
- Image(systemName: "dumbbell.fill")
- .font(.system(size: 34, weight: .semibold))
- .foregroundStyle(.secondary)
+ OpenGymLogo()
+ .fill(Theme.accent)
+ .frame(width: 60, height: 30)
+ .accessibilityHidden(true)
Text("No workout running")
.font(.headline)
.multilineTextAlignment(.center)
@@ -271,18 +277,27 @@ struct ExercisePager: View {
}
}
-enum CrownTarget { case reps, weight }
+/// What a tap on a number opens for editing.
+enum EditField: String, Identifiable {
+ case weight, reps, seconds
+ var id: String { rawValue }
+}
+/*
+ * One exercise, one set up next. The numbers are two big tiles (weight, reps); a tap on one opens
+ * it on a screen of its own, where the Digital Crown turns only that value, in the exercise's own
+ * steps with a tap of the crown at each, and − and + do the same by hand. On this page the crown
+ * belongs to the pages (the next exercise), as in Apple's Workout app.
+ */
struct ExercisePage: View {
@EnvironmentObject var store: SessionStore
let index: Int
- @State private var target: CrownTarget = .reps
+ @State private var editing: EditField?
@State private var confirmSkip = false
- @FocusState private var crownFocus: Bool
@Environment(\.dynamicTypeSize) private var typeSize
@ScaledMetric(relativeTo: .title) private var doneSizeScaled: CGFloat = 58
/// Large enough to hit, small enough to leave room for the numbers at the largest text sizes.
- private var doneSize: CGFloat { min(doneSizeScaled, typeSize.isAccessibilitySize ? 56 : 70) }
+ private var doneSize: CGFloat { min(doneSizeScaled, typeSize.isAccessibilitySize ? 56 : 66) }
var body: some View {
if let w = store.workout, w.entries.indices.contains(index) {
@@ -302,25 +317,23 @@ struct ExercisePage: View {
.multilineTextAlignment(.center)
.minimumScaleFactor(0.7)
} else if entry.isTimed {
- SecondsView(seconds: current ? store.seconds : (row.sec ?? 0))
- .focusable(current)
- .focused($crownFocus)
- .digitalCrownRotation(secondsBinding, from: 5, through: 600, by: 5, sensitivity: .low,
- isContinuous: false, isHapticFeedbackEnabled: true)
+ ValueTile(value: formatNumber(current ? store.seconds : (row.sec ?? 0)), unit: "s", label: Text("Hold"),
+ tint: .white, large: true) { if current { editing = .seconds } }
} else {
- let side = row.sideUp.flatMap { row.sides?[$0] }
- NumbersView(weight: current ? store.weight : (side?.w ?? row.w ?? 0),
- reps: current ? store.reps : (side?.r ?? row.r ?? 0),
- unit: w.unit, warmup: row.warmup, bodyweight: entry.isBodyweight, target: $target)
- .focusable(current)
- .focused($crownFocus)
- .digitalCrownRotation(crownBinding, from: 0, through: target == .weight ? 500 : 100,
- by: target == .weight ? store.weightStep : 1, sensitivity: .low,
- isContinuous: false, isHapticFeedbackEnabled: true)
+ numbers(entry, row, unit: w.unit, current: current)
+ }
+ if store.show.showLast, let last = entry.last, !last.isEmpty {
+ Text("Last time: \(last)")
+ .font(.system(size: 11))
+ .foregroundStyle(.secondary)
+ .lineLimit(1)
+ .minimumScaleFactor(0.7)
+ .padding(.top, 1)
+ .dynamicTypeSize(...DynamicTypeSize.large)
}
Spacer(minLength: 2)
primaryButton(entry, current: current)
- Spacer(minLength: 4)
+ Spacer(minLength: 3)
SetDots(entry: entry, current: si, skipped: { store.isSkipped(entry.id, $0) }) { store.pick(set: $0, in: index) }
} else {
let left = entry.sets.contains { !$0.done }
@@ -338,15 +351,16 @@ struct ExercisePage: View {
}
}
.padding(.horizontal, 4)
- // The set's layout is fixed (crown, Done, dots on one screen): text grows up to a size
+ // The set's layout is fixed (numbers, Done, dots on one screen): text grows up to a size
// that still fits on 41 mm; the start screen and the summary scroll and grow all the way.
.dynamicTypeSize(...DynamicTypeSize.accessibility1)
.onAppear {
- if SessionStore.demoScreen == "weight" || store.crownStartsOnWeight { target = .weight }
- if entry.isBodyweight && !store.crownStartsOnWeight { target = .reps }
- if current { crownFocus = true }
+ if current, SessionStore.demoScreen == "edit-weight" { editing = .weight }
+ if current, SessionStore.demoScreen == "edit-reps" { editing = .reps }
+ }
+ .sheet(item: $editing) { field in
+ ValueEditor(field: field, entry: entry, unit: w.unit)
}
- .onChange(of: store.entryIndex) { ei in if ei == index { crownFocus = true } }
.confirmationDialog(Text("Skip this set?"), isPresented: $confirmSkip) {
Button("Skip set") { store.skipSet() }
Button("Cancel", role: .cancel) {}
@@ -354,20 +368,54 @@ struct ExercisePage: View {
}
}
+ /// Weight × reps as two tiles; a bodyweight set: the reps big, the added weight small.
+ @ViewBuilder private func numbers(_ entry: Entry, _ row: SetRow, unit: String, current: Bool) -> some View {
+ let side = row.sideUp.flatMap { row.sides?[$0] }
+ let weight = current ? store.weight : (side?.w ?? row.w ?? 0)
+ let reps = current ? store.reps : (side?.r ?? row.r ?? 0)
+ let tint = row.warmup ? Theme.warmup : Color.white
+ if entry.isBodyweight {
+ VStack(spacing: 3) {
+ ValueTile(value: formatNumber(reps), unit: nil, label: Text("Reps"), tint: tint, large: true) { if current { editing = .reps } }
+ Button { if current { editing = .weight } } label: {
+ Group {
+ if weight > 0 { Text(verbatim: "+\(formatNumber(weight)) \(unit)") } else { Text("Bodyweight") }
+ }
+ .font(.caption2.weight(.semibold))
+ .foregroundStyle(.secondary)
+ .padding(.horizontal, 8)
+ .frame(minHeight: 22)
+ .background(Capsule().fill(Theme.dim))
+ }
+ .buttonStyle(.plain)
+ .accessibilityLabel(weight > 0 ? Text(verbatim: "+\(formatNumber(weight)) \(unit)") : Text("Bodyweight"))
+ .accessibilityHint(Text("Tap to change it."))
+ }
+ } else {
+ HStack(spacing: 5) {
+ ValueTile(value: formatNumber(weight), unit: unit, label: Text("Weight"), tint: tint) { if current { editing = .weight } }
+ ValueTile(value: formatNumber(reps), unit: nil, label: Text("Reps"), tint: tint) { if current { editing = .reps } }
+ }
+ }
+ }
+
@ViewBuilder private func header(_ entry: Entry) -> some View {
HStack(alignment: .top, spacing: 6) {
- if let clip = store.clips[entry.id] {
+ if store.show.showClip, let clip = store.clips[entry.id] {
ClipView(clip: clip, animating: index == store.entryIndex).frame(width: 30, height: 30)
}
- Text(entry.name)
- .font(.system(.footnote, design: .rounded).weight(.semibold))
- // One line at the large sizes (shrunk to fit): two would push the page up into the clock.
- .lineLimit(typeSize.isAccessibilitySize ? 1 : 2)
- .minimumScaleFactor(typeSize.isAccessibilitySize ? 0.6 : 0.8)
- .fixedSize(horizontal: false, vertical: true)
- .frame(maxWidth: .infinity, alignment: .leading)
+ VStack(alignment: .leading, spacing: 0) {
+ Text(entry.name)
+ .font(.system(.footnote, design: .rounded).weight(.semibold))
+ // One line at the large sizes (shrunk to fit): two would push the page up into the clock.
+ .lineLimit(typeSize.isAccessibilitySize ? 1 : 2)
+ .minimumScaleFactor(typeSize.isAccessibilitySize ? 0.6 : 0.8)
+ .fixedSize(horizontal: false, vertical: true)
+ WorkoutExtras()
+ }
+ .frame(maxWidth: .infinity, alignment: .leading)
OfflineSign()
- HeartRateBadge(health: store.health)
+ if store.show.showHr { HeartRateBadge(health: store.health) }
}
// The top row sits just under the clock: it grows less than the numbers do.
.dynamicTypeSize(...DynamicTypeSize.xLarge)
@@ -383,6 +431,7 @@ struct ExercisePage: View {
if side == "R" { Tag(text: Text("Right"), color: .cyan) }
if entry.group != nil { Tag(text: Text("Superset"), color: .purple) }
}
+ .padding(.bottom, 2)
.dynamicTypeSize(...DynamicTypeSize.xLarge)
}
}
@@ -404,140 +453,256 @@ struct ExercisePage: View {
.simultaneousGesture(LongPressGesture(minimumDuration: 0.8).onEnded { _ in if current { confirmSkip = true } })
.accessibilityAction(named: Text("Skip set")) { store.skipSet() }
}
+}
+
+/// The time so far and the calories, under the exercise's name, when the phone says to show them.
+struct WorkoutExtras: View {
+ @EnvironmentObject var store: SessionStore
- private var crownBinding: Binding<Double> {
- Binding(
- get: { target == .weight ? store.weight : store.reps },
- set: { v in
- guard index == store.entryIndex else { return }
- if target == .weight { store.weight = max(0, v) } else { store.reps = max(0, v.rounded()) }
+ var body: some View {
+ let show = store.show
+ if show.showElapsed || show.showKcal {
+ HStack(spacing: 6) {
+ if show.showElapsed, let start = store.workoutStart {
+ Text(timerInterval: start...Date.distantFuture, countsDown: false)
+ .monospacedDigit()
+ }
+ if show.showKcal { CaloriesText(health: store.health) }
}
- )
+ .font(.system(size: 11, weight: .medium, design: .rounded))
+ .foregroundStyle(Theme.warmup)
+ .lineLimit(1)
+ }
}
+}
- private var secondsBinding: Binding<Double> {
- Binding(
- get: { store.seconds },
- set: { v in
- guard index == store.entryIndex else { return }
- store.seconds = max(5, (v / 5).rounded() * 5)
+/// The workout's active calories so far, redrawn only when they change (WorkoutManager throttles).
+struct CaloriesText: View {
+ @ObservedObject var health: WorkoutManager
+
+ var body: some View {
+ if let kcal = health.calories { Text(verbatim: "\(Int(kcal)) kcal") }
+ }
+}
+
+/// A number you can tap to change: big, in a soft rounded tile so it reads as a control, its unit
+/// small beside it and what it is in words under it.
+struct ValueTile: View {
+ let value: String
+ let unit: String?
+ let label: Text
+ var tint: Color = .white
+ var large = false
+ let tap: () -> Void
+ @ScaledMetric(relativeTo: .largeTitle) private var size: CGFloat = 30
+ @ScaledMetric(relativeTo: .largeTitle) private var largeSize: CGFloat = 38
+
+ var body: some View {
+ Button(action: tap) {
+ VStack(spacing: 0) {
+ HStack(alignment: .firstTextBaseline, spacing: 2) {
+ Text(verbatim: value)
+ .font(.system(size: large ? largeSize : size, weight: .semibold, design: .rounded).monospacedDigit())
+ if let u = unit {
+ Text(verbatim: u).font(.system(size: 12, weight: .medium, design: .rounded)).foregroundStyle(.secondary)
+ }
+ }
+ .lineLimit(1)
+ .minimumScaleFactor(0.5)
+ label.font(.system(size: 10, weight: .medium)).foregroundStyle(.secondary).lineLimit(1)
+ .dynamicTypeSize(...DynamicTypeSize.large)
}
- )
+ .foregroundStyle(tint)
+ .frame(maxWidth: .infinity, minHeight: Theme.tap)
+ .padding(.vertical, 3)
+ .background(RoundedRectangle(cornerRadius: 12, style: .continuous).fill(Theme.dim))
+ }
+ .buttonStyle(.plain)
+ // VoiceOver: "Weight, 62.5 kg, button: tap to change it".
+ .accessibilityElement(children: .ignore)
+ .accessibilityLabel(label)
+ .accessibilityValue(Text(verbatim: unit.map { "\(value) \($0)" } ?? value))
+ .accessibilityHint(Text("Tap to change it."))
+ .accessibilityAddTraits(.isButton)
}
}
-/// Weight × reps in big rounded numerals. The one the crown turns carries the crown symbol under
-/// it; a tap on the other hands the crown to that one. A bodyweight set shows the reps, and the
-/// added weight small ("+5 kg") or "Bodyweight". A warm-up is in orange.
-struct NumbersView: View {
+/*
+ * One value on a screen of its own, like setting a timer in Apple's apps: the value huge in the
+ * middle in the accent colour (so it is clear what changes), − and + either side, the Digital
+ * Crown turning it in the exercise's own steps (a tap of the crown at each), Done at the bottom.
+ */
+struct ValueEditor: View {
@EnvironmentObject var store: SessionStore
- @ScaledMetric(relativeTo: .largeTitle) private var size: CGFloat = 32
- let weight: Double
- let reps: Double
+ @Environment(\.dismiss) private var dismiss
+ let field: EditField
+ let entry: Entry
let unit: String
- let warmup: Bool
- var bodyweight = false
- @Binding var target: CrownTarget
+ @State private var value: Double = 0
+ @FocusState private var focused: Bool
+ @ScaledMetric(relativeTo: .largeTitle) private var size: CGFloat = 46
+
+ private var step: Double {
+ switch field {
+ case .weight: return entry.step.flatMap { $0 > 0 ? $0 : nil } ?? store.weightStep
+ case .reps: return 1
+ case .seconds: return 5
+ }
+ }
+ private var range: ClosedRange<Double> {
+ switch field {
+ case .weight: return 0...(unit == "lb" ? 1500 : 700)
+ case .reps: return 0...200
+ case .seconds: return 5...3600
+ }
+ }
+ private var title: Text {
+ switch field {
+ case .weight: return entry.isBodyweight ? Text("Added weight") : Text("Weight")
+ case .reps: return Text("Reps")
+ case .seconds: return Text("Hold")
+ }
+ }
+ private var suffix: String? {
+ switch field {
+ case .weight: return unit
+ case .reps: return nil
+ case .seconds: return "s"
+ }
+ }
var body: some View {
- Group {
- if bodyweight {
+ VStack(spacing: 4) {
+ title.font(.caption.weight(.semibold)).foregroundStyle(.secondary)
+ HStack(spacing: 6) {
+ stepButton("minus", Text("Less")) { nudge(-step) }
VStack(spacing: 0) {
- value(formatNumber(reps), suffix: nil, active: target == .reps, label: Text("Reps")) { target = .reps }
- Button { target = .weight } label: {
- HStack(spacing: 2) {
- if weight > 0 {
- Text(verbatim: "+\(formatNumber(weight)) \(unit)")
- } else {
- Text("Bodyweight")
- }
- Image(systemName: "digitalcrown.arrow.clockwise.fill").font(.system(size: 8)).opacity(target == .weight ? 1 : 0)
- }
- .font(.caption2.weight(.medium))
- .foregroundStyle(.secondary)
- .frame(minHeight: 24)
+ HStack(alignment: .firstTextBaseline, spacing: 2) {
+ Text(verbatim: formatNumber(value))
+ .font(.system(size: size, weight: .semibold, design: .rounded).monospacedDigit())
+ .foregroundStyle(Theme.accent)
+ .contentTransition(.numericText())
+ if let s = suffix { Text(verbatim: s).font(.system(size: 13, weight: .medium, design: .rounded)).foregroundStyle(.secondary) }
}
- .buttonStyle(.plain)
- .accessibilityLabel(weight > 0 ? Text(verbatim: "+\(formatNumber(weight)) \(unit)") : Text("Bodyweight"))
- .accessibilityHint(Text("Turn the Digital Crown to change it."))
- }
- } else {
- HStack(alignment: .firstTextBaseline, spacing: 4) {
- value(formatNumber(weight), suffix: unit, active: target == .weight, label: Text("Weight")) { target = .weight }
- Text(verbatim: "×").font(.system(size: 18, weight: .medium, design: .rounded)).foregroundStyle(.secondary)
+ .lineLimit(1)
+ .minimumScaleFactor(0.4)
+ Image(systemName: "digitalcrown.arrow.clockwise.fill").font(.system(size: 10)).foregroundStyle(.secondary)
.accessibilityHidden(true)
- value(formatNumber(reps), suffix: nil, active: target == .reps, label: Text("Reps")) { target = .reps }
}
+ .frame(maxWidth: .infinity)
+ .focusable()
+ .focused($focused)
+ .digitalCrownRotation($value, from: range.lowerBound, through: range.upperBound, by: step,
+ sensitivity: field == .weight ? DigitalCrownRotationalSensitivity.medium : DigitalCrownRotationalSensitivity.low, isContinuous: false, isHapticFeedbackEnabled: true)
+ .accessibilityElement(children: .ignore)
+ .accessibilityLabel(title)
+ .accessibilityValue(Text(verbatim: suffix.map { "\(formatNumber(value)) \($0)" } ?? formatNumber(value)))
+ .accessibilityAdjustableAction { d in
+ switch d {
+ case .increment: nudge(step)
+ case .decrement: nudge(-step)
+ @unknown default: break
+ }
+ }
+ stepButton("plus", Text("More")) { nudge(step) }
}
+ if field == .weight {
+ Text(verbatim: "± \(formatNumber(step)) \(unit)").font(.system(size: 10)).foregroundStyle(.secondary)
+ }
+ Spacer(minLength: 2)
+ Button { save(); dismiss() } label: {
+ Text("Done").font(.body.weight(.semibold)).frame(maxWidth: .infinity, minHeight: Theme.tap)
+ }
+ .tint(Theme.accent)
+ }
+ .padding(.horizontal, 2)
+ .dynamicTypeSize(...DynamicTypeSize.accessibility1)
+ .onAppear {
+ switch field {
+ case .weight: value = store.weight
+ case .reps: value = store.reps
+ case .seconds: value = store.seconds
+ }
+ focused = true
}
- .lineLimit(1)
- .minimumScaleFactor(0.5)
- .foregroundStyle(warmup ? Theme.warmup : Color.white)
+ .onDisappear { save() }
}
- private func value(_ text: String, suffix: String?, active: Bool, label: Text, tap: @escaping () -> Void) -> some View {
- VStack(spacing: 0) {
- HStack(alignment: .firstTextBaseline, spacing: 2) {
- Text(verbatim: text).font(.system(size: size, weight: .semibold, design: .rounded).monospacedDigit())
- if let s = suffix { Text(verbatim: s).font(.system(size: 12, weight: .medium, design: .rounded)).foregroundStyle(.secondary) }
- }
- Image(systemName: "digitalcrown.arrow.clockwise.fill")
- .font(.system(size: 9))
- .foregroundStyle(.secondary)
- .opacity(active ? 1 : 0)
+ private func nudge(_ d: Double) {
+ // On the step's grid, so + and − land on the same numbers the crown does.
+ let next = ((value + d) / step).rounded() * step
+ value = min(range.upperBound, max(range.lowerBound, next))
+ WKInterfaceDevice.current().play(.click)
+ }
+
+ private func save() {
+ switch field {
+ case .weight: store.weight = max(0, value)
+ case .reps: store.reps = max(0, value.rounded())
+ case .seconds: store.seconds = max(5, value)
}
- .padding(.horizontal, 4)
- .frame(minHeight: Theme.tap)
- .contentShape(Rectangle())
- .onTapGesture(perform: tap)
- // VoiceOver: "Weight, 62.5 kg", swipe up or down to change it, as the crown does.
- .accessibilityElement(children: .ignore)
- .accessibilityLabel(label)
- .accessibilityValue(Text(verbatim: suffix.map { "\(text) \($0)" } ?? text))
- .accessibilityHint(Text("Turn the Digital Crown to change it."))
- .accessibilityAddTraits(active ? .isSelected : [])
- .accessibilityAdjustableAction { direction in
- let isWeight = suffix != nil
- let step = isWeight ? store.weightStep : 1
- let d: Double
- switch direction {
- case .increment: d = step
- case .decrement: d = -step
- @unknown default: d = 0
- }
- if isWeight { store.weight = max(0, store.weight + d) } else { store.reps = max(0, store.reps + d) }
+ }
+
+ private func stepButton(_ symbol: String, _ label: Text, _ action: @escaping () -> Void) -> some View {
+ Button(action: action) {
+ Image(systemName: symbol)
+ .font(.system(size: 18, weight: .bold))
+ .foregroundStyle(.white)
+ .frame(width: 40, height: 40)
+ .background(Circle().fill(Theme.dim))
}
+ .buttonStyle(.plain)
+ .accessibilityLabel(label)
}
}
-/// A hold's seconds, before it starts: big, the crown turns them in fives.
-struct SecondsView: View {
+/// The weigh-in before a workout started here, as the phone asks for it: the body weight on the
+/// crown (in tenths), Save and start, or start without.
+struct WeighInView: View {
@EnvironmentObject var store: SessionStore
- @ScaledMetric(relativeTo: .largeTitle) private var size: CGFloat = 36
- let seconds: Double
+ @FocusState private var focused: Bool
+ @ScaledMetric(relativeTo: .largeTitle) private var size: CGFloat = 40
var body: some View {
- VStack(spacing: 0) {
- HStack(alignment: .firstTextBaseline, spacing: 2) {
- Text(verbatim: formatNumber(seconds)).font(.system(size: size, weight: .semibold, design: .rounded).monospacedDigit())
- Text(verbatim: "s").font(.system(size: 13, weight: .medium, design: .rounded)).foregroundStyle(.secondary)
- }
- .lineLimit(1)
- .minimumScaleFactor(0.5)
- Image(systemName: "digitalcrown.arrow.clockwise.fill").font(.system(size: 9)).foregroundStyle(.secondary)
- }
- .frame(minHeight: Theme.tap)
- .accessibilityElement(children: .ignore)
- .accessibilityLabel(Text("Hold"))
- .accessibilityValue(Text(Duration.seconds(seconds), format: .units(allowed: [.minutes, .seconds], width: .wide)))
- .accessibilityHint(Text("Turn the Digital Crown to change it."))
- .accessibilityAdjustableAction { direction in
- switch direction {
- case .increment: store.seconds = min(600, store.seconds + 5)
- case .decrement: store.seconds = max(5, store.seconds - 5)
- @unknown default: break
+ ScrollView {
+ VStack(spacing: 6) {
+ Text("Quick check-in").font(.system(.headline, design: .rounded))
+ HStack(alignment: .firstTextBaseline, spacing: 2) {
+ Text(verbatim: String(format: "%.1f", store.bodyWeight))
+ .font(.system(size: size, weight: .semibold, design: .rounded).monospacedDigit())
+ .foregroundStyle(Theme.accent)
+ .contentTransition(.numericText())
+ Text(verbatim: store.unit).font(.system(size: 13, weight: .medium, design: .rounded)).foregroundStyle(.secondary)
+ }
+ .lineLimit(1)
+ .minimumScaleFactor(0.5)
+ .frame(maxWidth: .infinity, minHeight: Theme.tap)
+ .focusable()
+ .focused($focused)
+ .digitalCrownRotation($store.bodyWeight, from: 20, through: store.unit == "lb" ? 700 : 320, by: 0.1,
+ sensitivity: .low, isContinuous: false, isHapticFeedbackEnabled: true)
+ .accessibilityElement(children: .ignore)
+ .accessibilityLabel(Text("Body weight"))
+ .accessibilityValue(Text(verbatim: String(format: "%.1f %@", store.bodyWeight, store.unit)))
+ .accessibilityHint(Text("Turn the Digital Crown to change it."))
+ Button { store.finishWeighIn(save: true) } label: {
+ Text("Save & start workout").font(.body.weight(.semibold)).frame(maxWidth: .infinity, minHeight: Theme.tap)
+ }
+ .tint(Theme.accent)
+ Button { store.finishWeighIn(save: false) } label: {
+ Text("Start without weighing in").font(.footnote).frame(maxWidth: .infinity, minHeight: Theme.tap)
+ }
+ .buttonStyle(.plain)
+ .foregroundStyle(.secondary)
+ Button(role: .cancel) { store.cancelWeighIn() } label: {
+ Text("Cancel").font(.footnote).frame(maxWidth: .infinity, minHeight: 32)
+ }
+ .buttonStyle(.plain)
+ .foregroundStyle(.secondary)
}
+ .padding(.horizontal, 4)
}
+ .onAppear { focused = true }
}
}
@@ -648,15 +813,17 @@ struct RestView: View {
// overlaps on any size (it did on 46 mm when the ring filled the whole screen).
VStack(spacing: 2) {
ZStack {
- CountdownRing(start: store.restStartedAt ?? end.addingTimeInterval(-90), end: end)
+ if store.show.restRing {
+ CountdownRing(start: store.restStartedAt ?? end.addingTimeInterval(-90), end: end)
+ }
VStack(spacing: 1) {
Text("Rest").font(.caption2.weight(.semibold)).foregroundStyle(.secondary)
Text(timerInterval: Date()...end, countsDown: true)
- .font(.system(size: countdownSize, weight: .semibold, design: .rounded).monospacedDigit())
+ .font(.system(size: store.show.restRing ? countdownSize : countdownSize * 1.35, weight: .semibold, design: .rounded).monospacedDigit())
.minimumScaleFactor(0.5)
.lineLimit(1)
.multilineTextAlignment(.center)
- if let e = store.entry, let si = store.setIndex {
+ if store.show.showNext, let e = store.entry, let si = store.setIndex {
Group {
if let side = store.sideUp {
Text("Next: \(e.name), set \(si + 1)") + Text(verbatim: " · ") + Text(side == "L" ? LocalizedStringKey("Left") : LocalizedStringKey("Right"))
@@ -734,6 +901,7 @@ struct HoldView: View {
struct SummaryView: View {
@EnvironmentObject var store: SessionStore
+ @Environment(\.locale) private var locale
let summary: WorkoutSummary
var body: some View {
@@ -749,7 +917,7 @@ struct SummaryView: View {
.fixedSize(horizontal: false, vertical: true)
}
Text(verbatim: summary.name).font(.footnote).foregroundStyle(.secondary)
- if let d = summary.duration { stat(Text("Time"), Text(verbatim: SummaryView.duration(d))) }
+ if let d = summary.duration { stat(Text("Time"), Text(verbatim: SummaryView.duration(d, locale: locale))) }
stat(Text("Sets"), Text(verbatim: "\(summary.sets)"))
if summary.volume > 0 {
stat(Text("Volume"), Text(verbatim: "\(summary.volume.formatted(.number.precision(.fractionLength(0)))) \(summary.unit)"))
@@ -760,7 +928,7 @@ struct SummaryView: View {
if let kcal = summary.calories {
stat(Text("Calories"), Text(Measurement(value: kcal, unit: UnitEnergy.kilocalories),
format: .measurement(width: .abbreviated, usage: .asProvided,
- numberFormatStyle: .number.precision(.fractionLength(0)))))
+ numberFormatStyle: .number.precision(.fractionLength(0))).locale(locale)))
}
if !summary.prs.isEmpty {
VStack(alignment: .leading, spacing: 2) {
@@ -802,8 +970,11 @@ struct SummaryView: View {
}
/// "52 min", "1 h 5 min", in the watch's language.
- static func duration(_ seconds: Double) -> String {
+ static func duration(_ seconds: Double, locale: Locale = .current) -> String {
let f = DateComponentsFormatter()
+ var calendar = Calendar.current
+ calendar.locale = locale
+ f.calendar = calendar
f.allowedUnits = seconds >= 3600 ? [.hour, .minute] : [.minute]
f.unitsStyle = .short
return f.string(from: max(60, seconds)) ?? ""
diff --git a/frontend/ios/App/Watch/SessionStore.swift b/frontend/ios/App/Watch/SessionStore.swift
index 15665598c..0afa4bc79 100644
--- a/frontend/ios/App/Watch/SessionStore.swift
+++ b/frontend/ios/App/Watch/SessionStore.swift
@@ -34,6 +34,36 @@ final class SessionStore: NSObject, ObservableObject, WCSessionDelegate, UNUserN
var unit: String { workout?.unit ?? state.unit }
var weightStep: Double { unit == "lb" ? 5 : 2.5 }
var restHaptics: Bool { state.settings.restHaptics ?? true }
+ /// What a workout screen shows (the phone's Settings → Apple Watch).
+ var show: WatchShow { state.settings.show ?? WatchShow() }
+
+ /* ---------- the app's language, not the watch's ---------- */
+
+ /// The .lproj the watch has for the app's language ("pt" is pt-PT here, "zh" Simplified), or
+ /// nil for English and for a language the watch has no words for.
+ static func lproj(for lang: String?) -> String? {
+ guard let l = lang, !l.isEmpty, l != "en" else { return nil }
+ let map = ["pt": "pt-PT", "zh": "zh-Hans", "zh-TW": "zh-Hant"]
+ let name = map[l] ?? l
+ return Bundle.main.path(forResource: name, ofType: "lproj") != nil ? name : nil
+ }
+
+ /// The locale the views use (SwiftUI looks its strings up by it): the app's language from the
+ /// phone; until the phone has said, the watch's own.
+ var locale: Locale {
+ guard let lang = state.settings.lang else { return .current }
+ return Locale(identifier: SessionStore.lproj(for: lang) ?? "en")
+ }
+
+ /// A string in the app's language, for what is not a view (the rest notification).
+ func L(_ key: String) -> String {
+ guard let name = SessionStore.lproj(for: state.settings.lang),
+ let path = Bundle.main.path(forResource: name, ofType: "lproj"),
+ let bundle = Bundle(path: path) else {
+ return state.settings.lang == nil ? NSLocalizedString(key, comment: "") : key
+ }
+ return bundle.localizedString(forKey: key, value: key, table: nil)
+ }
var crownStartsOnWeight: Bool { state.settings.crown == "weight" }
/// Apple Health: the workout session, its heart rate, and the switch (WorkoutManager).
@@ -82,7 +112,7 @@ final class SessionStore: NSObject, ObservableObject, WCSessionDelegate, UNUserN
static var demoScreen: String? { argument("-OpenGymWatchScreen") }
/// CI: a synthetic clip (not exercise media) shown on the demo's first exercise.
static var demoClip: String? { argument("-OpenGymWatchDemoClip") }
- private static func argument(_ name: String) -> String? {
+ static func argument(_ name: String) -> String? {
let a = ProcessInfo.processInfo.arguments
guard let i = a.firstIndex(of: name), i + 1 < a.count else { return nil }
return a[i + 1]
@@ -135,6 +165,12 @@ final class SessionStore: NSObject, ObservableObject, WCSessionDelegate, UNUserN
var progress: (done: Int, total: Int) { SessionCore.progress(state) }
+ /// When the running workout started: the phone's start, else when this watch first had it.
+ var workoutStart: Date? {
+ if let ms = workout?.start, ms > 0 { return Date(timeIntervalSince1970: ms / 1000) }
+ return workout == nil ? nil : workoutSeenAt
+ }
+
/// Events wait on the watch for a phone out of reach: "Saved on the watch, syncs later".
var offline: Bool { queued > 0 && !reachable }
@@ -160,8 +196,14 @@ final class SessionStore: NSObject, ObservableObject, WCSessionDelegate, UNUserN
loadTargets()
}
- /// What the complications and the Smart Stack widget show (WidgetState).
+ /// What the complications and the Smart Stack widget show (WidgetState), in the app's language.
var widgetState: WidgetState {
+ var w = widgetStateWithoutLang
+ w.lang = state.settings.lang
+ return w
+ }
+
+ private var widgetStateWithoutLang: WidgetState {
if let w = workout {
let p = progress
if let end = restEndsAt, end > Date() {
@@ -365,11 +407,41 @@ final class SessionStore: NSObject, ObservableObject, WCSessionDelegate, UNUserN
summary = nil
}
- /// Starts a ready session here, the phone asleep or not.
+ /// The weigh-in before a workout started here (the phone's check-in), when the phone asks for one.
+ @Published private(set) var weighInFor: ReadySession?
+ /// The body weight on the weigh-in's crown.
+ @Published var bodyWeight: Double = 70
+
+ /// Starts a ready session here, the phone asleep or not: first the weigh-in, as on the phone,
+ /// unless it is switched off there (Settings → During a workout).
func start(_ session: ReadySession) {
+ if state.settings.weighIn != false && !isDemo {
+ bodyWeight = state.settings.lastBw ?? (unit == "lb" ? 160 : 70)
+ weighInFor = session
+ return
+ }
+ begin(session, bw: nil)
+ }
+
+ /// The weigh-in answered: saved (a weigh-in for the phone, and the session's body weight) or
+ /// skipped; the workout starts either way. `nil` session: cancelled, nothing starts.
+ func finishWeighIn(save: Bool) {
+ guard let session = weighInFor else { return }
+ weighInFor = nil
+ var bw: Double? = nil
+ if save, let ev = SessionCore.weighIn(bodyWeight, at: Date().timeIntervalSince1970 * 1000, id: UUID().uuidString) {
+ send(event: ev)
+ bw = bodyWeight
+ }
+ begin(session, bw: bw)
+ }
+
+ func cancelWeighIn() { weighInFor = nil }
+
+ private func begin(_ session: ReadySession, bw: Double?) {
let now = Date()
let (next, event) = SessionCore.start(state, session, wid: "watch-" + UUID().uuidString,
- at: now.timeIntervalSince1970 * 1000, id: UUID().uuidString)
+ at: now.timeIntervalSince1970 * 1000, id: UUID().uuidString, bw: bw)
send(event: event)
state = next
picked = [:]
@@ -436,9 +508,9 @@ final class SessionStore: NSObject, ObservableObject, WCSessionDelegate, UNUserN
}
guard notify, !isDemo else { return }
let content = UNMutableNotificationContent()
- content.title = String(localized: "Rest’s over. Next set!")
+ content.title = L("Rest’s over. Next set!")
if let e = entry, let si = setIndex {
- content.body = String(localized: "\(e.name), set \(si + 1)")
+ content.body = String(format: L("%@, set %lld"), e.name, Int64(si + 1))
}
content.sound = restHaptics ? .default : nil
content.interruptionLevel = .timeSensitive
@@ -623,8 +695,18 @@ final class SessionStore: NSObject, ObservableObject, WCSessionDelegate, UNUserN
case "side": self.state.entryIndex = 3
case "superset": self.state.entryIndex = 4
case "finish": self.state.entryIndex = self.workout?.entries.count ?? 0
+ case "weighin":
+ self.bodyWeight = 81.4
+ self.weighInFor = ReadySession(routineIds: ["r1"], name: "Push day", entries: [])
default: break
}
+ // CI: the watch in another language than its own (the app's, as the phone sends it).
+ if let lang = SessionStore.argument("-OpenGymWatchLang") { self.state.settings.lang = lang }
+ if let show = SessionStore.argument("-OpenGymWatchShow") {
+ // "all": every optional thing on, for a look at the fullest screen.
+ if show == "all" { self.state.settings.show = WatchShow(clip: true, hr: true, last: true, elapsed: true, kcal: true, next: true, rest: "ring") }
+ if show == "plain" { self.state.settings.show = WatchShow(rest: "plain") }
+ }
self.loadTargets()
if screen == "rest" { self.startRest(until: Date().addingTimeInterval(83), notify: false) }
if screen == "hold" { self.startHold() }
@@ -649,7 +731,7 @@ final class SessionStore: NSObject, ObservableObject, WCSessionDelegate, UNUserN
static let demoJSON = """
{"v":1,"unit":"kg","restSec":90,"ready":null,"active":{"id":"demo","name":"Push day","unit":"kg","cur":0,"restSec":90,"rest":null,"start":0,"entries":[
- {"id":"0025","name":"Bench Press","mode":"reps","restSec":120,"last":"60 kg × 8, 60 kg × 8, 60 kg × 7","best":{"w":62.5,"r":8},"sets":[
+ {"id":"0025","name":"Bench Press","mode":"reps","restSec":120,"last":"60 kg × 8, 60 kg × 8, 60 kg × 7","best":{"w":62.5,"r":8},"step":2.5,"sets":[
{"w":40,"r":10,"sec":null,"done":false,"warmup":true},{"w":60,"r":8,"sec":null,"done":true,"warmup":false,"at":1},{"w":62.5,"r":8,"sec":null,"done":false,"warmup":false},{"w":62.5,"r":8,"sec":null,"done":false,"warmup":false}]},
{"id":"plank","name":"Plank","mode":"time","restSec":60,"last":null,"best":{"sec":60},"sets":[
{"w":null,"r":null,"sec":45,"done":false,"warmup":false},{"w":null,"r":null,"sec":45,"done":false,"warmup":false}]},
diff --git a/frontend/ios/App/Watch/WidgetState.swift b/frontend/ios/App/Watch/WidgetState.swift
index 385543684..b07de87b4 100644
--- a/frontend/ios/App/Watch/WidgetState.swift
+++ b/frontend/ios/App/Watch/WidgetState.swift
@@ -1,4 +1,5 @@
import Foundation
+import SwiftUI
/*
* What the watch app shows, for its complications and the Smart Stack widget (ios/App/Watch/
@@ -21,6 +22,8 @@ struct WidgetState: Codable, Equatable {
/// "2/4": the set up next, of its exercise's work sets.
var setLabel: String = ""
var updatedAt: Date = .distantPast
+ /// The app's language (the phone's), so the complications speak it too.
+ var lang: String?
static let idle = WidgetState(mode: "idle", title: "openGym", detail: "", restEndsAt: nil)
static let groupId = "group.ch.opengym.app"
@@ -28,7 +31,7 @@ struct WidgetState: Codable, Equatable {
static func == (a: WidgetState, b: WidgetState) -> Bool {
a.mode == b.mode && a.title == b.title && a.detail == b.detail && a.restEndsAt == b.restEndsAt
- && a.done == b.done && a.total == b.total && a.setLabel == b.setLabel
+ && a.done == b.done && a.total == b.total && a.setLabel == b.setLabel && a.lang == b.lang
}
/// The state as written, unless it is about a session the watch app has not touched for 45
@@ -47,3 +50,36 @@ struct WidgetState: Codable, Equatable {
if let d = try? JSONEncoder().encode(s) { UserDefaults(suiteName: WidgetState.groupId)?.set(d, forKey: WidgetState.key) }
}
}
+
+extension WidgetState {
+ /// The locale for the widget's words: the app's language where this bundle has it, else English
+ /// (a phone in English never gets a German complication from a watch set to German).
+ var locale: Locale {
+ guard let l = lang else { return .current }
+ if l == "en" { return Locale(identifier: "en") }
+ let name = ["pt": "pt-PT", "zh": "zh-Hans", "zh-TW": "zh-Hant"][l] ?? l
+ return Locale(identifier: Bundle.main.path(forResource: name, ofType: "lproj") != nil ? name : "en")
+ }
+}
+
+/// openGym's mark, the app icon's barbell (frontend/public/icon-512.png), drawn as one shape so it
+/// takes the watch face's tint and stays sharp at every complication size.
+struct OpenGymLogo: Shape {
+ func path(in rect: CGRect) -> Path {
+ // The icon's own coordinates (512 × 512); the barbell spans x 80…432, y 170…342.
+ let boxes: [(CGFloat, CGFloat, CGFloat, CGFloat)] = [
+ (80, 200, 36, 112), (116, 242, 16, 28), (132, 170, 46, 172),
+ (178, 242, 156, 28),
+ (334, 170, 46, 172), (380, 242, 16, 28), (396, 200, 36, 112),
+ ]
+ let minX: CGFloat = 80, minY: CGFloat = 170, w: CGFloat = 352, h: CGFloat = 172
+ let scale = min(rect.width / w, rect.height / h)
+ let ox = rect.midX - w * scale / 2, oy = rect.midY - h * scale / 2
+ var p = Path()
+ for (x, y, bw, bh) in boxes {
+ p.addRect(CGRect(x: ox + (x - minX) * scale, y: oy + (y - minY) * scale, width: bw * scale, height: bh * scale))
+ }
+ return p
+ }
+}
+
diff --git a/frontend/ios/App/Watch/WorkoutManager.swift b/frontend/ios/App/Watch/WorkoutManager.swift
index ea5fa8283..a7382d8f3 100644
--- a/frontend/ios/App/Watch/WorkoutManager.swift
+++ b/frontend/ios/App/Watch/WorkoutManager.swift
@@ -115,6 +115,7 @@ final class WorkoutManager: NSObject, ObservableObject, HKWorkoutSessionDelegate
builder = b
samples = []
heartRate = nil
+ calories = nil
let now = Date()
s.startActivity(with: now)
b.beginCollection(withStart: now) { _, _ in }
@@ -238,7 +239,21 @@ final class WorkoutManager: NSObject, ObservableObject, HKWorkoutSessionDelegate
func workoutBuilderDidCollectEvent(_ workoutBuilder: HKLiveWorkoutBuilder) {}
+ /// Active calories so far, for the workout screen when it shows them (at most every 10 s).
+ @Published private(set) var calories: Double?
+ private var caloriesAt = Date.distantPast
+
func workoutBuilder(_ workoutBuilder: HKLiveWorkoutBuilder, didCollectDataOf collectedTypes: Set<HKSampleType>) {
+ if let kcalType = HKQuantityType.quantityType(forIdentifier: .activeEnergyBurned), collectedTypes.contains(kcalType),
+ let kcal = workoutBuilder.statistics(for: kcalType)?.sumQuantity()?.doubleValue(for: .kilocalorie()) {
+ DispatchQueue.main.async {
+ let now = Date()
+ guard now.timeIntervalSince(self.caloriesAt) >= 10 || self.calories == nil else { return }
+ self.caloriesAt = now
+ let rounded = kcal.rounded()
+ if self.calories != rounded { self.calories = rounded }
+ }
+ }
guard let hrType = HKQuantityType.quantityType(forIdentifier: .heartRate),
collectedTypes.contains(hrType),
let stats = workoutBuilder.statistics(for: hrType),
diff --git a/frontend/ios/App/Watch/ar.lproj/Localizable.strings b/frontend/ios/App/Watch/ar.lproj/Localizable.strings
index 5dc385d72..16ee5cf52 100644
--- a/frontend/ios/App/Watch/ar.lproj/Localizable.strings
+++ b/frontend/ios/App/Watch/ar.lproj/Localizable.strings
@@ -22,6 +22,12 @@
"Time" = "الوقت";
"Skip set" = "تخطي المجموعة";
"Personal records" = "الأرقام القياسية";
+"Quick check-in" = "تحديث سريع";
+"Save & start workout" = "حفظ وبدء التمرين";
+"Start without weighing in" = "بدء دون تسجيل الوزن";
+"Body weight" = "وزن الجسم";
+"Less" = "أقل";
+"More" = "أكثر";
"Last time: %@" = "المرة السابقة: %@";
"No workout running" = "لا يوجد تمرين جارٍ";
"Start one on your iPhone and it shows up here." = "ابدأ تمرينًا على iPhone وسيظهر هنا.";
@@ -45,3 +51,7 @@
"%lld avg · %lld max" = "متوسط %lld · أقصى %lld";
"Set %lld of %lld" = "المجموعة %lld من %lld";
"%lld of %lld sets" = "%lld من %lld مجموعات";
+"Tap to change it." = "اضغط للتغيير.";
+"Added weight" = "وزن إضافي";
+"Your rest, your next set, or today's workout." = "راحتك، أو مجموعتك التالية، أو تمرين اليوم.";
+"Opens openGym." = "يفتح openGym.";
diff --git a/frontend/ios/App/Watch/bn.lproj/Localizable.strings b/frontend/ios/App/Watch/bn.lproj/Localizable.strings
index 54fdb16c6..7b85b666c 100644
--- a/frontend/ios/App/Watch/bn.lproj/Localizable.strings
+++ b/frontend/ios/App/Watch/bn.lproj/Localizable.strings
@@ -22,6 +22,12 @@
"Time" = "সময়";
"Skip set" = "সেট এড়িয়ে যান";
"Personal records" = "রেকর্ড";
+"Quick check-in" = "দ্রুত চেক-ইন";
+"Save & start workout" = "সেভ করে ওয়ার্কআউট শুরু করুন";
+"Start without weighing in" = "ওজন না মেপেই শুরু করুন";
+"Body weight" = "শরীরের ওজন";
+"Less" = "কম";
+"More" = "বেশি";
"Last time: %@" = "গতবার: %@";
"No workout running" = "কোনো ওয়ার্কআউট চলছে না";
"Start one on your iPhone and it shows up here." = "iPhone-এ একটি শুরু করুন, এখানে দেখা যাবে।";
@@ -45,3 +51,7 @@
"%lld avg · %lld max" = "গড় %lld · সর্বোচ্চ %lld";
"Set %lld of %lld" = "সেট %lld / %lld";
"%lld of %lld sets" = "%lld / %lld সেট";
+"Tap to change it." = "বদলাতে ট্যাপ করুন।";
+"Added weight" = "অতিরিক্ত ওজন";
+"Your rest, your next set, or today's workout." = "আপনার বিশ্রাম, পরের সেট, বা আজকের ওয়ার্কআউট।";
+"Opens openGym." = "openGym খোলে।";
diff --git a/frontend/ios/App/Watch/de.lproj/Localizable.strings b/frontend/ios/App/Watch/de.lproj/Localizable.strings
index 07d105e57..1bea5e3ca 100644
--- a/frontend/ios/App/Watch/de.lproj/Localizable.strings
+++ b/frontend/ios/App/Watch/de.lproj/Localizable.strings
@@ -22,6 +22,12 @@
"Time" = "Zeit";
"Skip set" = "Satz überspringen";
"Personal records" = "Rekorde";
+"Quick check-in" = "Kurzer Check-in";
+"Save & start workout" = "Speichern & Training starten";
+"Start without weighing in" = "Ohne Wiegen starten";
+"Body weight" = "Körpergewicht";
+"Less" = "Weniger";
+"More" = "Mehr";
"Last time: %@" = "Letztes Mal: %@";
"No workout running" = "Kein Training läuft";
"Start one on your iPhone and it shows up here." = "Starte eins auf dem iPhone, dann taucht es hier auf.";
@@ -45,3 +51,7 @@
"%lld avg · %lld max" = "Ø %lld · max. %lld";
"Set %lld of %lld" = "Satz %lld von %lld";
"%lld of %lld sets" = "%lld von %lld Sätzen";
+"Tap to change it." = "Tippe, um es zu ändern.";
+"Added weight" = "Zusatzgewicht";
+"Your rest, your next set, or today's workout." = "Deine Pause, dein nächster Satz oder das Training von heute.";
+"Opens openGym." = "Öffnet openGym.";
diff --git a/frontend/ios/App/Watch/en.lproj/Localizable.strings b/frontend/ios/App/Watch/en.lproj/Localizable.strings
new file mode 100644
index 000000000..5a5812ac2
--- /dev/null
+++ b/frontend/ios/App/Watch/en.lproj/Localizable.strings
@@ -0,0 +1,57 @@
+/* openGym on the Apple Watch, en. Written by ios/ci/watch-strings.mjs: change that, not this. */
+
+"Today" = "Today";
+"Start workout" = "Start workout";
+"Done" = "Done";
+"Warm-up" = "Warm-up";
+"Reps" = "Reps";
+"Rest" = "Rest";
+"Skip" = "Skip";
+"Finish workout" = "Finish workout";
+"Finish workout?" = "Finish workout?";
+"Finish and save" = "Finish and save";
+"Cancel" = "Cancel";
+"Rest’s over. Next set!" = "Rest’s over. Next set!";
+"Left" = "Left";
+"Right" = "Right";
+"Bodyweight" = "Bodyweight";
+"Superset" = "Superset";
+"Weight" = "Weight";
+"Sets" = "Sets";
+"Volume" = "Volume";
+"Time" = "Time";
+"Skip set" = "Skip set";
+"Personal records" = "Personal records";
+"Quick check-in" = "Quick check-in";
+"Save & start workout" = "Save & start workout";
+"Start without weighing in" = "Start without weighing in";
+"Body weight" = "Body weight";
+"Less" = "Less";
+"More" = "More";
+"Last time: %@" = "Last time: %@";
+"No workout running" = "No workout running";
+"Start one on your iPhone and it shows up here." = "Start one on your iPhone and it shows up here.";
+"All sets done" = "All sets done";
+"measuring" = "measuring";
+"Next: %@, set %lld" = "Next: %@, set %lld";
+"%@, set %lld" = "%@, set %lld";
+"Calories" = "Calories";
+"Heart rate" = "Heart rate";
+"Hold" = "Hold";
+"Stop" = "Stop";
+"Start hold" = "Start hold";
+"Workout saved" = "Workout saved";
+"Ended on your iPhone" = "Ended on your iPhone";
+"Tap a dot to do a skipped set." = "Tap a dot to do a skipped set.";
+"Log this one on your iPhone." = "Log this one on your iPhone.";
+"Saved on the watch, syncs later" = "Saved on the watch, syncs later";
+"Skip this set?" = "Skip this set?";
+"Turn the Digital Crown to change it." = "Turn the Digital Crown to change it.";
+"%lld done" = "%lld done";
+"%lld avg · %lld max" = "%lld avg · %lld max";
+"Set %lld of %lld" = "Set %lld of %lld";
+"%lld of %lld sets" = "%lld of %lld sets";
+"Tap to change it." = "Tap to change it.";
+"Added weight" = "Added weight";
+"Your rest, your next set, or today's workout." = "Your rest, your next set, or today's workout.";
+"Opens openGym." = "Opens openGym.";
diff --git a/frontend/ios/App/Watch/es.lproj/Localizable.strings b/frontend/ios/App/Watch/es.lproj/Localizable.strings
index 42792036b..f93dbc5bb 100644
--- a/frontend/ios/App/Watch/es.lproj/Localizable.strings
+++ b/frontend/ios/App/Watch/es.lproj/Localizable.strings
@@ -22,6 +22,12 @@
"Time" = "Tiempo";
"Skip set" = "Saltar serie";
"Personal records" = "Récords";
+"Quick check-in" = "Chequeo rápido";
+"Save & start workout" = "Guardar y empezar";
+"Start without weighing in" = "Empezar sin pesarse";
+"Body weight" = "Peso corporal";
+"Less" = "Menos";
+"More" = "Más";
"Last time: %@" = "La última vez: %@";
"No workout running" = "Ningún entreno en curso";
"Start one on your iPhone and it shows up here." = "Empieza uno en tu iPhone y aparecerá aquí.";
@@ -45,3 +51,7 @@
"%lld avg · %lld max" = "media %lld · máx. %lld";
"Set %lld of %lld" = "Serie %lld de %lld";
"%lld of %lld sets" = "%lld de %lld series";
+"Tap to change it." = "Toca para cambiarlo.";
+"Added weight" = "Peso añadido";
+"Your rest, your next set, or today's workout." = "Tu descanso, tu próxima serie o el entreno de hoy.";
+"Opens openGym." = "Abre openGym.";
diff --git a/frontend/ios/App/Watch/fr.lproj/Localizable.strings b/frontend/ios/App/Watch/fr.lproj/Localizable.strings
index d7795d7f7..d6bb12b57 100644
--- a/frontend/ios/App/Watch/fr.lproj/Localizable.strings
+++ b/frontend/ios/App/Watch/fr.lproj/Localizable.strings
@@ -22,6 +22,12 @@
"Time" = "Temps";
"Skip set" = "Passer la série";
"Personal records" = "Records";
+"Quick check-in" = "Pesée rapide";
+"Save & start workout" = "Enregistrer et démarrer";
+"Start without weighing in" = "Commencer sans se peser";
+"Body weight" = "Poids corporel";
+"Less" = "Moins";
+"More" = "Plus";
"Last time: %@" = "La dernière fois: %@";
"No workout running" = "Aucune séance en cours";
"Start one on your iPhone and it shows up here." = "Lance-en une sur ton iPhone et elle apparaît ici.";
@@ -45,3 +51,7 @@
"%lld avg · %lld max" = "moy. %lld · max %lld";
"Set %lld of %lld" = "Série %lld sur %lld";
"%lld of %lld sets" = "%lld séries sur %lld";
+"Tap to change it." = "Touche pour le changer.";
+"Added weight" = "Poids ajouté";
+"Your rest, your next set, or today's workout." = "Ton repos, ta prochaine série ou la séance du jour.";
+"Opens openGym." = "Ouvre openGym.";
diff --git a/frontend/ios/App/Watch/hi.lproj/Localizable.strings b/frontend/ios/App/Watch/hi.lproj/Localizable.strings
index f071d5927..93a82fac2 100644
--- a/frontend/ios/App/Watch/hi.lproj/Localizable.strings
+++ b/frontend/ios/App/Watch/hi.lproj/Localizable.strings
@@ -22,6 +22,12 @@
"Time" = "समय";
"Skip set" = "सेट छोड़ें";
"Personal records" = "रिकॉर्ड";
+"Quick check-in" = "झटपट वज़न चेक";
+"Save & start workout" = "सहेजें और वर्कआउट शुरू करें";
+"Start without weighing in" = "बिना तौले शुरू करें";
+"Body weight" = "शरीर का वज़न";
+"Less" = "कम";
+"More" = "अधिक";
"Last time: %@" = "पिछली बार: %@";
"No workout running" = "कोई वर्कआउट नहीं चल रहा";
"Start one on your iPhone and it shows up here." = "iPhone पर एक शुरू करें, यह यहाँ दिखेगा।";
@@ -45,3 +51,7 @@
"%lld avg · %lld max" = "औसत %lld · अधिकतम %lld";
"Set %lld of %lld" = "सेट %lld / %lld";
"%lld of %lld sets" = "%lld / %lld सेट";
+"Tap to change it." = "बदलने के लिए टैप करें।";
+"Added weight" = "अतिरिक्त वज़न";
+"Your rest, your next set, or today's workout." = "आपका आराम, अगला सेट, या आज का वर्कआउट।";
+"Opens openGym." = "openGym खोलता है।";
diff --git a/frontend/ios/App/Watch/hu.lproj/Localizable.strings b/frontend/ios/App/Watch/hu.lproj/Localizable.strings
index 051d2dc86..6e6a093e4 100644
--- a/frontend/ios/App/Watch/hu.lproj/Localizable.strings
+++ b/frontend/ios/App/Watch/hu.lproj/Localizable.strings
@@ -22,6 +22,12 @@
"Time" = "Idő";
"Skip set" = "Sorozat kihagyása";
"Personal records" = "Rekordok";
+"Quick check-in" = "Gyors bejelentkezés";
+"Save & start workout" = "Mentés és edzés indítása";
+"Start without weighing in" = "Indítás mérés nélkül";
+"Body weight" = "Testsúly";
+"Less" = "Kevesebb";
+"More" = "Több";
"Last time: %@" = "Legutóbb: %@";
"No workout running" = "Nincs folyamatban edzés";
"Start one on your iPhone and it shows up here." = "Indíts egyet az iPhone-on, és itt megjelenik.";
@@ -45,3 +51,7 @@
"%lld avg · %lld max" = "átl. %lld · max. %lld";
"Set %lld of %lld" = "%lld. sorozat / %lld";
"%lld of %lld sets" = "%lld / %lld sorozat";
+"Tap to change it." = "Koppints a módosításhoz.";
+"Added weight" = "Plusz súly";
+"Your rest, your next set, or today's workout." = "A pihenőd, a következő sorozat vagy a mai edzés.";
+"Opens openGym." = "Megnyitja az openGymet.";
diff --git a/frontend/ios/App/Watch/it.lproj/Localizable.strings b/frontend/ios/App/Watch/it.lproj/Localizable.strings
index a43cb7b96..622fc1d15 100644
--- a/frontend/ios/App/Watch/it.lproj/Localizable.strings
+++ b/frontend/ios/App/Watch/it.lproj/Localizable.strings
@@ -22,6 +22,12 @@
"Time" = "Tempo";
"Skip set" = "Salta serie";
"Personal records" = "Record";
+"Quick check-in" = "Check-in veloce";
+"Save & start workout" = "Salva e inizia";
+"Start without weighing in" = "Inizia senza pesarti";
+"Body weight" = "Peso corporeo";
+"Less" = "Meno";
+"More" = "Più";
"Last time: %@" = "L'ultima volta: %@";
"No workout running" = "Nessun allenamento in corso";
"Start one on your iPhone and it shows up here." = "Avviane uno sull’iPhone e comparirà qui.";
@@ -45,3 +51,7 @@
"%lld avg · %lld max" = "media %lld · max %lld";
"Set %lld of %lld" = "Serie %lld di %lld";
"%lld of %lld sets" = "%lld serie su %lld";
+"Tap to change it." = "Tocca per cambiarlo.";
+"Added weight" = "Peso aggiunto";
+"Your rest, your next set, or today's workout." = "Il tuo recupero, la prossima serie o l’allenamento di oggi.";
+"Opens openGym." = "Apre openGym.";
diff --git a/frontend/ios/App/Watch/ko.lproj/Localizable.strings b/frontend/ios/App/Watch/ko.lproj/Localizable.strings
index d9bf7b69a..8386023c7 100644
--- a/frontend/ios/App/Watch/ko.lproj/Localizable.strings
+++ b/frontend/ios/App/Watch/ko.lproj/Localizable.strings
@@ -22,6 +22,12 @@
"Time" = "시간";
"Skip set" = "세트 건너뛰기";
"Personal records" = "신기록";
+"Quick check-in" = "빠른 체중 체크";
+"Save & start workout" = "저장하고 운동 시작";
+"Start without weighing in" = "체중 기록 없이 시작";
+"Body weight" = "체중";
+"Less" = "적음";
+"More" = "많음";
"Last time: %@" = "지난번: %@";
"No workout running" = "진행 중인 운동이 없어요";
"Start one on your iPhone and it shows up here." = "iPhone에서 시작하면 여기에 나타나요.";
@@ -45,3 +51,7 @@
"%lld avg · %lld max" = "평균 %lld · 최대 %lld";
"Set %lld of %lld" = "%lld/%lld세트";
"%lld of %lld sets" = "%lld/%lld세트";
+"Tap to change it." = "탭해서 바꾸세요.";
+"Added weight" = "추가 무게";
+"Your rest, your next set, or today's workout." = "휴식, 다음 세트, 또는 오늘의 운동.";
+"Opens openGym." = "openGym을 열어요.";
diff --git a/frontend/ios/App/Watch/pl.lproj/Localizable.strings b/frontend/ios/App/Watch/pl.lproj/Localizable.strings
index d85b34bbb..3156c7298 100644
--- a/frontend/ios/App/Watch/pl.lproj/Localizable.strings
+++ b/frontend/ios/App/Watch/pl.lproj/Localizable.strings
@@ -22,6 +22,12 @@
"Time" = "Czas";
"Skip set" = "Pomiń serię";
"Personal records" = "Rekordy";
+"Quick check-in" = "Szybkie ważenie";
+"Save & start workout" = "Zapisz i zacznij trening";
+"Start without weighing in" = "Zacznij bez ważenia";
+"Body weight" = "Masa ciała";
+"Less" = "Mniej";
+"More" = "Więcej";
"Last time: %@" = "Ostatnio: %@";
"No workout running" = "Żaden trening nie trwa";
"Start one on your iPhone and it shows up here." = "Zacznij trening na iPhonie, a pojawi się tutaj.";
@@ -45,3 +51,7 @@
"%lld avg · %lld max" = "śr. %lld · maks. %lld";
"Set %lld of %lld" = "Seria %lld z %lld";
"%lld of %lld sets" = "%lld z %lld serii";
+"Tap to change it." = "Stuknij, by zmienić.";
+"Added weight" = "Dodatkowy ciężar";
+"Your rest, your next set, or today's workout." = "Twoja przerwa, następna seria albo dzisiejszy trening.";
+"Opens openGym." = "Otwiera openGym.";
diff --git a/frontend/ios/App/Watch/pt-BR.lproj/Localizable.strings b/frontend/ios/App/Watch/pt-BR.lproj/Localizable.strings
index 2d5723461..28ed62af9 100644
--- a/frontend/ios/App/Watch/pt-BR.lproj/Localizable.strings
+++ b/frontend/ios/App/Watch/pt-BR.lproj/Localizable.strings
@@ -22,6 +22,12 @@
"Time" = "Tempo";
"Skip set" = "Pular série";
"Personal records" = "Recordes";
+"Quick check-in" = "Check-in rápido";
+"Save & start workout" = "Salvar e iniciar treino";
+"Start without weighing in" = "Iniciar sem se pesar";
+"Body weight" = "Peso corporal";
+"Less" = "Menos";
+"More" = "Mais";
"Last time: %@" = "Da última vez: %@";
"No workout running" = "Nenhum treino em andamento";
"Start one on your iPhone and it shows up here." = "Comece um no iPhone e ele aparece aqui.";
@@ -45,3 +51,7 @@
"%lld avg · %lld max" = "média %lld · máx. %lld";
"Set %lld of %lld" = "Série %lld de %lld";
"%lld of %lld sets" = "%lld de %lld séries";
+"Tap to change it." = "Toque para mudar.";
+"Added weight" = "Peso adicional";
+"Your rest, your next set, or today's workout." = "Seu descanso, a próxima série ou o treino de hoje.";
+"Opens openGym." = "Abre o openGym.";
diff --git a/frontend/ios/App/Watch/pt-PT.lproj/Localizable.strings b/frontend/ios/App/Watch/pt-PT.lproj/Localizable.strings
index a53c2aefd..9c4c968dd 100644
--- a/frontend/ios/App/Watch/pt-PT.lproj/Localizable.strings
+++ b/frontend/ios/App/Watch/pt-PT.lproj/Localizable.strings
@@ -22,6 +22,12 @@
"Time" = "Tempo";
"Skip set" = "Saltar série";
"Personal records" = "Recordes";
+"Quick check-in" = "Check-in rápido";
+"Save & start workout" = "Guardar e começar treino";
+"Start without weighing in" = "Começar sem pesar";
+"Body weight" = "Peso corporal";
+"Less" = "Menos";
+"More" = "Mais";
"Last time: %@" = "Da última vez: %@";
"No workout running" = "Nenhum treino a decorrer";
"Start one on your iPhone and it shows up here." = "Começa um no iPhone e ele aparece aqui.";
@@ -45,3 +51,7 @@
"%lld avg · %lld max" = "média %lld · máx. %lld";
"Set %lld of %lld" = "Série %lld de %lld";
"%lld of %lld sets" = "%lld de %lld séries";
+"Tap to change it." = "Toca para mudar.";
+"Added weight" = "Peso adicional";
+"Your rest, your next set, or today's workout." = "O teu descanso, a próxima série ou o treino de hoje.";
+"Opens openGym." = "Abre o openGym.";
diff --git a/frontend/ios/App/Watch/ru.lproj/Localizable.strings b/frontend/ios/App/Watch/ru.lproj/Localizable.strings
index fd9dc19ff..1fa4ef45a 100644
--- a/frontend/ios/App/Watch/ru.lproj/Localizable.strings
+++ b/frontend/ios/App/Watch/ru.lproj/Localizable.strings
@@ -22,6 +22,12 @@
"Time" = "Время";
"Skip set" = "Пропустить подход";
"Personal records" = "Рекорды";
+"Quick check-in" = "Быстрое взвешивание";
+"Save & start workout" = "Сохранить и начать тренировку";
+"Start without weighing in" = "Начать без взвешивания";
+"Body weight" = "Вес тела";
+"Less" = "Меньше";
+"More" = "Больше";
"Last time: %@" = "В прошлый раз: %@";
"No workout running" = "Тренировка не идёт";
"Start one on your iPhone and it shows up here." = "Начните её на iPhone, и она появится здесь.";
@@ -45,3 +51,7 @@
"%lld avg · %lld max" = "ср. %lld · макс. %lld";
"Set %lld of %lld" = "Подход %lld из %lld";
"%lld of %lld sets" = "%lld из %lld подходов";
+"Tap to change it." = "Нажмите, чтобы изменить.";
+"Added weight" = "Доп. вес";
+"Your rest, your next set, or today's workout." = "Отдых, следующий подход или сегодняшняя тренировка.";
+"Opens openGym." = "Открывает openGym.";
diff --git a/frontend/ios/App/Watch/th.lproj/Localizable.strings b/frontend/ios/App/Watch/th.lproj/Localizable.strings
index bac0ed547..b94756df7 100644
--- a/frontend/ios/App/Watch/th.lproj/Localizable.strings
+++ b/frontend/ios/App/Watch/th.lproj/Localizable.strings
@@ -22,6 +22,12 @@
"Time" = "เวลา";
"Skip set" = "ข้ามเซ็ต";
"Personal records" = "สถิติใหม่";
+"Quick check-in" = "เช็คอินด่วน";
+"Save & start workout" = "บันทึกแล้วเริ่มออกกำลังกาย";
+"Start without weighing in" = "เริ่มโดยไม่ชั่งน้ำหนัก";
+"Body weight" = "น้ำหนักตัว";
+"Less" = "น้อย";
+"More" = "มาก";
"Last time: %@" = "ครั้งก่อน: %@";
"No workout running" = "ไม่มีการฝึกที่กำลังทำอยู่";
"Start one on your iPhone and it shows up here." = "เริ่มบน iPhone แล้วจะแสดงที่นี่";
@@ -45,3 +51,7 @@
"%lld avg · %lld max" = "เฉลี่ย %lld · สูงสุด %lld";
"Set %lld of %lld" = "เซ็ต %lld จาก %lld";
"%lld of %lld sets" = "%lld จาก %lld เซ็ต";
+"Tap to change it." = "แตะเพื่อเปลี่ยน";
+"Added weight" = "น้ำหนักเพิ่ม";
+"Your rest, your next set, or today's workout." = "ช่วงพัก เซ็ตถัดไป หรือการฝึกวันนี้";
+"Opens openGym." = "เปิด openGym";
diff --git a/frontend/ios/App/Watch/tr.lproj/Localizable.strings b/frontend/ios/App/Watch/tr.lproj/Localizable.strings
index f19cde8dd..43117253e 100644
--- a/frontend/ios/App/Watch/tr.lproj/Localizable.strings
+++ b/frontend/ios/App/Watch/tr.lproj/Localizable.strings
@@ -22,6 +22,12 @@
"Time" = "Süre";
"Skip set" = "Seti atla";
"Personal records" = "Rekorlar";
+"Quick check-in" = "Hızlı tartı";
+"Save & start workout" = "Kaydet ve antrenmana başla";
+"Start without weighing in" = "Tartılmadan başla";
+"Body weight" = "Vücut ağırlığı";
+"Less" = "Az";
+"More" = "Çok";
"Last time: %@" = "Geçen sefer: %@";
"No workout running" = "Devam eden antrenman yok";
"Start one on your iPhone and it shows up here." = "iPhone’unda bir tane başlat, burada görünür.";
@@ -45,3 +51,7 @@
"%lld avg · %lld max" = "ort. %lld · maks. %lld";
"Set %lld of %lld" = "Set %lld / %lld";
"%lld of %lld sets" = "%lld / %lld set";
+"Tap to change it." = "Değiştirmek için dokun.";
+"Added weight" = "Ek ağırlık";
+"Your rest, your next set, or today's workout." = "Dinlenmen, sıradaki setin ya da bugünkü antrenman.";
+"Opens openGym." = "openGym’i açar.";
diff --git a/frontend/ios/App/Watch/uk.lproj/Localizable.strings b/frontend/ios/App/Watch/uk.lproj/Localizable.strings
index c2e0a7237..8c15ec099 100644
--- a/frontend/ios/App/Watch/uk.lproj/Localizable.strings
+++ b/frontend/ios/App/Watch/uk.lproj/Localizable.strings
@@ -22,6 +22,12 @@
"Time" = "Час";
"Skip set" = "Пропустити підхід";
"Personal records" = "Рекорди";
+"Quick check-in" = "Швидке зважування";
+"Save & start workout" = "Зберегти й почати тренування";
+"Start without weighing in" = "Почати без зважування";
+"Body weight" = "Вага тіла";
+"Less" = "Менше";
+"More" = "Більше";
"Last time: %@" = "Минулого разу: %@";
"No workout running" = "Тренування не триває";
"Start one on your iPhone and it shows up here." = "Почни його на iPhone, і воно з’явиться тут.";
@@ -45,3 +51,7 @@
"%lld avg · %lld max" = "сер. %lld · макс. %lld";
"Set %lld of %lld" = "Підхід %lld з %lld";
"%lld of %lld sets" = "%lld з %lld підходів";
+"Tap to change it." = "Торкнись, щоб змінити.";
+"Added weight" = "Додаткова вага";
+"Your rest, your next set, or today's workout." = "Відпочинок, наступний підхід або сьогоднішнє тренування.";
+"Opens openGym." = "Відкриває openGym.";
diff --git a/frontend/ios/App/Watch/zh-Hans.lproj/Localizable.strings b/frontend/ios/App/Watch/zh-Hans.lproj/Localizable.strings
index a705c69ed..865a32fa9 100644
--- a/frontend/ios/App/Watch/zh-Hans.lproj/Localizable.strings
+++ b/frontend/ios/App/Watch/zh-Hans.lproj/Localizable.strings
@@ -22,6 +22,12 @@
"Time" = "时间";
"Skip set" = "跳过本组";
"Personal records" = "纪录";
+"Quick check-in" = "快速称重";
+"Save & start workout" = "保存并开始训练";
+"Start without weighing in" = "不称重直接开始";
+"Body weight" = "体重";
+"Less" = "更少";
+"More" = "更多";
"Last time: %@" = "上次: %@";
"No workout running" = "没有进行中的训练";
"Start one on your iPhone and it shows up here." = "在 iPhone 上开始,它就会出现在这里。";
@@ -45,3 +51,7 @@
"%lld avg · %lld max" = "平均 %lld · 最高 %lld";
"Set %lld of %lld" = "第 %lld 组,共 %lld 组";
"%lld of %lld sets" = "%lld / %lld 组";
+"Tap to change it." = "轻点以更改。";
+"Added weight" = "附加重量";
+"Your rest, your next set, or today's workout." = "你的休息、下一组或今天的训练。";
+"Opens openGym." = "打开 openGym。";
diff --git a/frontend/ios/App/Watch/zh-Hant.lproj/Localizable.strings b/frontend/ios/App/Watch/zh-Hant.lproj/Localizable.strings
index 96cbd8235..ee742508f 100644
--- a/frontend/ios/App/Watch/zh-Hant.lproj/Localizable.strings
+++ b/frontend/ios/App/Watch/zh-Hant.lproj/Localizable.strings
@@ -22,6 +22,12 @@
"Time" = "時間";
"Skip set" = "略過這一組";
"Personal records" = "個人紀錄";
+"Quick check-in" = "快速記錄體重";
+"Save & start workout" = "儲存並開始訓練";
+"Start without weighing in" = "不量體重直接開始";
+"Body weight" = "體重";
+"Less" = "較少";
+"More" = "較多";
"Last time: %@" = "上次: %@";
"No workout running" = "沒有進行中的訓練";
"Start one on your iPhone and it shows up here." = "在 iPhone 上開始,它就會出現在這裡。";
@@ -45,3 +51,7 @@
"%lld avg · %lld max" = "平均 %lld · 最高 %lld";
"Set %lld of %lld" = "第 %lld 組,共 %lld 組";
"%lld of %lld sets" = "%lld / %lld 組";
+"Tap to change it." = "輕點以更改。";
+"Added weight" = "附加重量";
+"Your rest, your next set, or today's workout." = "你的休息、下一組或今天的訓練。";
+"Opens openGym." = "打開 openGym。";
diff --git a/frontend/ios/App/WatchCore/Sources/WatchCore/Model.swift b/frontend/ios/App/WatchCore/Sources/WatchCore/Model.swift
index da813f54b..f262b6a07 100644
--- a/frontend/ios/App/WatchCore/Sources/WatchCore/Model.swift
+++ b/frontend/ios/App/WatchCore/Sources/WatchCore/Model.swift
@@ -61,6 +61,8 @@ struct Entry: Codable, Equatable {
var best: BestSet?
/// Assisted (a lighter weight is the better one).
var assisted: Bool?
+ /// The weight step this exercise moves in on the phone (its plates or machine stack).
+ var step: Double?
var isTimed: Bool { mode == "time" }
var isCardio: Bool { mode == "cardio" }
@@ -116,6 +118,40 @@ struct WatchSettings: Codable, Equatable {
var health: Bool?
/// The wrist taps when a rest is over.
var restHaptics: Bool?
- /// What the Digital Crown turns first on a set: "reps" or "weight".
+ /// What the Digital Crown turns first on a set: "reps" or "weight" (older phones).
var crown: String?
+ /// The app's language ("en", "de", "pt-BR", …): the watch shows its words in it.
+ var lang: String?
+ /// Whether a workout started here asks for the body weight first (the phone's check-in).
+ var weighIn: Bool?
+ /// The last body weight logged, where the weigh-in's crown starts.
+ var lastBw: Double?
+ /// What the watch shows during a workout (Settings → Apple Watch); nil is the default.
+ var show: WatchShow?
+}
+
+/// What a workout screen shows. Each nil means its default.
+struct WatchShow: Codable, Equatable {
+ /// The exercise's animation (on).
+ var clip: Bool?
+ /// The heart rate (on).
+ var hr: Bool?
+ /// What was lifted last time (on).
+ var last: Bool?
+ /// The time since the start (off).
+ var elapsed: Bool?
+ /// Calories so far (off).
+ var kcal: Bool?
+ /// The next exercise on the rest screen (on).
+ var next: Bool?
+ /// The rest as a ring with the countdown ("ring", default) or the countdown alone ("plain").
+ var rest: String?
+
+ var showClip: Bool { clip ?? true }
+ var showHr: Bool { hr ?? true }
+ var showLast: Bool { last ?? true }
+ var showElapsed: Bool { elapsed ?? false }
+ var showKcal: Bool { kcal ?? false }
+ var showNext: Bool { next ?? true }
+ var restRing: Bool { rest != "plain" }
}
diff --git a/frontend/ios/App/WatchCore/Sources/WatchCore/SessionCore.swift b/frontend/ios/App/WatchCore/Sources/WatchCore/SessionCore.swift
index bf68c4024..b6c519212 100644
--- a/frontend/ios/App/WatchCore/Sources/WatchCore/SessionCore.swift
+++ b/frontend/ios/App/WatchCore/Sources/WatchCore/SessionCore.swift
@@ -222,15 +222,23 @@ enum SessionCore {
return (count, true)
}
- /// A ready session started here.
- static func start(_ s0: SessionState, _ session: ReadySession, wid: String, at: Double, id: String) -> (SessionState, Event) {
+ /// The weigh-in before a workout started here, for the phone's body weight list.
+ static func weighIn(_ w: Double, at: Double, id: String) -> Event? {
+ guard w > 0, w < 700 else { return nil }
+ return ["id": id, "type": "weighIn", "w": (w * 10).rounded() / 10, "at": at]
+ }
+
+ /// A ready session started here, with the body weight just weighed in (or none).
+ static func start(_ s0: SessionState, _ session: ReadySession, wid: String, at: Double, id: String, bw: Double? = nil) -> (SessionState, Event) {
var s = s0
s.workout = ActiveWorkout(id: wid, name: session.name, unit: s.unit, cur: 0, restSec: s.restSec, rest: nil, entries: session.entries, start: at)
s.startedHere = wid
s.pending = [:]
s.skipped = nil
s.entryIndex = 0
- return (s, ["id": id, "type": "start", "routineIds": session.routineIds, "wid": wid, "at": at])
+ var event: Event = ["id": id, "type": "start", "routineIds": session.routineIds, "wid": wid, "at": at]
+ if let bw = bw, bw > 0 { event["bw"] = (bw * 10).rounded() / 10 }
+ return (s, event)
}
/// The session finished here.
diff --git a/frontend/ios/App/WatchCore/Tests/WatchCoreTests/SetTypesTests.swift b/frontend/ios/App/WatchCore/Tests/WatchCoreTests/SetTypesTests.swift
index 93e526914..ecfc6fd0d 100644
--- a/frontend/ios/App/WatchCore/Tests/WatchCoreTests/SetTypesTests.swift
+++ b/frontend/ios/App/WatchCore/Tests/WatchCoreTests/SetTypesTests.swift
@@ -177,3 +177,38 @@ final class SetTypesTests: XCTestCase {
XCTAssertNil(s.pending["x#0"]?.sec)
}
}
+
+/// The weigh-in, the app's language and the display choices the phone sends.
+final class SettingsAndWeighInTests: XCTestCase {
+ func testTheWeighInGoesOutAndRidesOnTheStart() {
+ let ev = SessionCore.weighIn(81.44, at: 5, id: "b")
+ XCTAssertEqual(ev?["type"] as? String, "weighIn")
+ XCTAssertEqual(ev?["w"] as? Double, 81.4)
+ XCTAssertNil(SessionCore.weighIn(0, at: 5, id: "x"))
+ let ready = ReadySession(routineIds: ["r"], name: "Push", entries: [])
+ let (_, start) = SessionCore.start(SessionState(), ready, wid: "watch-1", at: 5, id: "s", bw: 81.44)
+ XCTAssertEqual(start["bw"] as? Double, 81.4)
+ let (_, noBw) = SessionCore.start(SessionState(), ready, wid: "watch-2", at: 5, id: "s2")
+ XCTAssertNil(noBw["bw"])
+ }
+
+ func testTheSettingsReadWithAndWithoutTheNewFields() throws {
+ let json = #"{"v":1,"settings":{"health":true,"lang":"pt-BR","weighIn":false,"lastBw":80.5,"show":{"clip":false,"elapsed":true,"rest":"plain"}},"active":{"id":"w","name":"A","unit":"kg","cur":0,"restSec":90,"entries":[{"id":"x","name":"X","mode":"reps","step":1.25,"sets":[]}]}}"#
+ let snap = try JSONDecoder().decode(Snapshot.self, from: Data(json.utf8))
+ let s = SessionCore.applySnapshot(SessionState(), snap)
+ XCTAssertEqual(s.settings.lang, "pt-BR")
+ XCTAssertEqual(s.settings.weighIn, false)
+ XCTAssertEqual(s.settings.lastBw, 80.5)
+ let show = s.settings.show ?? WatchShow()
+ XCTAssertFalse(show.showClip)
+ XCTAssertTrue(show.showHr)
+ XCTAssertTrue(show.showElapsed)
+ XCTAssertFalse(show.restRing)
+ XCTAssertEqual(s.workout?.entries[0].step, 1.25)
+ let old = try JSONDecoder().decode(Snapshot.self, from: Data(#"{"v":1,"settings":{"health":false}}"#.utf8))
+ let d = old.settings?.show ?? WatchShow()
+ XCTAssertTrue(d.showClip && d.showHr && d.showLast && d.showNext && d.restRing)
+ XCTAssertFalse(d.showElapsed || d.showKcal)
+ XCTAssertNil(old.settings?.lang)
+ }
+}
diff --git a/frontend/ios/App/WatchWidgets/OpenGymWidgets.swift b/frontend/ios/App/WatchWidgets/OpenGymWidgets.swift
index ad7d3cd41..97ee4ae3f 100644
--- a/frontend/ios/App/WatchWidgets/OpenGymWidgets.swift
+++ b/frontend/ios/App/WatchWidgets/OpenGymWidgets.swift
@@ -93,7 +93,7 @@ struct WidgetView: View {
} else {
ZStack {
AccessoryWidgetBackground()
- Image(systemName: "dumbbell.fill").font(.title3)
+ OpenGymLogo().padding(10)
}
}
case .accessoryInline:
@@ -143,7 +143,10 @@ struct WidgetView: View {
.gaugeStyle(.accessoryLinearCapacity)
}
} else {
- Label("openGym", systemImage: "dumbbell.fill").font(.headline)
+ HStack(spacing: 6) {
+ OpenGymLogo().frame(width: 26, height: 16)
+ Text(verbatim: "openGym").font(.headline)
+ }
}
}
.frame(maxWidth: .infinity, alignment: .leading)
@@ -152,10 +155,18 @@ struct WidgetView: View {
}
@main
+struct OpenGymWidgets: WidgetBundle {
+ var body: some Widget {
+ OpenGymWidget()
+ OpenGymLauncher()
+ }
+}
+
struct OpenGymWidget: Widget {
var body: some WidgetConfiguration {
StaticConfiguration(kind: "OpenGymWorkout", provider: Provider()) { entry in
WidgetView(entry: entry)
+ .environment(\.locale, entry.state.locale)
.containerBackground(.black, for: .widget)
// A tap on "Start" opens the watch app and starts today's workout.
.widgetURL(entry.state.mode == "today" ? URL(string: "opengym-watch://start") : URL(string: "opengym-watch://open"))
@@ -165,3 +176,62 @@ struct OpenGymWidget: Widget {
.supportedFamilies([.accessoryRectangular, .accessoryCircular, .accessoryInline, .accessoryCorner])
}
}
+
+/*
+ * The plain one: openGym's logo on the watch face, a tap opens the app. For a face that should
+ * always have the way in, whatever is going on (the other widget changes with the workout).
+ */
+struct LauncherProvider: TimelineProvider {
+ func placeholder(in context: Context) -> Entry { Entry(date: Date(), state: .idle) }
+ func getSnapshot(in context: Context, completion: @escaping (Entry) -> Void) { completion(Entry(date: Date(), state: WidgetState.read())) }
+ func getTimeline(in context: Context, completion: @escaping (Timeline<Entry>) -> Void) {
+ completion(Timeline(entries: [Entry(date: Date(), state: WidgetState.read())], policy: .never))
+ }
+}
+
+struct LauncherView: View {
+ @Environment(\.widgetFamily) var family
+ let entry: Entry
+
+ var body: some View {
+ switch family {
+ case .accessoryCircular:
+ ZStack {
+ AccessoryWidgetBackground()
+ OpenGymLogo().padding(9)
+ }
+ case .accessoryCorner:
+ OpenGymLogo()
+ .padding(4)
+ .widgetLabel { Text(verbatim: "openGym") }
+ case .accessoryInline:
+ Text(verbatim: "openGym")
+ default:
+ HStack(spacing: 8) {
+ OpenGymLogo().frame(width: 30, height: 20)
+ VStack(alignment: .leading, spacing: 0) {
+ Text(verbatim: "openGym").font(.headline)
+ if entry.state.mode == "today" {
+ Text(verbatim: entry.state.title).font(.caption2).foregroundStyle(.secondary).lineLimit(1)
+ }
+ }
+ }
+ .frame(maxWidth: .infinity, alignment: .leading)
+ }
+ }
+}
+
+struct OpenGymLauncher: Widget {
+ var body: some WidgetConfiguration {
+ StaticConfiguration(kind: "OpenGymLauncher", provider: LauncherProvider()) { entry in
+ LauncherView(entry: entry)
+ .environment(\.locale, entry.state.locale)
+ .containerBackground(.black, for: .widget)
+ .widgetURL(URL(string: "opengym-watch://open"))
+ }
+ .configurationDisplayName("openGym")
+ .description("Opens openGym.")
+ .supportedFamilies([.accessoryCircular, .accessoryCorner, .accessoryInline, .accessoryRectangular])
+ }
+}
+
diff --git a/frontend/ios/App/WatchWidgets/ar.lproj/Localizable.strings b/frontend/ios/App/WatchWidgets/ar.lproj/Localizable.strings
index 5dc385d72..16ee5cf52 100644
--- a/frontend/ios/App/WatchWidgets/ar.lproj/Localizable.strings
+++ b/frontend/ios/App/WatchWidgets/ar.lproj/Localizable.strings
@@ -22,6 +22,12 @@
"Time" = "الوقت";
"Skip set" = "تخطي المجموعة";
"Personal records" = "الأرقام القياسية";
+"Quick check-in" = "تحديث سريع";
+"Save & start workout" = "حفظ وبدء التمرين";
+"Start without weighing in" = "بدء دون تسجيل الوزن";
+"Body weight" = "وزن الجسم";
+"Less" = "أقل";
+"More" = "أكثر";
"Last time: %@" = "المرة السابقة: %@";
"No workout running" = "لا يوجد تمرين جارٍ";
"Start one on your iPhone and it shows up here." = "ابدأ تمرينًا على iPhone وسيظهر هنا.";
@@ -45,3 +51,7 @@
"%lld avg · %lld max" = "متوسط %lld · أقصى %lld";
"Set %lld of %lld" = "المجموعة %lld من %lld";
"%lld of %lld sets" = "%lld من %lld مجموعات";
+"Tap to change it." = "اضغط للتغيير.";
+"Added weight" = "وزن إضافي";
+"Your rest, your next set, or today's workout." = "راحتك، أو مجموعتك التالية، أو تمرين اليوم.";
+"Opens openGym." = "يفتح openGym.";
diff --git a/frontend/ios/App/WatchWidgets/bn.lproj/Localizable.strings b/frontend/ios/App/WatchWidgets/bn.lproj/Localizable.strings
index 54fdb16c6..7b85b666c 100644
--- a/frontend/ios/App/WatchWidgets/bn.lproj/Localizable.strings
+++ b/frontend/ios/App/WatchWidgets/bn.lproj/Localizable.strings
@@ -22,6 +22,12 @@
"Time" = "সময়";
"Skip set" = "সেট এড়িয়ে যান";
"Personal records" = "রেকর্ড";
+"Quick check-in" = "দ্রুত চেক-ইন";
+"Save & start workout" = "সেভ করে ওয়ার্কআউট শুরু করুন";
+"Start without weighing in" = "ওজন না মেপেই শুরু করুন";
+"Body weight" = "শরীরের ওজন";
+"Less" = "কম";
+"More" = "বেশি";
"Last time: %@" = "গতবার: %@";
"No workout running" = "কোনো ওয়ার্কআউট চলছে না";
"Start one on your iPhone and it shows up here." = "iPhone-এ একটি শুরু করুন, এখানে দেখা যাবে।";
@@ -45,3 +51,7 @@
"%lld avg · %lld max" = "গড় %lld · সর্বোচ্চ %lld";
"Set %lld of %lld" = "সেট %lld / %lld";
"%lld of %lld sets" = "%lld / %lld সেট";
+"Tap to change it." = "বদলাতে ট্যাপ করুন।";
+"Added weight" = "অতিরিক্ত ওজন";
+"Your rest, your next set, or today's workout." = "আপনার বিশ্রাম, পরের সেট, বা আজকের ওয়ার্কআউট।";
+"Opens openGym." = "openGym খোলে।";
diff --git a/frontend/ios/App/WatchWidgets/de.lproj/Localizable.strings b/frontend/ios/App/WatchWidgets/de.lproj/Localizable.strings
index 07d105e57..1bea5e3ca 100644
--- a/frontend/ios/App/WatchWidgets/de.lproj/Localizable.strings
+++ b/frontend/ios/App/WatchWidgets/de.lproj/Localizable.strings
@@ -22,6 +22,12 @@
"Time" = "Zeit";
"Skip set" = "Satz überspringen";
"Personal records" = "Rekorde";
+"Quick check-in" = "Kurzer Check-in";
+"Save & start workout" = "Speichern & Training starten";
+"Start without weighing in" = "Ohne Wiegen starten";
+"Body weight" = "Körpergewicht";
+"Less" = "Weniger";
+"More" = "Mehr";
"Last time: %@" = "Letztes Mal: %@";
"No workout running" = "Kein Training läuft";
"Start one on your iPhone and it shows up here." = "Starte eins auf dem iPhone, dann taucht es hier auf.";
@@ -45,3 +51,7 @@
"%lld avg · %lld max" = "Ø %lld · max. %lld";
"Set %lld of %lld" = "Satz %lld von %lld";
"%lld of %lld sets" = "%lld von %lld Sätzen";
+"Tap to change it." = "Tippe, um es zu ändern.";
+"Added weight" = "Zusatzgewicht";
+"Your rest, your next set, or today's workout." = "Deine Pause, dein nächster Satz oder das Training von heute.";
+"Opens openGym." = "Öffnet openGym.";
diff --git a/frontend/ios/App/WatchWidgets/en.lproj/Localizable.strings b/frontend/ios/App/WatchWidgets/en.lproj/Localizable.strings
new file mode 100644
index 000000000..5a5812ac2
--- /dev/null
+++ b/frontend/ios/App/WatchWidgets/en.lproj/Localizable.strings
@@ -0,0 +1,57 @@
+/* openGym on the Apple Watch, en. Written by ios/ci/watch-strings.mjs: change that, not this. */
+
+"Today" = "Today";
+"Start workout" = "Start workout";
+"Done" = "Done";
+"Warm-up" = "Warm-up";
+"Reps" = "Reps";
+"Rest" = "Rest";
+"Skip" = "Skip";
+"Finish workout" = "Finish workout";
+"Finish workout?" = "Finish workout?";
+"Finish and save" = "Finish and save";
+"Cancel" = "Cancel";
+"Rest’s over. Next set!" = "Rest’s over. Next set!";
+"Left" = "Left";
+"Right" = "Right";
+"Bodyweight" = "Bodyweight";
+"Superset" = "Superset";
+"Weight" = "Weight";
+"Sets" = "Sets";
+"Volume" = "Volume";
+"Time" = "Time";
+"Skip set" = "Skip set";
+"Personal records" = "Personal records";
+"Quick check-in" = "Quick check-in";
+"Save & start workout" = "Save & start workout";
+"Start without weighing in" = "Start without weighing in";
+"Body weight" = "Body weight";
+"Less" = "Less";
+"More" = "More";
+"Last time: %@" = "Last time: %@";
+"No workout running" = "No workout running";
+"Start one on your iPhone and it shows up here." = "Start one on your iPhone and it shows up here.";
+"All sets done" = "All sets done";
+"measuring" = "measuring";
+"Next: %@, set %lld" = "Next: %@, set %lld";
+"%@, set %lld" = "%@, set %lld";
+"Calories" = "Calories";
+"Heart rate" = "Heart rate";
+"Hold" = "Hold";
+"Stop" = "Stop";
+"Start hold" = "Start hold";
+"Workout saved" = "Workout saved";
+"Ended on your iPhone" = "Ended on your iPhone";
+"Tap a dot to do a skipped set." = "Tap a dot to do a skipped set.";
+"Log this one on your iPhone." = "Log this one on your iPhone.";
+"Saved on the watch, syncs later" = "Saved on the watch, syncs later";
+"Skip this set?" = "Skip this set?";
+"Turn the Digital Crown to change it." = "Turn the Digital Crown to change it.";
+"%lld done" = "%lld done";
+"%lld avg · %lld max" = "%lld avg · %lld max";
+"Set %lld of %lld" = "Set %lld of %lld";
+"%lld of %lld sets" = "%lld of %lld sets";
+"Tap to change it." = "Tap to change it.";
+"Added weight" = "Added weight";
+"Your rest, your next set, or today's workout." = "Your rest, your next set, or today's workout.";
+"Opens openGym." = "Opens openGym.";
diff --git a/frontend/ios/App/WatchWidgets/es.lproj/Localizable.strings b/frontend/ios/App/WatchWidgets/es.lproj/Localizable.strings
index 42792036b..f93dbc5bb 100644
--- a/frontend/ios/App/WatchWidgets/es.lproj/Localizable.strings
+++ b/frontend/ios/App/WatchWidgets/es.lproj/Localizable.strings
@@ -22,6 +22,12 @@
"Time" = "Tiempo";
"Skip set" = "Saltar serie";
"Personal records" = "Récords";
+"Quick check-in" = "Chequeo rápido";
+"Save & start workout" = "Guardar y empezar";
+"Start without weighing in" = "Empezar sin pesarse";
+"Body weight" = "Peso corporal";
+"Less" = "Menos";
+"More" = "Más";
"Last time: %@" = "La última vez: %@";
"No workout running" = "Ningún entreno en curso";
"Start one on your iPhone and it shows up here." = "Empieza uno en tu iPhone y aparecerá aquí.";
@@ -45,3 +51,7 @@
"%lld avg · %lld max" = "media %lld · máx. %lld";
"Set %lld of %lld" = "Serie %lld de %lld";
"%lld of %lld sets" = "%lld de %lld series";
+"Tap to change it." = "Toca para cambiarlo.";
+"Added weight" = "Peso añadido";
+"Your rest, your next set, or today's workout." = "Tu descanso, tu próxima serie o el entreno de hoy.";
+"Opens openGym." = "Abre openGym.";
diff --git a/frontend/ios/App/WatchWidgets/fr.lproj/Localizable.strings b/frontend/ios/App/WatchWidgets/fr.lproj/Localizable.strings
index d7795d7f7..d6bb12b57 100644
--- a/frontend/ios/App/WatchWidgets/fr.lproj/Localizable.strings
+++ b/frontend/ios/App/WatchWidgets/fr.lproj/Localizable.strings
@@ -22,6 +22,12 @@
"Time" = "Temps";
"Skip set" = "Passer la série";
"Personal records" = "Records";
+"Quick check-in" = "Pesée rapide";
+"Save & start workout" = "Enregistrer et démarrer";
+"Start without weighing in" = "Commencer sans se peser";
+"Body weight" = "Poids corporel";
+"Less" = "Moins";
+"More" = "Plus";
"Last time: %@" = "La dernière fois: %@";
"No workout running" = "Aucune séance en cours";
"Start one on your iPhone and it shows up here." = "Lance-en une sur ton iPhone et elle apparaît ici.";
@@ -45,3 +51,7 @@
"%lld avg · %lld max" = "moy. %lld · max %lld";
"Set %lld of %lld" = "Série %lld sur %lld";
"%lld of %lld sets" = "%lld séries sur %lld";
+"Tap to change it." = "Touche pour le changer.";
+"Added weight" = "Poids ajouté";
+"Your rest, your next set, or today's workout." = "Ton repos, ta prochaine série ou la séance du jour.";
+"Opens openGym." = "Ouvre openGym.";
diff --git a/frontend/ios/App/WatchWidgets/hi.lproj/Localizable.strings b/frontend/ios/App/WatchWidgets/hi.lproj/Localizable.strings
index f071d5927..93a82fac2 100644
--- a/frontend/ios/App/WatchWidgets/hi.lproj/Localizable.strings
+++ b/frontend/ios/App/WatchWidgets/hi.lproj/Localizable.strings
@@ -22,6 +22,12 @@
"Time" = "समय";
"Skip set" = "सेट छोड़ें";
"Personal records" = "रिकॉर्ड";
+"Quick check-in" = "झटपट वज़न चेक";
+"Save & start workout" = "सहेजें और वर्कआउट शुरू करें";
+"Start without weighing in" = "बिना तौले शुरू करें";
+"Body weight" = "शरीर का वज़न";
+"Less" = "कम";
+"More" = "अधिक";
"Last time: %@" = "पिछली बार: %@";
"No workout running" = "कोई वर्कआउट नहीं चल रहा";
"Start one on your iPhone and it shows up here." = "iPhone पर एक शुरू करें, यह यहाँ दिखेगा।";
@@ -45,3 +51,7 @@
"%lld avg · %lld max" = "औसत %lld · अधिकतम %lld";
"Set %lld of %lld" = "सेट %lld / %lld";
"%lld of %lld sets" = "%lld / %lld सेट";
+"Tap to change it." = "बदलने के लिए टैप करें।";
+"Added weight" = "अतिरिक्त वज़न";
+"Your rest, your next set, or today's workout." = "आपका आराम, अगला सेट, या आज का वर्कआउट।";
+"Opens openGym." = "openGym खोलता है।";
diff --git a/frontend/ios/App/WatchWidgets/hu.lproj/Localizable.strings b/frontend/ios/App/WatchWidgets/hu.lproj/Localizable.strings
index 051d2dc86..6e6a093e4 100644
--- a/frontend/ios/App/WatchWidgets/hu.lproj/Localizable.strings
+++ b/frontend/ios/App/WatchWidgets/hu.lproj/Localizable.strings
@@ -22,6 +22,12 @@
"Time" = "Idő";
"Skip set" = "Sorozat kihagyása";
"Personal records" = "Rekordok";
+"Quick check-in" = "Gyors bejelentkezés";
+"Save & start workout" = "Mentés és edzés indítása";
+"Start without weighing in" = "Indítás mérés nélkül";
+"Body weight" = "Testsúly";
+"Less" = "Kevesebb";
+"More" = "Több";
"Last time: %@" = "Legutóbb: %@";
"No workout running" = "Nincs folyamatban edzés";
"Start one on your iPhone and it shows up here." = "Indíts egyet az iPhone-on, és itt megjelenik.";
@@ -45,3 +51,7 @@
"%lld avg · %lld max" = "átl. %lld · max. %lld";
"Set %lld of %lld" = "%lld. sorozat / %lld";
"%lld of %lld sets" = "%lld / %lld sorozat";
+"Tap to change it." = "Koppints a módosításhoz.";
+"Added weight" = "Plusz súly";
+"Your rest, your next set, or today's workout." = "A pihenőd, a következő sorozat vagy a mai edzés.";
+"Opens openGym." = "Megnyitja az openGymet.";
diff --git a/frontend/ios/App/WatchWidgets/it.lproj/Localizable.strings b/frontend/ios/App/WatchWidgets/it.lproj/Localizable.strings
index a43cb7b96..622fc1d15 100644
--- a/frontend/ios/App/WatchWidgets/it.lproj/Localizable.strings
+++ b/frontend/ios/App/WatchWidgets/it.lproj/Localizable.strings
@@ -22,6 +22,12 @@
"Time" = "Tempo";
"Skip set" = "Salta serie";
"Personal records" = "Record";
+"Quick check-in" = "Check-in veloce";
+"Save & start workout" = "Salva e inizia";
+"Start without weighing in" = "Inizia senza pesarti";
+"Body weight" = "Peso corporeo";
+"Less" = "Meno";
+"More" = "Più";
"Last time: %@" = "L'ultima volta: %@";
"No workout running" = "Nessun allenamento in corso";
"Start one on your iPhone and it shows up here." = "Avviane uno sull’iPhone e comparirà qui.";
@@ -45,3 +51,7 @@
"%lld avg · %lld max" = "media %lld · max %lld";
"Set %lld of %lld" = "Serie %lld di %lld";
"%lld of %lld sets" = "%lld serie su %lld";
+"Tap to change it." = "Tocca per cambiarlo.";
+"Added weight" = "Peso aggiunto";
+"Your rest, your next set, or today's workout." = "Il tuo recupero, la prossima serie o l’allenamento di oggi.";
+"Opens openGym." = "Apre openGym.";
diff --git a/frontend/ios/App/WatchWidgets/ko.lproj/Localizable.strings b/frontend/ios/App/WatchWidgets/ko.lproj/Localizable.strings
index d9bf7b69a..8386023c7 100644
--- a/frontend/ios/App/WatchWidgets/ko.lproj/Localizable.strings
+++ b/frontend/ios/App/WatchWidgets/ko.lproj/Localizable.strings
@@ -22,6 +22,12 @@
"Time" = "시간";
"Skip set" = "세트 건너뛰기";
"Personal records" = "신기록";
+"Quick check-in" = "빠른 체중 체크";
+"Save & start workout" = "저장하고 운동 시작";
+"Start without weighing in" = "체중 기록 없이 시작";
+"Body weight" = "체중";
+"Less" = "적음";
+"More" = "많음";
"Last time: %@" = "지난번: %@";
"No workout running" = "진행 중인 운동이 없어요";
"Start one on your iPhone and it shows up here." = "iPhone에서 시작하면 여기에 나타나요.";
@@ -45,3 +51,7 @@
"%lld avg · %lld max" = "평균 %lld · 최대 %lld";
"Set %lld of %lld" = "%lld/%lld세트";
"%lld of %lld sets" = "%lld/%lld세트";
+"Tap to change it." = "탭해서 바꾸세요.";
+"Added weight" = "추가 무게";
+"Your rest, your next set, or today's workout." = "휴식, 다음 세트, 또는 오늘의 운동.";
+"Opens openGym." = "openGym을 열어요.";
diff --git a/frontend/ios/App/WatchWidgets/pl.lproj/Localizable.strings b/frontend/ios/App/WatchWidgets/pl.lproj/Localizable.strings
index d85b34bbb..3156c7298 100644
--- a/frontend/ios/App/WatchWidgets/pl.lproj/Localizable.strings
+++ b/frontend/ios/App/WatchWidgets/pl.lproj/Localizable.strings
@@ -22,6 +22,12 @@
"Time" = "Czas";
"Skip set" = "Pomiń serię";
"Personal records" = "Rekordy";
+"Quick check-in" = "Szybkie ważenie";
+"Save & start workout" = "Zapisz i zacznij trening";
+"Start without weighing in" = "Zacznij bez ważenia";
+"Body weight" = "Masa ciała";
+"Less" = "Mniej";
+"More" = "Więcej";
"Last time: %@" = "Ostatnio: %@";
"No workout running" = "Żaden trening nie trwa";
"Start one on your iPhone and it shows up here." = "Zacznij trening na iPhonie, a pojawi się tutaj.";
@@ -45,3 +51,7 @@
"%lld avg · %lld max" = "śr. %lld · maks. %lld";
"Set %lld of %lld" = "Seria %lld z %lld";
"%lld of %lld sets" = "%lld z %lld serii";
+"Tap to change it." = "Stuknij, by zmienić.";
+"Added weight" = "Dodatkowy ciężar";
+"Your rest, your next set, or today's workout." = "Twoja przerwa, następna seria albo dzisiejszy trening.";
+"Opens openGym." = "Otwiera openGym.";
diff --git a/frontend/ios/App/WatchWidgets/pt-BR.lproj/Localizable.strings b/frontend/ios/App/WatchWidgets/pt-BR.lproj/Localizable.strings
index 2d5723461..28ed62af9 100644
--- a/frontend/ios/App/WatchWidgets/pt-BR.lproj/Localizable.strings
+++ b/frontend/ios/App/WatchWidgets/pt-BR.lproj/Localizable.strings
@@ -22,6 +22,12 @@
"Time" = "Tempo";
"Skip set" = "Pular série";
"Personal records" = "Recordes";
+"Quick check-in" = "Check-in rápido";
+"Save & start workout" = "Salvar e iniciar treino";
+"Start without weighing in" = "Iniciar sem se pesar";
+"Body weight" = "Peso corporal";
+"Less" = "Menos";
+"More" = "Mais";
"Last time: %@" = "Da última vez: %@";
"No workout running" = "Nenhum treino em andamento";
"Start one on your iPhone and it shows up here." = "Comece um no iPhone e ele aparece aqui.";
@@ -45,3 +51,7 @@
"%lld avg · %lld max" = "média %lld · máx. %lld";
"Set %lld of %lld" = "Série %lld de %lld";
"%lld of %lld sets" = "%lld de %lld séries";
+"Tap to change it." = "Toque para mudar.";
+"Added weight" = "Peso adicional";
+"Your rest, your next set, or today's workout." = "Seu descanso, a próxima série ou o treino de hoje.";
+"Opens openGym." = "Abre o openGym.";
diff --git a/frontend/ios/App/WatchWidgets/pt-PT.lproj/Localizable.strings b/frontend/ios/App/WatchWidgets/pt-PT.lproj/Localizable.strings
index a53c2aefd..9c4c968dd 100644
--- a/frontend/ios/App/WatchWidgets/pt-PT.lproj/Localizable.strings
+++ b/frontend/ios/App/WatchWidgets/pt-PT.lproj/Localizable.strings
@@ -22,6 +22,12 @@
"Time" = "Tempo";
"Skip set" = "Saltar série";
"Personal records" = "Recordes";
+"Quick check-in" = "Check-in rápido";
+"Save & start workout" = "Guardar e começar treino";
+"Start without weighing in" = "Começar sem pesar";
+"Body weight" = "Peso corporal";
+"Less" = "Menos";
+"More" = "Mais";
"Last time: %@" = "Da última vez: %@";
"No workout running" = "Nenhum treino a decorrer";
"Start one on your iPhone and it shows up here." = "Começa um no iPhone e ele aparece aqui.";
@@ -45,3 +51,7 @@
"%lld avg · %lld max" = "média %lld · máx. %lld";
"Set %lld of %lld" = "Série %lld de %lld";
"%lld of %lld sets" = "%lld de %lld séries";
+"Tap to change it." = "Toca para mudar.";
+"Added weight" = "Peso adicional";
+"Your rest, your next set, or today's workout." = "O teu descanso, a próxima série ou o treino de hoje.";
+"Opens openGym." = "Abre o openGym.";
diff --git a/frontend/ios/App/WatchWidgets/ru.lproj/Localizable.strings b/frontend/ios/App/WatchWidgets/ru.lproj/Localizable.strings
index fd9dc19ff..1fa4ef45a 100644
--- a/frontend/ios/App/WatchWidgets/ru.lproj/Localizable.strings
+++ b/frontend/ios/App/WatchWidgets/ru.lproj/Localizable.strings
@@ -22,6 +22,12 @@
"Time" = "Время";
"Skip set" = "Пропустить подход";
"Personal records" = "Рекорды";
+"Quick check-in" = "Быстрое взвешивание";
+"Save & start workout" = "Сохранить и начать тренировку";
+"Start without weighing in" = "Начать без взвешивания";
+"Body weight" = "Вес тела";
+"Less" = "Меньше";
+"More" = "Больше";
"Last time: %@" = "В прошлый раз: %@";
"No workout running" = "Тренировка не идёт";
"Start one on your iPhone and it shows up here." = "Начните её на iPhone, и она появится здесь.";
@@ -45,3 +51,7 @@
"%lld avg · %lld max" = "ср. %lld · макс. %lld";
"Set %lld of %lld" = "Подход %lld из %lld";
"%lld of %lld sets" = "%lld из %lld подходов";
+"Tap to change it." = "Нажмите, чтобы изменить.";
+"Added weight" = "Доп. вес";
+"Your rest, your next set, or today's workout." = "Отдых, следующий подход или сегодняшняя тренировка.";
+"Opens openGym." = "Открывает openGym.";
diff --git a/frontend/ios/App/WatchWidgets/th.lproj/Localizable.strings b/frontend/ios/App/WatchWidgets/th.lproj/Localizable.strings
index bac0ed547..b94756df7 100644
--- a/frontend/ios/App/WatchWidgets/th.lproj/Localizable.strings
+++ b/frontend/ios/App/WatchWidgets/th.lproj/Localizable.strings
@@ -22,6 +22,12 @@
"Time" = "เวลา";
"Skip set" = "ข้ามเซ็ต";
"Personal records" = "สถิติใหม่";
+"Quick check-in" = "เช็คอินด่วน";
+"Save & start workout" = "บันทึกแล้วเริ่มออกกำลังกาย";
+"Start without weighing in" = "เริ่มโดยไม่ชั่งน้ำหนัก";
+"Body weight" = "น้ำหนักตัว";
+"Less" = "น้อย";
+"More" = "มาก";
"Last time: %@" = "ครั้งก่อน: %@";
"No workout running" = "ไม่มีการฝึกที่กำลังทำอยู่";
"Start one on your iPhone and it shows up here." = "เริ่มบน iPhone แล้วจะแสดงที่นี่";
@@ -45,3 +51,7 @@
"%lld avg · %lld max" = "เฉลี่ย %lld · สูงสุด %lld";
"Set %lld of %lld" = "เซ็ต %lld จาก %lld";
"%lld of %lld sets" = "%lld จาก %lld เซ็ต";
+"Tap to change it." = "แตะเพื่อเปลี่ยน";
+"Added weight" = "น้ำหนักเพิ่ม";
+"Your rest, your next set, or today's workout." = "ช่วงพัก เซ็ตถัดไป หรือการฝึกวันนี้";
+"Opens openGym." = "เปิด openGym";
diff --git a/frontend/ios/App/WatchWidgets/tr.lproj/Localizable.strings b/frontend/ios/App/WatchWidgets/tr.lproj/Localizable.strings
index f19cde8dd..43117253e 100644
--- a/frontend/ios/App/WatchWidgets/tr.lproj/Localizable.strings
+++ b/frontend/ios/App/WatchWidgets/tr.lproj/Localizable.strings
@@ -22,6 +22,12 @@
"Time" = "Süre";
"Skip set" = "Seti atla";
"Personal records" = "Rekorlar";
+"Quick check-in" = "Hızlı tartı";
+"Save & start workout" = "Kaydet ve antrenmana başla";
+"Start without weighing in" = "Tartılmadan başla";
+"Body weight" = "Vücut ağırlığı";
+"Less" = "Az";
+"More" = "Çok";
"Last time: %@" = "Geçen sefer: %@";
"No workout running" = "Devam eden antrenman yok";
"Start one on your iPhone and it shows up here." = "iPhone’unda bir tane başlat, burada görünür.";
@@ -45,3 +51,7 @@
"%lld avg · %lld max" = "ort. %lld · maks. %lld";
"Set %lld of %lld" = "Set %lld / %lld";
"%lld of %lld sets" = "%lld / %lld set";
+"Tap to change it." = "Değiştirmek için dokun.";
+"Added weight" = "Ek ağırlık";
+"Your rest, your next set, or today's workout." = "Dinlenmen, sıradaki setin ya da bugünkü antrenman.";
+"Opens openGym." = "openGym’i açar.";
diff --git a/frontend/ios/App/WatchWidgets/uk.lproj/Localizable.strings b/frontend/ios/App/WatchWidgets/uk.lproj/Localizable.strings
index c2e0a7237..8c15ec099 100644
--- a/frontend/ios/App/WatchWidgets/uk.lproj/Localizable.strings
+++ b/frontend/ios/App/WatchWidgets/uk.lproj/Localizable.strings
@@ -22,6 +22,12 @@
"Time" = "Час";
"Skip set" = "Пропустити підхід";
"Personal records" = "Рекорди";
+"Quick check-in" = "Швидке зважування";
+"Save & start workout" = "Зберегти й почати тренування";
+"Start without weighing in" = "Почати без зважування";
+"Body weight" = "Вага тіла";
+"Less" = "Менше";
+"More" = "Більше";
"Last time: %@" = "Минулого разу: %@";
"No workout running" = "Тренування не триває";
"Start one on your iPhone and it shows up here." = "Почни його на iPhone, і воно з’явиться тут.";
@@ -45,3 +51,7 @@
"%lld avg · %lld max" = "сер. %lld · макс. %lld";
"Set %lld of %lld" = "Підхід %lld з %lld";
"%lld of %lld sets" = "%lld з %lld підходів";
+"Tap to change it." = "Торкнись, щоб змінити.";
+"Added weight" = "Додаткова вага";
+"Your rest, your next set, or today's workout." = "Відпочинок, наступний підхід або сьогоднішнє тренування.";
+"Opens openGym." = "Відкриває openGym.";
diff --git a/frontend/ios/App/WatchWidgets/zh-Hans.lproj/Localizable.strings b/frontend/ios/App/WatchWidgets/zh-Hans.lproj/Localizable.strings
index a705c69ed..865a32fa9 100644
--- a/frontend/ios/App/WatchWidgets/zh-Hans.lproj/Localizable.strings
+++ b/frontend/ios/App/WatchWidgets/zh-Hans.lproj/Localizable.strings
@@ -22,6 +22,12 @@
"Time" = "时间";
"Skip set" = "跳过本组";
"Personal records" = "纪录";
+"Quick check-in" = "快速称重";
+"Save & start workout" = "保存并开始训练";
+"Start without weighing in" = "不称重直接开始";
+"Body weight" = "体重";
+"Less" = "更少";
+"More" = "更多";
"Last time: %@" = "上次: %@";
"No workout running" = "没有进行中的训练";
"Start one on your iPhone and it shows up here." = "在 iPhone 上开始,它就会出现在这里。";
@@ -45,3 +51,7 @@
"%lld avg · %lld max" = "平均 %lld · 最高 %lld";
"Set %lld of %lld" = "第 %lld 组,共 %lld 组";
"%lld of %lld sets" = "%lld / %lld 组";
+"Tap to change it." = "轻点以更改。";
+"Added weight" = "附加重量";
+"Your rest, your next set, or today's workout." = "你的休息、下一组或今天的训练。";
+"Opens openGym." = "打开 openGym。";
diff --git a/frontend/ios/App/WatchWidgets/zh-Hant.lproj/Localizable.strings b/frontend/ios/App/WatchWidgets/zh-Hant.lproj/Localizable.strings
index 96cbd8235..ee742508f 100644
--- a/frontend/ios/App/WatchWidgets/zh-Hant.lproj/Localizable.strings
+++ b/frontend/ios/App/WatchWidgets/zh-Hant.lproj/Localizable.strings
@@ -22,6 +22,12 @@
"Time" = "時間";
"Skip set" = "略過這一組";
"Personal records" = "個人紀錄";
+"Quick check-in" = "快速記錄體重";
+"Save & start workout" = "儲存並開始訓練";
+"Start without weighing in" = "不量體重直接開始";
+"Body weight" = "體重";
+"Less" = "較少";
+"More" = "較多";
"Last time: %@" = "上次: %@";
"No workout running" = "沒有進行中的訓練";
"Start one on your iPhone and it shows up here." = "在 iPhone 上開始,它就會出現在這裡。";
@@ -45,3 +51,7 @@
"%lld avg · %lld max" = "平均 %lld · 最高 %lld";
"Set %lld of %lld" = "第 %lld 組,共 %lld 組";
"%lld of %lld sets" = "%lld / %lld 組";
+"Tap to change it." = "輕點以更改。";
+"Added weight" = "附加重量";
+"Your rest, your next set, or today's workout." = "你的休息、下一組或今天的訓練。";
+"Opens openGym." = "打開 openGym。";
diff --git a/frontend/ios/ci/watch-strings.mjs b/frontend/ios/ci/watch-strings.mjs
index c34a9fb75..7d5a568c1 100644
--- a/frontend/ios/ci/watch-strings.mjs
+++ b/frontend/ios/ci/watch-strings.mjs
@@ -43,6 +43,12 @@ const FROM_APP = {
'Time': 'Time',
'Skip set': 'Skip set',
'Personal records': 'PRs',
+ 'Quick check-in': 'Quick check-in',
+ 'Save & start workout': 'Save & start workout',
+ 'Start without weighing in': 'Start without weighing in',
+ 'Body weight': 'Body weight',
+ 'Less': 'Less',
+ 'More': 'More',
}
// Built from an app word: "Last time: %@".
const COMPOSED = { 'Last time: %@': ['Last time', w => `${w}: %@`] }
@@ -138,6 +144,18 @@ const OWN = {
'%lld of %lld sets': {
de: '%lld von %lld Sätzen', fr: '%lld séries sur %lld', es: '%lld de %lld series', it: '%lld serie su %lld', 'pt-PT': '%lld de %lld séries', 'pt-BR': '%lld de %lld séries', pl: '%lld z %lld serii', hu: '%lld / %lld sorozat', tr: '%lld / %lld set', ru: '%lld из %lld подходов', uk: '%lld з %lld підходів', ar: '%lld من %lld مجموعات', hi: '%lld / %lld सेट', bn: '%lld / %lld সেট', th: '%lld จาก %lld เซ็ต', ko: '%lld/%lld세트', 'zh-Hans': '%lld / %lld 组', 'zh-Hant': '%lld / %lld 組',
},
+ 'Tap to change it.': {
+ de: 'Tippe, um es zu ändern.', fr: 'Touche pour le changer.', es: 'Toca para cambiarlo.', it: 'Tocca per cambiarlo.', 'pt-PT': 'Toca para mudar.', 'pt-BR': 'Toque para mudar.', pl: 'Stuknij, by zmienić.', hu: 'Koppints a módosításhoz.', tr: 'Değiştirmek için dokun.', ru: 'Нажмите, чтобы изменить.', uk: 'Торкнись, щоб змінити.', ar: 'اضغط للتغيير.', hi: 'बदलने के लिए टैप करें।', bn: 'বদলাতে ট্যাপ করুন।', th: 'แตะเพื่อเปลี่ยน', ko: '탭해서 바꾸세요.', 'zh-Hans': '轻点以更改。', 'zh-Hant': '輕點以更改。',
+ },
+ 'Added weight': {
+ de: 'Zusatzgewicht', fr: 'Poids ajouté', es: 'Peso añadido', it: 'Peso aggiunto', 'pt-PT': 'Peso adicional', 'pt-BR': 'Peso adicional', pl: 'Dodatkowy ciężar', hu: 'Plusz súly', tr: 'Ek ağırlık', ru: 'Доп. вес', uk: 'Додаткова вага', ar: 'وزن إضافي', hi: 'अतिरिक्त वज़न', bn: 'অতিরিক্ত ওজন', th: 'น้ำหนักเพิ่ม', ko: '추가 무게', 'zh-Hans': '附加重量', 'zh-Hant': '附加重量',
+ },
+ 'Your rest, your next set, or today\'s workout.': {
+ de: 'Deine Pause, dein nächster Satz oder das Training von heute.', fr: 'Ton repos, ta prochaine série ou la séance du jour.', es: 'Tu descanso, tu próxima serie o el entreno de hoy.', it: 'Il tuo recupero, la prossima serie o l’allenamento di oggi.', 'pt-PT': 'O teu descanso, a próxima série ou o treino de hoje.', 'pt-BR': 'Seu descanso, a próxima série ou o treino de hoje.', pl: 'Twoja przerwa, następna seria albo dzisiejszy trening.', hu: 'A pihenőd, a következő sorozat vagy a mai edzés.', tr: 'Dinlenmen, sıradaki setin ya da bugünkü antrenman.', ru: 'Отдых, следующий подход или сегодняшняя тренировка.', uk: 'Відпочинок, наступний підхід або сьогоднішнє тренування.', ar: 'راحتك، أو مجموعتك التالية، أو تمرين اليوم.', hi: 'आपका आराम, अगला सेट, या आज का वर्कआउट।', bn: 'আপনার বিশ্রাম, পরের সেট, বা আজকের ওয়ার্কআউট।', th: 'ช่วงพัก เซ็ตถัดไป หรือการฝึกวันนี้', ko: '휴식, 다음 세트, 또는 오늘의 운동.', 'zh-Hans': '你的休息、下一组或今天的训练。', 'zh-Hant': '你的休息、下一組或今天的訓練。',
+ },
+ 'Opens openGym.': {
+ de: 'Öffnet openGym.', fr: 'Ouvre openGym.', es: 'Abre openGym.', it: 'Apre openGym.', 'pt-PT': 'Abre o openGym.', 'pt-BR': 'Abre o openGym.', pl: 'Otwiera openGym.', hu: 'Megnyitja az openGymet.', tr: 'openGym’i açar.', ru: 'Открывает openGym.', uk: 'Відкриває openGym.', ar: 'يفتح openGym.', hi: 'openGym खोलता है।', bn: 'openGym খোলে।', th: 'เปิด openGym', ko: 'openGym을 열어요.', 'zh-Hans': '打开 openGym。', 'zh-Hant': '打開 openGym。',
+ },
}
// Info.plist's own (the Apple Health permission prompts), into InfoPlist.strings.
@@ -191,5 +209,16 @@ for (const [pack, lproj] of Object.entries(LANGS)) {
}
writeFileSync(join(out, `${lproj}.lproj`, 'InfoPlist.strings'), plist.join('\n') + '\n')
}
+// English: every key as itself. Without an en.lproj a watch set to another language could show
+// that language's words to an app in English.
+{
+ const keys = [...Object.keys(FROM_APP), ...Object.keys(COMPOSED), ...Object.keys(OWN)]
+ const lines = ['/* openGym on the Apple Watch, en. Written by ios/ci/watch-strings.mjs: change that, not this. */', '']
+ for (const k of keys) lines.push(`"${esc(k)}" = "${esc(k)}";`)
+ for (const dir of [out, widgets]) {
+ mkdirSync(join(dir, 'en.lproj'), { recursive: true })
+ writeFileSync(join(dir, 'en.lproj', 'Localizable.strings'), lines.join('\n') + '\n')
+ }
+}
if (problems) process.exit(1)
console.log(`wrote ${Object.keys(LANGS).length} languages`)