diff --git a/lib/l10n/arb/app_de.arb b/lib/l10n/arb/app_de.arb index 65aa2b3..fa976b5 100644 --- a/lib/l10n/arb/app_de.arb +++ b/lib/l10n/arb/app_de.arb @@ -61,6 +61,7 @@ "no_players_found_with_that_name": "Keine Spieler:in mit diesem Namen gefunden", "no_players_selected": "Keine Spieler:innen ausgewählt", "no_recent_matches_available": "Keine letzten Spiele verfügbar", + "no_results_entered_yet": "Noch keine Ergebnisse eingetragen", "no_second_match_available": "Kein zweites Spiel verfügbar", "no_statistics_available": "Keine Statistiken verfügbar", "none": "Kein", diff --git a/lib/l10n/arb/app_en.arb b/lib/l10n/arb/app_en.arb index cc07a45..c5ea0fc 100644 --- a/lib/l10n/arb/app_en.arb +++ b/lib/l10n/arb/app_en.arb @@ -188,6 +188,9 @@ "@no_recent_matches_available": { "description": "Message when no recent matches exist" }, + "@no_results_entered_yet": { + "description": "Message when no results have been entered yet" + }, "@no_second_match_available": { "description": "Message when no second match exists" }, @@ -371,6 +374,7 @@ "no_players_found_with_that_name": "No players found with that name", "no_players_selected": "No players selected", "no_recent_matches_available": "No recent matches available", + "no_results_entered_yet": "No results entered yet", "no_second_match_available": "No second match available", "no_statistics_available": "No statistics available", "none": "None", diff --git a/lib/l10n/generated/app_localizations.dart b/lib/l10n/generated/app_localizations.dart index 627d4b1..ad62957 100644 --- a/lib/l10n/generated/app_localizations.dart +++ b/lib/l10n/generated/app_localizations.dart @@ -464,6 +464,12 @@ abstract class AppLocalizations { /// **'No recent matches available'** String get no_recent_matches_available; + /// Message when no results have been entered yet + /// + /// In en, this message translates to: + /// **'No results entered yet'** + String get no_results_entered_yet; + /// Message when no second match exists /// /// In en, this message translates to: diff --git a/lib/l10n/generated/app_localizations_de.dart b/lib/l10n/generated/app_localizations_de.dart index 3078855..d78f926 100644 --- a/lib/l10n/generated/app_localizations_de.dart +++ b/lib/l10n/generated/app_localizations_de.dart @@ -197,6 +197,9 @@ class AppLocalizationsDe extends AppLocalizations { @override String get no_recent_matches_available => 'Keine letzten Spiele verfügbar'; + @override + String get no_results_entered_yet => 'Noch keine Ergebnisse eingetragen'; + @override String get no_second_match_available => 'Kein zweites Spiel verfügbar'; diff --git a/lib/l10n/generated/app_localizations_en.dart b/lib/l10n/generated/app_localizations_en.dart index 12d8a36..0dad111 100644 --- a/lib/l10n/generated/app_localizations_en.dart +++ b/lib/l10n/generated/app_localizations_en.dart @@ -197,6 +197,9 @@ class AppLocalizationsEn extends AppLocalizations { @override String get no_recent_matches_available => 'No recent matches available'; + @override + String get no_results_entered_yet => 'No results entered yet'; + @override String get no_second_match_available => 'No second match available'; diff --git a/lib/presentation/views/main_menu/match_view/match_profile_view.dart b/lib/presentation/views/main_menu/match_view/match_profile_view.dart index 11f7bd9..6c9241b 100644 --- a/lib/presentation/views/main_menu/match_view/match_profile_view.dart +++ b/lib/presentation/views/main_menu/match_view/match_profile_view.dart @@ -51,10 +51,6 @@ class _MatchProfileViewState extends State { @override Widget build(BuildContext context) { final loc = AppLocalizations.of(context); - final extraPlayersCount = - (widget.match.players?.length ?? 0) + - (widget.match.group?.members.length ?? 0) - - allPlayers.length; return Scaffold( backgroundColor: CustomTheme.backgroundColor, @@ -144,6 +140,7 @@ class _MatchProfileViewState extends State { const Icon(Icons.group), const SizedBox(width: 8), Text( + // TODO: Update after DB changes '${widget.match.group!.name} ${widget.match.players != null ? '+ ${widget.match.players!.length}' : ''}', style: const TextStyle(fontWeight: FontWeight.bold), ), @@ -180,23 +177,34 @@ class _MatchProfileViewState extends State { child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - Text( - loc.winner, - style: const TextStyle( - fontSize: 16, - color: CustomTheme.textColor, + /// TODO: Implement different ruleset results display + if (widget.match.winner != null) ...[ + Text( + loc.winner, + style: const TextStyle( + fontSize: 16, + color: CustomTheme.textColor, + ), ), - ), - Text( - widget.match.winner?.name ?? '-', - style: TextStyle( - fontSize: 16, - fontWeight: FontWeight.bold, - color: widget.match.winner != null - ? CustomTheme.primaryColor - : CustomTheme.textColor, + Text( + widget.match.winner?.name ?? '-', + style: TextStyle( + fontSize: 16, + fontWeight: FontWeight.bold, + color: widget.match.winner != null + ? CustomTheme.primaryColor + : CustomTheme.textColor, + ), ), - ), + ] else ...[ + Text( + loc.no_results_entered_yet, + style: const TextStyle( + fontSize: 14, + color: CustomTheme.textColor, + ), + ), + ], ], ), ),