3 Commits

Author SHA1 Message Date
cc23c03f6b Add localization for 'not available' message in English and German
Some checks failed
Pull Request Pipeline / test (pull_request) Successful in 2m4s
Pull Request Pipeline / lint (pull_request) Failing after 2m15s
2026-01-01 18:32:01 +01:00
d77b5f20f9 Update statistics_view.dart to use localized 'not available' message for players 2026-01-01 18:31:53 +01:00
3c3bf506cb Add TODO for implementing quick create functionality in home_view.dart 2026-01-01 18:31:37 +01:00
7 changed files with 27 additions and 4 deletions

View File

@@ -79,5 +79,6 @@
"least_points": "Niedrigste Punkte", "least_points": "Niedrigste Punkte",
"search_for_players": "Nach Spielern suchen", "search_for_players": "Nach Spielern suchen",
"search_for_groups": "Nach Gruppen suchen", "search_for_groups": "Nach Gruppen suchen",
"no_data_available": "Keine Daten verfügbar" "no_data_available": "Keine Daten verfügbar",
"not_available": "Nicht verfügbar"
} }

View File

@@ -365,5 +365,9 @@
"search_for_groups": "Search for groups", "search_for_groups": "Search for groups",
"@search_for_groups": { "@search_for_groups": {
"description": "Hint text for group search input field" "description": "Hint text for group search input field"
},
"not_available": "Not available",
"@not_available": {
"description": "Abbreviation for not available"
} }
} }

View File

@@ -577,6 +577,12 @@ abstract class AppLocalizations {
/// In en, this message translates to: /// In en, this message translates to:
/// **'Search for groups'** /// **'Search for groups'**
String get search_for_groups; String get search_for_groups;
/// Abbreviation for not available
///
/// In en, this message translates to:
/// **'Not available'**
String get not_available;
} }
class _AppLocalizationsDelegate class _AppLocalizationsDelegate

View File

@@ -276,4 +276,7 @@ class AppLocalizationsDe extends AppLocalizations {
@override @override
String get search_for_groups => 'Nach Gruppen suchen'; String get search_for_groups => 'Nach Gruppen suchen';
@override
String get not_available => 'Nicht verfügbar';
} }

View File

@@ -275,4 +275,7 @@ class AppLocalizationsEn extends AppLocalizations {
@override @override
String get search_for_groups => 'Search for groups'; String get search_for_groups => 'Search for groups';
@override
String get not_available => 'Not available';
} }

View File

@@ -173,6 +173,7 @@ class _HomeViewState extends State<HomeView> {
), ),
), ),
), ),
// TODO: Implement quick create functionality
InfoTile( InfoTile(
width: constraints.maxWidth * 0.95, width: constraints.maxWidth * 0.95,
title: AppLocalizations.of(context)!.quick_create, title: AppLocalizations.of(context)!.quick_create,
@@ -221,7 +222,6 @@ class _HomeViewState extends State<HomeView> {
], ],
), ),
), ),
],
), ),
), ),
); );

View File

@@ -152,7 +152,10 @@ class _StatisticsViewState extends State<StatisticsView> {
final playerId = winCounts[i].$1; final playerId = winCounts[i].$1;
final player = players.firstWhere( final player = players.firstWhere(
(p) => p.id == playerId, (p) => p.id == playerId,
orElse: () => Player(id: playerId, name: 'N.a.'), orElse: () => Player(
id: playerId,
name: AppLocalizations.of(context)!.not_available,
),
); );
winCounts[i] = (player.name, winCounts[i].$2); winCounts[i] = (player.name, winCounts[i].$2);
} }
@@ -214,7 +217,10 @@ class _StatisticsViewState extends State<StatisticsView> {
final playerId = matchCounts[i].$1; final playerId = matchCounts[i].$1;
final player = players.firstWhere( final player = players.firstWhere(
(p) => p.id == playerId, (p) => p.id == playerId,
orElse: () => Player(id: playerId, name: 'N.a.'), orElse: () => Player(
id: playerId,
name: AppLocalizations.of(context)!.not_available,
),
); );
matchCounts[i] = (player.name, matchCounts[i].$2); matchCounts[i] = (player.name, matchCounts[i].$2);
} }