Updated string placeholders

This commit is contained in:
2025-07-14 10:17:51 +02:00
parent a8298dfa21
commit 047acfecd8
4 changed files with 13 additions and 3 deletions

View File

@@ -77,6 +77,9 @@
"bonus_points_message": "{playerCount, plural, =1{{names} hat exakt das Punktelimit von {pointLimit} Punkten erreicht und bekommt deshalb {bonusPoints} Punkte abgezogen!} other{{names} haben exakt das Punktelimit von {pointLimit} Punkten erreicht und bekommen deshalb jeweils {bonusPoints} Punkte abgezogen!}}",
"@bonus_points_message": {
"placeholders": {
"playerCount": {
"type": "int"
},
"names": {
"type": "String"
},

View File

@@ -77,6 +77,9 @@
"bonus_points_message": "{playerCount, plural, =1{{names} has reached exactly the point limit of {pointLimit} points and therefore gets {bonusPoints} points deducted!} other{{names} have reached exactly the point limit of {pointLimit} points and therefore get {bonusPoints} points deducted!}}",
"@bonus_points_message": {
"placeholders": {
"playerCount": {
"type": "int"
},
"names": {
"type": "String"
},

View File

@@ -436,13 +436,17 @@ class _RoundViewState extends State<RoundView> {
String resultText = '';
if (nameList.length == 1) {
resultText = AppLocalizations.of(context).bonus_points_message(
nameList.first, pointLimit, bonusPoints, nameList.length);
nameList.length, nameList.first, pointLimit, bonusPoints);
} else {
resultText = nameList.length == 2
? '${nameList[0]} & ${nameList[1]}'
: '${nameList.sublist(0, nameList.length - 1).join(', ')} & ${nameList.last}';
resultText = AppLocalizations.of(context).bonus_points_message(
resultText, pointLimit, bonusPoints, nameList.length);
nameList.length,
resultText,
pointLimit,
bonusPoints,
);
}
return resultText;
}

View File

@@ -2,7 +2,7 @@ name: cabo_counter
description: "Mobile app for the card game Cabo"
publish_to: 'none'
version: 0.4.5+493
version: 0.4.5+494
environment:
sdk: ^3.5.4