feat(i18n): add internationalization with i18next and expo-localization
This commit is contained in:
@@ -24,7 +24,6 @@ struct SwimView: View {
|
||||
workoutManager.currentSetIndex < workout.sets.count {
|
||||
let currentSet = workout.sets[workoutManager.currentSetIndex]
|
||||
|
||||
// Set/Rep info
|
||||
HStack {
|
||||
Text("Set \(workoutManager.currentSetIndex + 1)/\(workout.sets.count)")
|
||||
.font(.caption2)
|
||||
@@ -36,18 +35,15 @@ struct SwimView: View {
|
||||
.foregroundColor(.secondary)
|
||||
}
|
||||
|
||||
// Stroke name
|
||||
Text(currentSet.stroke)
|
||||
.font(.headline)
|
||||
.foregroundColor(.cyan)
|
||||
|
||||
// Current set distance
|
||||
Text("\(Int(workoutManager.currentSetDistanceSwum))/\(Int(workoutManager.currentSetTotalDistance))m")
|
||||
.font(.system(size: 36, weight: .bold, design: .rounded))
|
||||
.foregroundColor(.cyan)
|
||||
}
|
||||
|
||||
// Total distance
|
||||
HStack(spacing: 4) {
|
||||
Image(systemName: "figure.pool.swim")
|
||||
.font(.caption)
|
||||
@@ -57,11 +53,9 @@ struct SwimView: View {
|
||||
.foregroundColor(.secondary)
|
||||
}
|
||||
|
||||
// Elapsed time
|
||||
Text(formatTime(workoutManager.elapsedSeconds))
|
||||
.font(.system(.title3, design: .monospaced))
|
||||
|
||||
// Calories + Heart rate
|
||||
HStack(spacing: 12) {
|
||||
HStack(spacing: 4) {
|
||||
Image(systemName: "flame.fill")
|
||||
@@ -82,7 +76,6 @@ struct SwimView: View {
|
||||
}
|
||||
}
|
||||
|
||||
// Lap detection indicator
|
||||
if workoutManager.lapDetected {
|
||||
Text("Lap detected!")
|
||||
.font(.caption)
|
||||
@@ -138,7 +131,6 @@ struct RestView: View {
|
||||
.foregroundColor(.secondary)
|
||||
}
|
||||
|
||||
// Show stats during rest too
|
||||
HStack(spacing: 12) {
|
||||
HStack(spacing: 4) {
|
||||
Image(systemName: "figure.pool.swim")
|
||||
|
||||
Reference in New Issue
Block a user