summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--assets/i18n/en_us.json8
-rw-r--r--assets/i18n/ru_ru.json8
-rw-r--r--core/src/com/ilotterytea/maxoning/screens/MenuScreen.java4
-rw-r--r--core/src/com/ilotterytea/maxoning/ui/SavegameInfo.kt18
4 files changed, 28 insertions, 10 deletions
diff --git a/assets/i18n/en_us.json b/assets/i18n/en_us.json
index 97df1d2..da2c958 100644
--- a/assets/i18n/en_us.json
+++ b/assets/i18n/en_us.json
@@ -13,6 +13,14 @@
"menu.quit": "QUIT TO DESKTOP",
"menu.continue": "CONTINUE",
+ "savegame.title": "Save %s (%s)",
+ "savegame.new": "New savegame...",
+ "savegame.points": "Points",
+ "savegame.multiplier": "Multiplier",
+ "savegame.multiplier.count": "+%s/click",
+ "savegame.purchased": "Purchased items",
+ "savegame.your_name": "Say your name",
+
"options.title": "Options",
"options.music": "Music",
"options.sound": "Sound",
diff --git a/assets/i18n/ru_ru.json b/assets/i18n/ru_ru.json
index 77afb81..f6b5e61 100644
--- a/assets/i18n/ru_ru.json
+++ b/assets/i18n/ru_ru.json
@@ -13,6 +13,14 @@
"menu.quit": "ВЫЙТИ НА РАБОЧИЙ СТОЛ",
"menu.continue": "ПРОДОЛЖИТЬ",
+ "savegame.title": "Сохранение %s (%s)",
+ "savegame.new": "Новое сохранение...",
+ "savegame.points": "Баллов жмяканья",
+ "savegame.multiplier": "Множитель",
+ "savegame.multiplier.count": "+%s/жмяк",
+ "savegame.purchased": "Купленных предметов",
+ "savegame.your_name": "Ваше имя",
+
"options.title": "Настройки",
"options.music": "Музыка",
"options.sound": "Звук",
diff --git a/core/src/com/ilotterytea/maxoning/screens/MenuScreen.java b/core/src/com/ilotterytea/maxoning/screens/MenuScreen.java
index 567bcfc..1d53a07 100644
--- a/core/src/com/ilotterytea/maxoning/screens/MenuScreen.java
+++ b/core/src/com/ilotterytea/maxoning/screens/MenuScreen.java
@@ -525,14 +525,14 @@ public class MenuScreen implements Screen {
for (MaxonSavegame sav : saves) {
i++;
- savInfos.add(new SavegameInfo(game, skin, sav, i));
+ savInfos.add(new SavegameInfo(game, game.locale, skin, sav, i));
savImgs.add(new Image(
PetUtils.animatedImageById(game.assetManager, sav.petId).getDrawable()
)
);
}
- savInfos.add(new SavegameInfo(game, skin, null, i + 1));
+ savInfos.add(new SavegameInfo(game, game.locale, skin, null, i + 1));
savImgs.add(new Image(
mainAtlas.findRegion("unknown")
));
diff --git a/core/src/com/ilotterytea/maxoning/ui/SavegameInfo.kt b/core/src/com/ilotterytea/maxoning/ui/SavegameInfo.kt
index fccf21c..0b7e3ad 100644
--- a/core/src/com/ilotterytea/maxoning/ui/SavegameInfo.kt
+++ b/core/src/com/ilotterytea/maxoning/ui/SavegameInfo.kt
@@ -7,6 +7,7 @@ import com.badlogic.gdx.utils.Align
import com.ilotterytea.maxoning.MaxonGame
import com.ilotterytea.maxoning.player.MaxonSavegame
import com.ilotterytea.maxoning.screens.GameScreen
+import com.ilotterytea.maxoning.utils.I18N
import com.ilotterytea.maxoning.utils.formatters.NumberFormatter
/**
@@ -16,6 +17,7 @@ import com.ilotterytea.maxoning.utils.formatters.NumberFormatter
*/
class SavegameInfo(
game: MaxonGame,
+ i18n: I18N,
skin: Skin,
sav: MaxonSavegame?,
savId: Int
@@ -26,7 +28,7 @@ class SavegameInfo(
this.height = 324f
this.align(Align.top)
- val title = Label(if (sav != null) "Save ${savId + 1} (${sav.name})" else "New Game", skin, "header_with_bg")
+ val title = Label(if (sav != null) i18n.FormattedText("savegame.title", (savId + 1).toString(), sav.name) else i18n.TranslatableText("savegame.new"), skin, "header_with_bg")
this.add(title).width(506f).pad(6f).row()
val content = Table()
@@ -40,7 +42,7 @@ class SavegameInfo(
if (sav != null) {
// - - - P O I N T S - - - :
// Label for points:
- val pointsLabel = Label("Points", skin)
+ val pointsLabel = Label(i18n.TranslatableText("savegame.points"), skin)
content.add(pointsLabel).width(246f).pad(4f)
// Label for points count:
val pointsCLabel = Label(NumberFormatter.format(sav.points.toLong()), skin, "value")
@@ -49,16 +51,16 @@ class SavegameInfo(
// - - - M U L T I P L I E R - - - :
// Label for multiplier:
- val mpLabel = Label("Multiplier", skin)
+ val mpLabel = Label(i18n.TranslatableText("savegame.multiplier"), skin)
content.add(mpLabel).width(246f).pad(4f)
// Label for multiplier count:
- val mpCLabel = Label("+${NumberFormatter.format(sav.multiplier.toLong())}/click", skin, "value")
+ val mpCLabel = Label(i18n.FormattedText("savegame.multiplier.count", NumberFormatter.format(sav.multiplier.toLong())), skin, "value")
mpCLabel.setAlignment(Align.right)
content.add(mpCLabel).width(246f).pad(4f).row()
// - - - P U R C H A S E D I T E M S - - - :
// Label for purchased items:
- val piLabel = Label("Inventory size", skin)
+ val piLabel = Label(i18n.TranslatableText("savegame.purchased"), skin)
content.add(piLabel).width(246f).pad(4f)
// Label for purchased items count:
val piCLabel = Label(sav.inv.size.toString(), skin, "value")
@@ -77,7 +79,7 @@ class SavegameInfo(
//actions.add(delButton).pad(4f)
// Play button:
- val playButton = TextButton("Play!", skin)
+ val playButton = TextButton(i18n.TranslatableText("menu.continue"), skin)
playButton.addListener(object : ClickListener() {
override fun clicked(event: InputEvent, x: Float, y: Float) {
@@ -89,7 +91,7 @@ class SavegameInfo(
} else {
// - - - N A M E - - - :
// Label for points:
- val nameLabel = Label("Your name", skin)
+ val nameLabel = Label(i18n.TranslatableText("savegame.your_name"), skin)
content.add(nameLabel).width(246f).pad(4f)
// Label for points count:
val nameField = TextField(System.getProperty("user.name"), skin)
@@ -97,7 +99,7 @@ class SavegameInfo(
// Play button:
- val playButton = TextButton("START!", skin)
+ val playButton = TextButton(i18n.TranslatableText("menu.playGame"), skin)
playButton.addListener(object : ClickListener() {
override fun clicked(event: InputEvent, x: Float, y: Float) {