mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 03:08:02 +00:00
update NewGameScene translations
This commit is contained in:
@@ -6,6 +6,7 @@ import com.badlogic.gdx.graphics.g2d.TextureAtlas;
|
||||
import com.badlogic.gdx.graphics.g2d.TextureRegion;
|
||||
import com.badlogic.gdx.utils.Array;
|
||||
import com.badlogic.gdx.utils.Json;
|
||||
import forge.Forge;
|
||||
import forge.adventure.util.Config;
|
||||
import forge.adventure.util.Paths;
|
||||
|
||||
@@ -67,7 +68,7 @@ public class HeroListData {
|
||||
instance = read();
|
||||
Array<String> ret = new Array<>();
|
||||
for (HeroData hero : instance.heroes) {
|
||||
ret.add(hero.name);
|
||||
ret.add(Forge.getLocalizer().getMessageorUseDefault("lbl"+hero.name, hero.name));
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
package forge.adventure.scene;
|
||||
|
||||
import com.badlogic.gdx.scenes.scene2d.Actor;
|
||||
import com.badlogic.gdx.scenes.scene2d.InputEvent;
|
||||
import com.badlogic.gdx.scenes.scene2d.ui.Image;
|
||||
import com.badlogic.gdx.scenes.scene2d.ui.TextField;
|
||||
import com.badlogic.gdx.scenes.scene2d.utils.ChangeListener;
|
||||
import com.badlogic.gdx.scenes.scene2d.utils.ClickListener;
|
||||
import com.badlogic.gdx.scenes.scene2d.utils.TextureRegionDrawable;
|
||||
import com.badlogic.gdx.utils.Array;
|
||||
import com.github.tommyettinger.textra.TextraLabel;
|
||||
@@ -46,6 +48,7 @@ public class NewGameScene extends UIScene {
|
||||
private final TextraLabel colorLabel;
|
||||
|
||||
private final Array<AdventureModes> modes = new Array<>();
|
||||
|
||||
private NewGameScene() {
|
||||
|
||||
super(Forge.isLandscapeMode() ? "ui/new_game.json" : "ui/new_game_portrait.json");
|
||||
@@ -71,21 +74,18 @@ public class NewGameScene extends UIScene {
|
||||
|
||||
for (DifficultyData diff : Config.instance().getConfigData().difficulties)//check first difficulty if exists
|
||||
{
|
||||
if(diff.starterDecks!=null)
|
||||
{
|
||||
if (diff.starterDecks != null) {
|
||||
modes.add(AdventureModes.Standard);
|
||||
AdventureModes.Standard.setSelectionName(colorIdLabel);
|
||||
AdventureModes.Standard.setModes(colorNames);
|
||||
}
|
||||
|
||||
if(diff.constructedStarterDecks!=null)
|
||||
{
|
||||
if (diff.constructedStarterDecks != null) {
|
||||
modes.add(AdventureModes.Constructed);
|
||||
AdventureModes.Constructed.setSelectionName(colorIdLabel);
|
||||
AdventureModes.Constructed.setModes(colorNames);
|
||||
}
|
||||
if(diff.pileDecks!=null)
|
||||
{
|
||||
if (diff.pileDecks != null) {
|
||||
modes.add(AdventureModes.Pile);
|
||||
AdventureModes.Pile.setSelectionName(colorIdLabel);
|
||||
AdventureModes.Pile.setModes(colorNames);
|
||||
@@ -110,8 +110,7 @@ public class NewGameScene extends UIScene {
|
||||
AdventureModes.Chaos.setModes(new Array<>(new String[]{Forge.getLocalizer().getMessage("lblRandomDeck")}));
|
||||
for (DeckProxy deckProxy : DeckProxy.getAllCustomStarterDecks())
|
||||
custom.add(deckProxy.getName());
|
||||
if(!custom.isEmpty())
|
||||
{
|
||||
if (!custom.isEmpty()) {
|
||||
modes.add(AdventureModes.Custom);
|
||||
AdventureModes.Custom.setSelectionName("[BLACK]" + Forge.getLocalizer().getMessage("lblDeck") + ":");
|
||||
AdventureModes.Custom.setModes(custom);
|
||||
@@ -121,7 +120,16 @@ public class NewGameScene extends UIScene {
|
||||
modeNames[i] = modes.get(i).getName();
|
||||
mode.setTextList(modeNames);
|
||||
|
||||
gender.setTextList(new String[]{"Male", "Female"});
|
||||
gender.setTextList(new String[]{Forge.getLocalizer().getInstance().getMessage("lblMale"), Forge.getLocalizer().getInstance().getMessage("lblFemale")});
|
||||
gender.addListener(new ClickListener() {
|
||||
@Override
|
||||
public void clicked(InputEvent event, float x, float y) {
|
||||
//gender should be either Male or Female
|
||||
String val = gender.getCurrentIndex() > 0 ? "Female" : "Male";
|
||||
selectedName.setText(NameGenerator.getRandomName(val, "Any", ""));
|
||||
super.clicked(event, x, y);
|
||||
}
|
||||
});
|
||||
gender.addListener(event -> NewGameScene.this.updateAvatar());
|
||||
|
||||
mode.addListener(new ChangeListener() {
|
||||
@@ -145,7 +153,7 @@ public class NewGameScene extends UIScene {
|
||||
for (DifficultyData diff : Config.instance().getConfigData().difficulties) {
|
||||
if (diff.startingDifficulty)
|
||||
startingDifficulty = i;
|
||||
diffList.add(diff.name);
|
||||
diffList.add(Forge.getLocalizer().getInstance().getMessageorUseDefault("lbl" + diff.name, diff.name));
|
||||
i++;
|
||||
}
|
||||
difficulty.setTextList(diffList);
|
||||
@@ -171,12 +179,17 @@ public class NewGameScene extends UIScene {
|
||||
return object;
|
||||
}
|
||||
|
||||
boolean started = false;
|
||||
|
||||
public boolean start() {
|
||||
if (started)
|
||||
return true;
|
||||
started = true;
|
||||
if (selectedName.getText().isEmpty()) {
|
||||
selectedName.setText(NameGenerator.getRandomName("Any", "Any", ""));
|
||||
}
|
||||
Runnable runnable = () -> {
|
||||
started = false;
|
||||
FModel.getPreferences().setPref(ForgePreferences.FPref.UI_ENABLE_MUSIC, false);
|
||||
WorldSave.generateNewWorld(selectedName.getText(),
|
||||
gender.getCurrentIndex() == 0,
|
||||
|
||||
@@ -62,7 +62,7 @@ public class SaveLoadScene extends UIScene {
|
||||
int c = 0;
|
||||
String[] diffList = new String[Config.instance().getConfigData().difficulties.length];
|
||||
for (DifficultyData diff : Config.instance().getConfigData().difficulties) {
|
||||
diffList[c] = diff.name;
|
||||
diffList[c] = Forge.getLocalizer().getMessageorUseDefault("lbl" + diff.name, diff.name);
|
||||
c++;
|
||||
}
|
||||
|
||||
@@ -111,8 +111,7 @@ public class SaveLoadScene extends UIScene {
|
||||
return object;
|
||||
}
|
||||
|
||||
public class SaveSlot extends Selectable<TextraButton>
|
||||
{
|
||||
public class SaveSlot extends Selectable<TextraButton> {
|
||||
private int slotNumber;
|
||||
|
||||
public SaveSlot(int slotNumber) {
|
||||
@@ -123,8 +122,7 @@ public class SaveLoadScene extends UIScene {
|
||||
@Override
|
||||
public void clicked(InputEvent event, float x, float y) {
|
||||
try {
|
||||
if (!actor.isDisabled())
|
||||
{
|
||||
if (!actor.isDisabled()) {
|
||||
selectActor(self);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
@@ -133,9 +131,9 @@ public class SaveLoadScene extends UIScene {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSelect(UIScene scene)
|
||||
{
|
||||
public void onSelect(UIScene scene) {
|
||||
super.onSelect(scene);
|
||||
updateSlot(slotNumber);
|
||||
}
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
package forge.adventure.util;
|
||||
|
||||
import com.badlogic.gdx.utils.Array;
|
||||
import forge.Forge;
|
||||
|
||||
public enum AdventureModes {
|
||||
Standard("Standard"),
|
||||
Constructed("Constructed"),
|
||||
Chaos("[GOLD]Chaos"),
|
||||
Pile("Pile"),
|
||||
Custom("Custom");
|
||||
Standard(Forge.getLocalizer().getMessage("lblStandard")),
|
||||
Constructed(Forge.getLocalizer().getMessage("lblConstructed")),
|
||||
Chaos("[GOLD]"+Forge.getLocalizer().getMessage("lblChaos")),
|
||||
Pile(Forge.getLocalizer().getMessage("lblPile")),
|
||||
Custom(Forge.getLocalizer().getMessage("lblCustom"));
|
||||
|
||||
private final String name;
|
||||
private String selectionName;
|
||||
|
||||
@@ -85,7 +85,7 @@
|
||||
{
|
||||
"type": "Label",
|
||||
"name" : "starterEditionL",
|
||||
"text": "[BLACK]Starter Edition",
|
||||
"text": "[BLACK]tr(lblStarterEdition):",
|
||||
"width": 128,
|
||||
"height": 16,
|
||||
"x": 75,
|
||||
|
||||
@@ -85,7 +85,7 @@
|
||||
{
|
||||
"type": "Label",
|
||||
"name" : "starterEditionL",
|
||||
"text": "[BLACK]Starter Edition:",
|
||||
"text": "[BLACK]tr(lblStarterEdition):",
|
||||
"width": 128,
|
||||
"height": 24,
|
||||
"x": 16,
|
||||
|
||||
@@ -2929,6 +2929,19 @@ lblTempHitPoints=Temporäre Trefferpunkte
|
||||
lblChosenColors=Gewählte Farben:
|
||||
lblLoyalty=Loyaltät
|
||||
#Achievement.java
|
||||
lblStandard=Standard
|
||||
lblChaos=Chaos
|
||||
lblPile=Haufen
|
||||
lblCustom=Brauch
|
||||
lblStarterEdition=Beginner-Ausgabe
|
||||
lblElf=Elf
|
||||
lblMetathran=Metathran
|
||||
lblUndead=Untoten
|
||||
lblViashino=Viendino
|
||||
lblDwarf=Zwerg
|
||||
lblDevil=Teufel
|
||||
lblKor=Kor
|
||||
lblInsane=Verrückt
|
||||
lblCommon=Gewöhnlich
|
||||
lblUncommon=Ungewöhnlich
|
||||
lblRare=Selten
|
||||
|
||||
@@ -2939,6 +2939,19 @@ lblTempHitPoints=Temporary Hit Points
|
||||
lblChosenColors=Chosen colors:
|
||||
lblLoyalty=Loyalty
|
||||
#Achievement.java
|
||||
lblStandard=Standard
|
||||
lblChaos=Chaos
|
||||
lblPile=Pile
|
||||
lblCustom=Custom
|
||||
lblStarterEdition=Starter Edition
|
||||
lblElf=Elf
|
||||
lblMetathran=Metathran
|
||||
lblUndead=Undead
|
||||
lblViashino=Viashino
|
||||
lblDwarf=Dwarf
|
||||
lblDevil=Devil
|
||||
lblKor=Kor
|
||||
lblInsane=Insane
|
||||
lblMythic=Mythic
|
||||
lblAchievementEarned=Achievement Earned
|
||||
lblZoom=Zoom
|
||||
|
||||
@@ -2935,6 +2935,19 @@ lblTempHitPoints=Puntos de golpe temporales
|
||||
lblChosenColors=Colores elegidos:
|
||||
lblLoyalty=Lealtad
|
||||
#Achievement.java
|
||||
lblStandard=Estándar
|
||||
lblChaos=Caos
|
||||
lblPile=Montón
|
||||
lblCustom=Costumbre
|
||||
lblStarterEdition=Edición inicial
|
||||
lblElf=Duende
|
||||
lblMetathran=Metathran
|
||||
lblUndead=No muerto
|
||||
lblViashino=Paseos
|
||||
lblDwarf=Enano
|
||||
lblDevil=Demonio
|
||||
lblKor=Kor
|
||||
lblInsane=Loco
|
||||
lblMythic=Mítico
|
||||
lblAchievementEarned=Logro ganado
|
||||
lblZoom=Zoom
|
||||
|
||||
@@ -2937,6 +2937,19 @@ lblTempHitPoints=Points de vie temporaires
|
||||
lblChosenColors=Couleurs choisies :
|
||||
lblLoyalty=Loyauté
|
||||
#Achievement.java
|
||||
lblStandard=Standard
|
||||
lblChaos=Chaos
|
||||
lblPile=Pile
|
||||
lblCustom=Coutume
|
||||
lblStarterEdition=Édition de démarrage
|
||||
lblElf=Elfe
|
||||
lblMetathran=Metathran
|
||||
lblUndead=Mort-vivant
|
||||
lblViashino=Viahino
|
||||
lblDwarf=Nain
|
||||
lblDevil=Diable
|
||||
lblKor=Core
|
||||
lblInsane=Fou
|
||||
lblMythic=Mythique
|
||||
lblAchievementEarned=Succès obtenu
|
||||
lblZoom=Zoom
|
||||
|
||||
@@ -2045,7 +2045,7 @@ lblPlayerRolledResult={0} ha ottenuto {1} col dado
|
||||
lblDoYouWantPayEcho=Vuoi pagare Eco
|
||||
lblPayEcho=Paga Eco
|
||||
lblDoYouWantSacrifice=Vuoi sacrificare?
|
||||
lblDoYouWantSacrifice=Vuoi sacrificare {0}?
|
||||
lblDoYouWantSacrificeThis=Vuoi sacrificare {0}?
|
||||
#SetStateEffect.java
|
||||
lblFaceDownCardCantTurnFaceUp=La carta a faccia in giù non può essere girata a faccia in su
|
||||
#ShuffleEffect.java
|
||||
@@ -2938,6 +2938,19 @@ lblTempHitPoints=Punti ferita temporanei
|
||||
lblChosenColors=Colori scelti:
|
||||
lblLoyalty=Lealtà
|
||||
#Achievement.java
|
||||
lblStandard=Standard
|
||||
lblChaos=Caos
|
||||
lblPile=Mucchio
|
||||
lblCustom=Costume
|
||||
lblStarterEdition=Starter Edition
|
||||
lblElf=Elfo
|
||||
lblMetathran=Metathran
|
||||
lblUndead=Non morti
|
||||
lblViashino=Viashino
|
||||
lblDwarf=Nano
|
||||
lblDevil=Diavolo
|
||||
lblKor=Kor
|
||||
lblInsane=Pazzo
|
||||
lblMythic=Mitico
|
||||
lblAchievementEarned=Achievement Earned
|
||||
lblZoom=Ingrandisci
|
||||
|
||||
@@ -2934,6 +2934,19 @@ lblTempHitPoints=一時的なヒットポイント
|
||||
lblChosenColors=選ばれた色:
|
||||
lblLoyalty=忠誠心
|
||||
#Achievement.java
|
||||
lblStandard=標準
|
||||
lblChaos=混沌
|
||||
lblPile=パイル
|
||||
lblCustom=カスタム
|
||||
lblStarterEdition=スターター版
|
||||
lblElf=妖精
|
||||
lblMetathran=メタラン
|
||||
lblUndead=アンデッド
|
||||
lblViashino=ビアシノ
|
||||
lblDwarf=小人
|
||||
lblDevil=悪魔
|
||||
lblKor=コル
|
||||
lblInsane=非常識
|
||||
lblMythic=神話
|
||||
lblAchievementEarned=獲得した達成
|
||||
lblZoom=ズーム
|
||||
|
||||
@@ -3024,6 +3024,19 @@ lblTempHitPoints=Pontos de vida temporários
|
||||
lblChosenColors=Cores escolhidas:
|
||||
lblLoyalty=Lealdade
|
||||
#Achievement.java
|
||||
lblStandard=Padrão
|
||||
lblChaos=Caos
|
||||
lblPile=Pilha
|
||||
lblCustom=Personalizado
|
||||
lblStarterEdition=Edição inicial
|
||||
lblElf=Duende
|
||||
lblMetathran=Metathran
|
||||
lblUndead=Morto-vivo
|
||||
lblViashino=ViaShino
|
||||
lblDwarf=Anão
|
||||
lblDevil=Diabo
|
||||
lblKor=Kor
|
||||
lblInsane=Insano
|
||||
lblMythic=Mythic
|
||||
lblAchievementEarned=Achievement Earned
|
||||
lblZoom=Ampliação
|
||||
|
||||
@@ -2917,6 +2917,19 @@ lblTempHitPoints=临时生命值
|
||||
lblChosenColors=选择的颜色:
|
||||
lblLoyalty=忠诚指示物
|
||||
#Achievement.java
|
||||
lblStandard=标准
|
||||
lblChaos=混乱
|
||||
lblPile=桩
|
||||
lblCustom=风俗
|
||||
lblStarterEdition=首发版
|
||||
lblElf=精灵
|
||||
lblMetathran=甲菊酯
|
||||
lblUndead=亡灵
|
||||
lblViashino=凡尔西诺
|
||||
lblDwarf=矮人
|
||||
lblDevil=魔鬼
|
||||
lblKor=科
|
||||
lblInsane=疯狂的
|
||||
lblMythic=秘稀
|
||||
lblAchievementEarned=获得的成就
|
||||
lblZoom=飞涨
|
||||
|
||||
Reference in New Issue
Block a user