fix wording

paca_championship
Raz 1 year ago
parent dc9e735711
commit ef20c838c4
  1. 16
      PadelClub/Views/Planning/PlanningSettingsView.swift

@ -190,6 +190,20 @@ struct PlanningSettingsView: View {
}
}
private func _localizedFooterMessage(groupStagesWithDateIsEmpty: Bool, roundsWithDateIsEmpty: Bool) -> String {
let base = "Supprime les horaires des matchs restants non démarrés."
let extend = " Garde les horaires définis pour les "
if groupStagesWithDateIsEmpty && roundsWithDateIsEmpty {
return base
} else if groupStagesWithDateIsEmpty, roundsWithDateIsEmpty == false {
return base + extend + "manches du tableau."
} else if roundsWithDateIsEmpty, groupStagesWithDateIsEmpty == false {
return base + extend + "poules."
} else {
return base + extend + "poules et les manches du tableau."
}
}
@ViewBuilder
private func _smartView() -> some View {
let allMatches = tournament.allMatches().filter({ $0.hasEnded() == false && $0.hasStarted() == false })
@ -221,7 +235,7 @@ struct PlanningSettingsView: View {
}
}
} footer: {
Text("Supprime les horaires des matchs restants non démarrés. Garde les horaires définis pour les poules et les manches du tableau.")
Text(_localizedFooterMessage(groupStagesWithDateIsEmpty: groupStagesWithDate.isEmpty, roundsWithDateIsEmpty: roundsWithDate.isEmpty))
}
}

Loading…
Cancel
Save