Skip to content

Commit 42aa48e

Browse files
committed
fix total coin display to accomodate all languages supported
1 parent 2da7deb commit 42aa48e

File tree

7 files changed

+11
-8
lines changed

7 files changed

+11
-8
lines changed

src/main/java/com/dinosaur/dinosaurexploder/view/ShipSelectionMenu.java

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
import com.dinosaur.dinosaurexploder.model.Settings;
1111
import com.dinosaur.dinosaurexploder.model.GameData;
1212
import com.dinosaur.dinosaurexploder.utils.SettingsProvider;
13-
import com.dinosaur.dinosaurexploder.model.TotalCoins;
1413
import javafx.animation.Interpolator;
1514
import javafx.animation.TranslateTransition;
1615
import javafx.geometry.Pos;
@@ -82,12 +81,10 @@ public ShipSelectionMenu() {
8281
FontType.MONO, 25);
8382

8483
// Total Coin display
85-
int totalCoinCount = GameData.getTotalCoins();
86-
8784
var totalCoins = FXGL.getUIFactoryService().newText(
88-
languageManager.getTranslation("total coins") + ": " + totalCoinCount,
89-
Color.LIME,
90-
FontType.MONO, 25);
85+
languageManager.getTranslation("total_coins") + ": " + GameData.getTotalCoins(),
86+
Color.LIME,
87+
FontType.MONO, 25);
9188

9289
// GridPane for ships
9390
GridPane shipGrid = new GridPane();

src/main/resources/assets/translation/english.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
"yes": "Yes",
2525
"no": "No",
2626
"coin": "Coin",
27+
"total_coins": "Total Coins",
2728
"level": "Level",
2829
"ship_locked": "The spaceship is locked.",
2930
"weapon_locked": "The weapon is locked.",

src/main/resources/assets/translation/french.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@
2323
"bombs_left": "Bombes à gauche",
2424
"yes": "Oui",
2525
"no": "Non",
26-
"coin": "pièce de monnaie",
26+
"coin": "Pièce de monnaie",
27+
"total_coins": "Total des pièces",
2728
"level": "Niveau",
2829
"ship_locked": "Le vaisseau spatial est verrouillé.",
2930
"weapon_locked": "L'arme est verrouillée.",

src/main/resources/assets/translation/german.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
"yes": "Ja",
2525
"no": "Nein",
2626
"coin": "Münze",
27+
"total_coins": "Gesamtmünzen",
2728
"level": "Level",
2829
"ship_locked": "Das Raumschiff ist gesperrt.",
2930
"weapon_locked": "Die Waffe ist verriegelt..",

src/main/resources/assets/translation/japanese.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
"yes": "はい",
2525
"no": "いいえ",
2626
"coin": "コイン",
27+
"total_coins": "合計コイン数",
2728
"level": "レベル",
2829
"ship_locked" : "宇宙船はロックされています。",
2930
"weapon_locked" : "武器はロックされています。",

src/main/resources/assets/translation/russian.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
"yes": "Да",
2525
"no": "нет",
2626
"coin": "монета",
27+
"total_coins": "Всего монет",
2728
"level": "Уровень",
2829
"ship_locked": "Космический корабль заблокирован.",
2930
"weapon_locked": "Оружие заблокировано.",

src/main/resources/assets/translation/spanish.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@
2323
"bombs_left": "Bombas restantes",
2424
"yes": "",
2525
"no": "No",
26-
"coin": "acuñar",
26+
"coin": "Acuñar",
27+
"total_coins": "Monedas totales",
2728
"level": "Nivel",
2829
"ship_locked": "La nave espacial está bloqueada.",
2930
"weapon_locked": "El arma está bloqueada.",

0 commit comments

Comments
 (0)