From ad1cc78578a53c60cad90b36a280697a3f150ecb Mon Sep 17 00:00:00 2001 From: Peter Date: Mon, 7 Oct 2019 22:39:00 +0200 Subject: [PATCH 1/9] Mobile: Translate Draft, Gauntlet and Puzzle Screens. Fixed crash in LoadGameMenu (wrong translated enum...) --- .../screens/gauntlet/NewGauntletScreen.java | 43 +++++++++---------- .../src/forge/screens/home/LoadGameMenu.java | 16 +++---- .../screens/home/puzzle/PuzzleScreen.java | 12 +++--- .../screens/limited/LoadDraftScreen.java | 24 ++++++----- .../forge/screens/limited/NewDraftScreen.java | 11 ++--- .../screens/limited/NewSealedScreen.java | 7 +-- forge-gui/res/languages/de-DE.properties | 24 +++++++++++ forge-gui/res/languages/en-US.properties | 28 +++++++++++- forge-gui/res/languages/es-ES.properties | 28 +++++++++++- forge-gui/res/languages/zh-CN.properties | 26 ++++++++++- 10 files changed, 158 insertions(+), 61 deletions(-) diff --git a/forge-gui-mobile/src/forge/screens/gauntlet/NewGauntletScreen.java b/forge-gui-mobile/src/forge/screens/gauntlet/NewGauntletScreen.java index ad7b5de1967..1278a1e34ac 100644 --- a/forge-gui-mobile/src/forge/screens/gauntlet/NewGauntletScreen.java +++ b/forge-gui-mobile/src/forge/screens/gauntlet/NewGauntletScreen.java @@ -23,15 +23,18 @@ import forge.toolbox.FTextArea; import forge.toolbox.GuiChoose; import forge.toolbox.ListChooser; import forge.util.Callback; +import forge.util.Localizer; import forge.util.Utils; public class NewGauntletScreen extends LaunchScreen { private static final float PADDING = Utils.scale(10); + private final Localizer localizer = Localizer.getInstance(); + private final FTextArea lblDesc = add(new FTextArea(false, - "In Gauntlet mode, you select a deck and play against multiple opponents.\n\n" + - "Configure how many opponents you wish to face and what decks or types of decks they will play.\n\n" + - "Then, try to beat all AI opponents without losing a match.")); + localizer.getMessage("lblGauntletText1") + "\n\n" + + localizer.getMessage("lblGauntletText2") + "\n\n" + + localizer.getMessage("lblGauntletText3"))); public NewGauntletScreen() { super(null, NewGameMenu.getMenu()); @@ -51,38 +54,34 @@ public class NewGauntletScreen extends LaunchScreen { @Override protected void startMatch() { - GuiChoose.oneOrNone("Select a Gauntlet Type", new String[] { - "Quick Gauntlet", - "Custom Gauntlet", - "Gauntlet Contest", + GuiChoose.oneOrNone(localizer.getMessage("lblSelectGauntletType"), new String[] { + localizer.getMessage("lblQuickGauntlet"), + localizer.getMessage("lblCustomGauntlet"), + localizer.getMessage("lblGauntletContest"), }, new Callback() { @Override public void run(String result) { if (result == null) { return; } - switch (result) { - case "Quick Gauntlet": + if (localizer.getMessage("lblQuickGauntlet").equals(result)) { createQuickGauntlet(); - break; - case "Custom Gauntlet": + } else if(localizer.getMessage("lblCustomGauntlet").equals(result)) { createCustomGauntlet(); - break; - default: + } else { createGauntletContest(); - break; } } }); } private void createQuickGauntlet() { - GuiChoose.getInteger("How many opponents are you willing to face?", 3, 50, new Callback() { + GuiChoose.getInteger(localizer.getMessage("lblHowManyOpponents"), 3, 50, new Callback() { @Override public void run(final Integer numOpponents) { if (numOpponents == null) { return; } ListChooser chooser = new ListChooser<>( - "Choose allowed deck types for opponents", 0, 11, Arrays.asList(DeckType.CUSTOM_DECK, + localizer.getMessage("lblChooseAllowedDeckTypeOpponents"), 0, 11, Arrays.asList(DeckType.CUSTOM_DECK, DeckType.PRECONSTRUCTED_DECK, DeckType.QUEST_OPPONENT_DECK, DeckType.COLOR_DECK, @@ -99,7 +98,7 @@ public class NewGauntletScreen extends LaunchScreen { return; } - FDeckChooser.promptForDeck("Select Your Deck", GameType.Gauntlet, false, new Callback() { + FDeckChooser.promptForDeck(localizer.getMessage("lblSelectYourDeck"), GameType.Gauntlet, false, new Callback() { @Override public void run(Deck userDeck) { if (userDeck == null) { @@ -118,7 +117,7 @@ public class NewGauntletScreen extends LaunchScreen { } private void createCustomGauntlet() { - GuiChoose.getInteger("How many opponents are you willing to face?", 3, 50, new Callback() { + GuiChoose.getInteger(localizer.getMessage("lblHowManyOpponents"), 3, 50, new Callback() { @Override public void run(final Integer numOpponents) { if (numOpponents == null) { return; } @@ -132,7 +131,7 @@ public class NewGauntletScreen extends LaunchScreen { private void promptForAiDeck(final GauntletData gauntlet, final int numOpponents) { final int opponentNum = gauntlet.getDecks().size() + 1; - FDeckChooser.promptForDeck("Select Deck for Opponent " + opponentNum + " / " + numOpponents, GameType.Gauntlet, true, new Callback() { + FDeckChooser.promptForDeck(localizer.getMessage("lblSelectDeckForOpponent") + " " + opponentNum + " / " + numOpponents, GameType.Gauntlet, true, new Callback() { @Override public void run(Deck aiDeck) { if (aiDeck == null) { return; } @@ -145,7 +144,7 @@ public class NewGauntletScreen extends LaunchScreen { } else { //once all ai decks have been selected, prompt for user deck - FDeckChooser.promptForDeck("Select Your Deck", GameType.Gauntlet, false, new Callback() { + FDeckChooser.promptForDeck(localizer.getMessage("lblSelectYourDeck"), GameType.Gauntlet, false, new Callback() { @Override public void run(Deck userDeck) { if (userDeck == null) { return; } @@ -170,12 +169,12 @@ public class NewGauntletScreen extends LaunchScreen { } } - GuiChoose.oneOrNone("Select Gauntlet Contest", contests, new Callback() { + GuiChoose.oneOrNone(localizer.getMessage("lblSelectGauntletContest"), contests, new Callback() { @Override public void run(final GauntletData contest) { if (contest == null) { return; } - FDeckChooser.promptForDeck("Select Your Deck", GameType.Gauntlet, false, new Callback() { + FDeckChooser.promptForDeck(localizer.getMessage("lblSelectYourDeck"), GameType.Gauntlet, false, new Callback() { @Override public void run(final Deck userDeck) { if (userDeck == null) { return; } diff --git a/forge-gui-mobile/src/forge/screens/home/LoadGameMenu.java b/forge-gui-mobile/src/forge/screens/home/LoadGameMenu.java index c38c3f6c48b..9e29a3addc1 100644 --- a/forge-gui-mobile/src/forge/screens/home/LoadGameMenu.java +++ b/forge-gui-mobile/src/forge/screens/home/LoadGameMenu.java @@ -19,15 +19,13 @@ import forge.toolbox.FEvent.FEventHandler; import forge.util.Localizer; public class LoadGameMenu extends FPopupMenu { - final static Localizer localizer = Localizer.getInstance(); - public enum LoadGameScreen { - BoosterDraft(localizer.getMessage("lblBoosterDraft"), FSkinImage.HAND, LoadDraftScreen.class), - SealedDeck(localizer.getMessage("lblSealedDeck"), FSkinImage.PACK, LoadSealedScreen.class), - QuestMode(localizer.getMessage("lblQuestMode"), FSkinImage.QUEST_ZEP, LoadQuestScreen.class), - PlanarConquest(localizer.getMessage("lblPlanarConquest"), FSkinImage.MULTIVERSE, LoadConquestScreen.class), - Gauntlet(localizer.getMessage("lblGauntlet"), FSkinImage.ALPHASTRIKE, LoadGauntletScreen.class); - + BoosterDraft("Booster Draft", FSkinImage.HAND, LoadDraftScreen.class), + SealedDeck("Sealed Deck", FSkinImage.PACK, LoadSealedScreen.class), + QuestMode("Quest Mode", FSkinImage.QUEST_ZEP, LoadQuestScreen.class), + PlanarConquest("Planar Conquest", FSkinImage.MULTIVERSE, LoadConquestScreen.class), + Gauntlet("Gauntlet", FSkinImage.ALPHASTRIKE, LoadGauntletScreen.class); + private final FMenuItem item; private final Class screenClass; private FScreen screen; @@ -47,7 +45,7 @@ public class LoadGameMenu extends FPopupMenu { if (screen == null) { //don't initialize screen until it's opened the first time try { screen = screenClass.newInstance(); - screen.setHeaderCaption(localizer.getMessage("lblLoadGame") + " - " + item.getText()); + screen.setHeaderCaption(Localizer.getInstance().getMessage("lblLoadGame") + " - " + item.getText()); } catch (Exception e) { e.printStackTrace(); diff --git a/forge-gui-mobile/src/forge/screens/home/puzzle/PuzzleScreen.java b/forge-gui-mobile/src/forge/screens/home/puzzle/PuzzleScreen.java index bc23e309633..a740859f49b 100644 --- a/forge-gui-mobile/src/forge/screens/home/puzzle/PuzzleScreen.java +++ b/forge-gui-mobile/src/forge/screens/home/puzzle/PuzzleScreen.java @@ -18,6 +18,7 @@ import forge.toolbox.FOptionPane; import forge.toolbox.FTextArea; import forge.toolbox.GuiChoose; import forge.util.Callback; +import forge.util.Localizer; import forge.util.Utils; import java.util.ArrayList; import java.util.Collections; @@ -28,10 +29,9 @@ public class PuzzleScreen extends LaunchScreen { private static final float PADDING = Utils.scale(10); private final FTextArea lblDesc = add(new FTextArea(false, - "Puzzle Mode loads in a puzzle that you have to win in a predetermined time/way.\n\n" + - "To begin, press the Start button below, then select a puzzle from a list.\n\n" + - "Your objective will be displayed in a pop-up window when the puzzle starts and also " + - "specified on a special effect card which will be placed in your command zone.")); + Localizer.getInstance().getMessage("lblPuzzleText1") + "\n\n" + + Localizer.getInstance().getMessage("lblPuzzleText2") + "\n\n" + + Localizer.getInstance().getMessage("lblPuzzleText3"))); public PuzzleScreen() { super(null, NewGameMenu.getMenu()); @@ -54,10 +54,10 @@ public class PuzzleScreen extends LaunchScreen { final ArrayList puzzles = PuzzleIO.loadPuzzles(); Collections.sort(puzzles); - GuiChoose.one("Choose a puzzle", puzzles, new Callback() { + GuiChoose.one(Localizer.getInstance().getMessage("lblChooseAPuzzle"), puzzles, new Callback() { @Override public void run(final Puzzle chosen) { - LoadingOverlay.show("Loading the puzzle...", new Runnable() { + LoadingOverlay.show(Localizer.getInstance().getMessage("lblLoadingThePuzzle"), new Runnable() { @Override public void run() { // Load selected puzzle diff --git a/forge-gui-mobile/src/forge/screens/limited/LoadDraftScreen.java b/forge-gui-mobile/src/forge/screens/limited/LoadDraftScreen.java index b3ee50cfb08..0e0d3da2fbe 100644 --- a/forge-gui-mobile/src/forge/screens/limited/LoadDraftScreen.java +++ b/forge-gui-mobile/src/forge/screens/limited/LoadDraftScreen.java @@ -30,6 +30,7 @@ import forge.match.HostedMatch; import forge.model.FModel; import forge.player.GamePlayerUtil; import forge.toolbox.FComboBox; +import forge.util.Localizer; import forge.util.gui.SGuiChoose; import java.util.ArrayList; import java.util.List; @@ -37,20 +38,20 @@ import java.util.List; public class LoadDraftScreen extends LaunchScreen { private final DeckManager lstDecks = add(new DeckManager(GameType.Draft)); private final FLabel lblTip = add(new FLabel.Builder() - .text("Double-tap to edit deck (Long-press to view)") + .text(Localizer.getInstance().getMessage("lblDoubleTapToEditDeck")) .textColor(FLabel.INLINE_LABEL_COLOR) .align(Align.center).font(FSkinFont.get(12)).build()); private final FSkinFont GAME_MODE_FONT= FSkinFont.get(12); - private final FLabel lblMode = add(new FLabel.Builder().text("Mode:").font(GAME_MODE_FONT).build()); + private final FLabel lblMode = add(new FLabel.Builder().text(Localizer.getInstance().getMessage("lblMode")).font(GAME_MODE_FONT).build()); private final FComboBox cbMode = add(new FComboBox<>()); public LoadDraftScreen() { super(null, LoadGameMenu.getMenu()); cbMode.setFont(GAME_MODE_FONT); - cbMode.addItem("Gauntlet"); - cbMode.addItem("Single Match"); + cbMode.addItem(Localizer.getInstance().getMessage("lblGauntlet")); + cbMode.addItem(Localizer.getInstance().getMessage("lblSingleMatch")); lstDecks.setup(ItemManagerConfig.DRAFT_DECKS); lstDecks.setItemActivateHandler(new FEventHandler() { @@ -98,17 +99,18 @@ public class LoadDraftScreen extends LaunchScreen { FThreads.invokeInBackgroundThread(new Runnable() { @Override public void run() { + Localizer localizer = Localizer.getInstance(); final DeckProxy humanDeck = lstDecks.getSelectedItem(); if (humanDeck == null) { - FOptionPane.showErrorDialog("You must select an existing deck or build a deck from a new booster draft game.", "No Deck"); + FOptionPane.showErrorDialog(localizer.getMessage("lblYouMustSelectExistingDeck"), localizer.getMessage("lblNoDeck")); return; } // TODO: if booster draft tournaments are supported in the future, add the possibility to choose them here - final boolean gauntlet = cbMode.getSelectedItem().equals("Gauntlet"); + final boolean gauntlet = cbMode.getSelectedItem().equals(localizer.getMessage("lblGauntlet")); if (gauntlet) { - final Integer rounds = SGuiChoose.getInteger("How many opponents are you willing to face?", + final Integer rounds = SGuiChoose.getInteger(localizer.getMessage("lblHowManyOpponents"), 1, FModel.getDecks().getDraft().get(humanDeck.getName()).getAiDecks().size()); if (rounds == null) { return; @@ -121,7 +123,7 @@ public class LoadDraftScreen extends LaunchScreen { return; } - LoadingOverlay.show("Loading new game...", new Runnable() { + LoadingOverlay.show(localizer.getMessage("lblLoadingNewGame"), new Runnable() { @Override public void run() { FModel.getGauntletMini().resetGauntletDraft(); @@ -131,7 +133,7 @@ public class LoadDraftScreen extends LaunchScreen { } }); } else { - final Integer aiIndex = SGuiChoose.getInteger("Which opponent would you like to face?", + final Integer aiIndex = SGuiChoose.getInteger(localizer.getMessage("lblWhichOpponentWouldYouLikeToFace"), 1, FModel.getDecks().getDraft().get(humanDeck.getName()).getAiDecks().size()); if (aiIndex == null) { return; // Cancel was pressed @@ -146,7 +148,7 @@ public class LoadDraftScreen extends LaunchScreen { FThreads.invokeInEdtLater(new Runnable() { @Override public void run() { - LoadingOverlay.show("Loading new game...", new Runnable() { + LoadingOverlay.show(localizer.getMessage("lblLoadingNewGame"), new Runnable() { @Override public void run() { if (!checkDeckLegality(humanDeck)) { @@ -177,7 +179,7 @@ public class LoadDraftScreen extends LaunchScreen { if (FModel.getPreferences().getPrefBoolean(FPref.ENFORCE_DECK_LEGALITY)) { String errorMessage = GameType.Draft.getDeckFormat().getDeckConformanceProblem(humanDeck.getDeck()); if (errorMessage != null) { - FOptionPane.showErrorDialog("Your deck " + errorMessage + "\nPlease edit or choose a different deck.", "Invalid Deck"); + FOptionPane.showErrorDialog(Localizer.getInstance().getMessage("lblInvalidDeckDesc").replace("%n", errorMessage), Localizer.getInstance().getMessage("lblInvalidDeck")); return false; } } diff --git a/forge-gui-mobile/src/forge/screens/limited/NewDraftScreen.java b/forge-gui-mobile/src/forge/screens/limited/NewDraftScreen.java index b7ca199b0e2..9e96be6cb4e 100644 --- a/forge-gui-mobile/src/forge/screens/limited/NewDraftScreen.java +++ b/forge-gui-mobile/src/forge/screens/limited/NewDraftScreen.java @@ -11,6 +11,7 @@ import forge.screens.LoadingOverlay; import forge.screens.home.NewGameMenu; import forge.toolbox.FLabel; import forge.toolbox.FTextArea; +import forge.util.Localizer; import forge.util.ThreadUtil; import forge.util.Utils; import forge.util.gui.SGuiChoose; @@ -19,9 +20,9 @@ public class NewDraftScreen extends LaunchScreen { private static final float PADDING = Utils.scale(10); private final FTextArea lblDesc = add(new FTextArea(false, - "In Draft mode, three booster packs are rotated around eight players.\n\n" + - "Build a deck from the cards you choose. The AI will do the same.\n\n" + - "Then, play against any number of the AI opponents.")); + Localizer.getInstance().getMessage("lblDraftText1") + "\n\n" + + Localizer.getInstance().getMessage("lblDraftText2") + "\n\n" + + Localizer.getInstance().getMessage("lblDraftText3"))); public NewDraftScreen() { super(null, NewGameMenu.getMenu()); @@ -44,7 +45,7 @@ public class NewDraftScreen extends LaunchScreen { ThreadUtil.invokeInGameThread(new Runnable() { //must run in game thread to prevent blocking UI thread @Override public void run() { - final LimitedPoolType poolType = SGuiChoose.oneOrNone("Choose Draft Format", LimitedPoolType.values()); + final LimitedPoolType poolType = SGuiChoose.oneOrNone(Localizer.getInstance().getMessage("lblChooseDraftFormat"), LimitedPoolType.values()); if (poolType == null) { return; } final BoosterDraft draft = BoosterDraft.createDraft(poolType); @@ -53,7 +54,7 @@ public class NewDraftScreen extends LaunchScreen { FThreads.invokeInEdtLater(new Runnable() { @Override public void run() { - LoadingOverlay.show("Loading new draft...", new Runnable() { + LoadingOverlay.show(Localizer.getInstance().getMessage("lblLoadingNewDraft"), new Runnable() { @Override public void run() { Forge.openScreen(new DraftingProcessScreen(draft, EditorType.Draft, null)); diff --git a/forge-gui-mobile/src/forge/screens/limited/NewSealedScreen.java b/forge-gui-mobile/src/forge/screens/limited/NewSealedScreen.java index 9207742cb8f..5b0914d515b 100644 --- a/forge-gui-mobile/src/forge/screens/limited/NewSealedScreen.java +++ b/forge-gui-mobile/src/forge/screens/limited/NewSealedScreen.java @@ -12,6 +12,7 @@ import forge.screens.LaunchScreen; import forge.screens.home.NewGameMenu; import forge.toolbox.FLabel; import forge.toolbox.FTextArea; +import forge.util.Localizer; import forge.util.ThreadUtil; import forge.util.Utils; @@ -19,9 +20,9 @@ public class NewSealedScreen extends LaunchScreen { private static final float PADDING = Utils.scale(10); private final FTextArea lblDesc = add(new FTextArea(false, - "In Sealed mode, you build a deck from booster packs (maximum 10).\n\n" + - "Build a deck from the cards you receive. A number of AI opponents will do the same.\n\n" + - "Then, play against each of the AI opponents.")); + Localizer.getInstance().getMessage("lblSealedText2") + "\n\n" + + Localizer.getInstance().getMessage("lblSealedText3") + "\n\n" + + Localizer.getInstance().getMessage("lblSealedText4"))); public NewSealedScreen() { super(null, NewGameMenu.getMenu()); diff --git a/forge-gui/res/languages/de-DE.properties b/forge-gui/res/languages/de-DE.properties index 6efc55d23f1..d163b7fd74a 100644 --- a/forge-gui/res/languages/de-DE.properties +++ b/forge-gui/res/languages/de-DE.properties @@ -1172,3 +1172,27 @@ lblItsADraw=Es ist ein Unentschieden! lblTeamWon=Team %s hat gewonnen! lblWinnerWon=%s hat gewonnen! lblGameLog=Spiel-Aufzeichnung +#NewDraftScreen.java +lblLoadingNewDraft=Loading new draft... +#LoadDraftScreen.java +lblDoubleTapToEditDeck=Double-tap to edit deck (Long-press to view) +lblMode=Mode: +lblYouMustSelectExistingDeck=You must select an existing deck or build a deck from a new booster draft game. +lblWhichOpponentWouldYouLikeToFace=Which opponent would you like to face? +lblSingleMatch=Single Match +#NewGauntletScreen.java +lblGauntletText1=In Gauntlet mode, you select a deck and play against multiple opponents. +lblGauntletText2=Configure how many opponents you wish to face and what decks or types of decks they will play. +lblGauntletText3=Then, try to beat all AI opponents without losing a match. +lblSelectGauntletType=Select a Gauntlet Type +lblCustomGauntlet=Custom Gauntlet +lblGauntletContest=Gauntlet Contest +lblSelectYourDeck=Select Your Deck +lblSelectDeckForOpponent=Select Deck for Opponent +lblSelectGauntletContest=Select Gauntlet Contest +#PuzzleScreen.java +lblPuzzleText1=Puzzle Mode loads in a puzzle that you have to win in a predetermined time/way. +lblPuzzleText2=To begin, press the Start button below, then select a puzzle from a list. +lblPuzzleText3=Your objective will be displayed in a pop-up window when the puzzle starts and also specified on a special effect card which will be placed in your command zone. +lblChooseAPuzzle=Choose a puzzle +lblLoadingThePuzzle=Loading the puzzle... \ No newline at end of file diff --git a/forge-gui/res/languages/en-US.properties b/forge-gui/res/languages/en-US.properties index f5754b44fed..825e355f149 100644 --- a/forge-gui/res/languages/en-US.properties +++ b/forge-gui/res/languages/en-US.properties @@ -628,7 +628,7 @@ titleUnlocked=%n unlocked! lblStartADuel=Start a duel. lblSelectAQuestDeck=Please select a Quest Deck. lblInvalidDeck=Invalid Deck -lblInvalidDeckDesc=Your deck %n Please edit or choose a different deck. +lblInvalidDeckDesc=Your deck %n\nPlease edit or choose a different deck. #VSubmenuQuestPrefs.java lblQuestPreferences=Quest Preferences lblRewardsError=Rewards Error @@ -1171,4 +1171,28 @@ btnQuitMatch=Quit Match lblItsADraw=It's a draw! lblTeamWon=Team %s won! lblWinnerWon=%s won! -lblGameLog=Game Log \ No newline at end of file +lblGameLog=Game Log +#NewDraftScreen.java +lblLoadingNewDraft=Loading new draft... +#LoadDraftScreen.java +lblDoubleTapToEditDeck=Double-tap to edit deck (Long-press to view) +lblMode=Mode: +lblYouMustSelectExistingDeck=You must select an existing deck or build a deck from a new booster draft game. +lblWhichOpponentWouldYouLikeToFace=Which opponent would you like to face? +lblSingleMatch=Single Match +#NewGauntletScreen.java +lblGauntletText1=In Gauntlet mode, you select a deck and play against multiple opponents. +lblGauntletText2=Configure how many opponents you wish to face and what decks or types of decks they will play. +lblGauntletText3=Then, try to beat all AI opponents without losing a match. +lblSelectGauntletType=Select a Gauntlet Type +lblCustomGauntlet=Custom Gauntlet +lblGauntletContest=Gauntlet Contest +lblSelectYourDeck=Select Your Deck +lblSelectDeckForOpponent=Select Deck for Opponent +lblSelectGauntletContest=Select Gauntlet Contest +#PuzzleScreen.java +lblPuzzleText1=Puzzle Mode loads in a puzzle that you have to win in a predetermined time/way. +lblPuzzleText2=To begin, press the Start button below, then select a puzzle from a list. +lblPuzzleText3=Your objective will be displayed in a pop-up window when the puzzle starts and also specified on a special effect card which will be placed in your command zone. +lblChooseAPuzzle=Choose a puzzle +lblLoadingThePuzzle=Loading the puzzle... \ No newline at end of file diff --git a/forge-gui/res/languages/es-ES.properties b/forge-gui/res/languages/es-ES.properties index 468a4ac6480..f942cf13fab 100644 --- a/forge-gui/res/languages/es-ES.properties +++ b/forge-gui/res/languages/es-ES.properties @@ -628,7 +628,7 @@ titleUnlocked=%n desbloqueado! lblStartADuel=Comienza un duelo. lblSelectAQuestDeck=Por favor, seleccione un mazo de aventura. lblInvalidDeck=Mazo no válido -lblInvalidDeckDesc=Su mazo %n Por favor, edite o elija un mazo diferente. +lblInvalidDeckDesc=Su mazo %n\nPor favor, edite o elija un mazo diferente. #VSubmenuQuestPrefs.java lblQuestPreferences=Preferencias de la Aventura lblRewardsError=Error de recompensas @@ -1171,4 +1171,28 @@ btnQuitMatch=Salir de la Partida lblItsADraw=¡Es un empate! lblTeamWon=¡El equipo %s ha ganado! lblWinnerWon=¡%s ha ganado! -lblGameLog=Registro del Juego \ No newline at end of file +lblGameLog=Registro del Juego +#NewDraftScreen.java +lblLoadingNewDraft=Cargando nuevo Draft... +#LoadDraftScreen.java +lblDoubleTapToEditDeck=Pulsa 2 veces para editar el mazo (Pulsación prologanda para ver) +lblMode=Modo: +lblYouMustSelectExistingDeck=Debes seleccionar un mazo existente o construir un mazo a partir de un nuevo juego de booster draft. +lblWhichOpponentWouldYouLikeToFace=¿A qué oponente te gustaría enfrentarte? +lblSingleMatch=Partida individual +#NewGauntletScreen.java +lblGauntletText1=En el modo Desafío, selecciona un mazo y juega contra varios oponentes. +lblGauntletText2=Configura a cuántos oponentes deseas enfrentarte y qué mazos o tipos de mazos jugarán. +lblGauntletText3=Luego, intenta derrotar a todos los oponentes de la IA sin perder una partida. +lblSelectGauntletType=Seleccione el Tipo de Desafío +lblCustomGauntlet=Desafío Personalizado +lblGauntletContest=Concurso de Desafío +lblSelectYourDeck=Seleccciona Tu Mazo +lblSelectDeckForOpponent=Seleccionar Mazo para el Oponente +lblSelectGauntletContest=Seleccionar Concurso de Desafío +#PuzzleScreen.java +lblPuzzleText1=En el Modo Puzzle se carga un rompecabezas que tienes que ganar en un tiempo/forma predeterminados. +lblPuzzleText2=Para comenzar, pulsa el botón Inicio y selecciona un puzzle de una lista. +lblPuzzleText3=Tu objetivo se mostrará en una ventana emergente cuando se inicie el puzzle y también se especificará en una carta de efectos especiales que se colocará en tu zona de comandos. +lblChooseAPuzzle=Elige un puzzle +lblLoadingThePuzzle=Cargando el puzzle... \ No newline at end of file diff --git a/forge-gui/res/languages/zh-CN.properties b/forge-gui/res/languages/zh-CN.properties index 012b5a945e8..1c9184ab125 100644 --- a/forge-gui/res/languages/zh-CN.properties +++ b/forge-gui/res/languages/zh-CN.properties @@ -1171,4 +1171,28 @@ btnQuitMatch=退出比赛 lblItsADraw=平局! lblTeamWon=队伍%s胜利了! lblWinnerWon=%s胜利了! -lblGameLog=游戏日志 \ No newline at end of file +lblGameLog=游戏日志 +#NewDraftScreen.java +lblLoadingNewDraft=Loading new draft... +#LoadDraftScreen.java +lblDoubleTapToEditDeck=Double-tap to edit deck (Long-press to view) +lblMode=Mode: +lblYouMustSelectExistingDeck=You must select an existing deck or build a deck from a new booster draft game. +lblWhichOpponentWouldYouLikeToFace=Which opponent would you like to face? +lblSingleMatch=Single Match +#NewGauntletScreen.java +lblGauntletText1=In Gauntlet mode, you select a deck and play against multiple opponents. +lblGauntletText2=Configure how many opponents you wish to face and what decks or types of decks they will play. +lblGauntletText3=Then, try to beat all AI opponents without losing a match. +lblSelectGauntletType=Select a Gauntlet Type +lblCustomGauntlet=Custom Gauntlet +lblGauntletContest=Gauntlet Contest +lblSelectYourDeck=Select Your Deck +lblSelectDeckForOpponent=Select Deck for Opponent +lblSelectGauntletContest=Select Gauntlet Contest +#PuzzleScreen.java +lblPuzzleText1=Puzzle Mode loads in a puzzle that you have to win in a predetermined time/way. +lblPuzzleText2=To begin, press the Start button below, then select a puzzle from a list. +lblPuzzleText3=Your objective will be displayed in a pop-up window when the puzzle starts and also specified on a special effect card which will be placed in your command zone. +lblChooseAPuzzle=Choose a puzzle +lblLoadingThePuzzle=Loading the puzzle... \ No newline at end of file From 53c88f03021acb6705e9bf0f76d7d6c9d7ed23f7 Mon Sep 17 00:00:00 2001 From: Peter Date: Mon, 7 Oct 2019 22:40:45 +0200 Subject: [PATCH 2/9] Added to contributors XD --- forge-gui/release-files/CONTRIBUTORS.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/forge-gui/release-files/CONTRIBUTORS.txt b/forge-gui/release-files/CONTRIBUTORS.txt index 3b3915bc16d..e8072d2e3d0 100644 --- a/forge-gui/release-files/CONTRIBUTORS.txt +++ b/forge-gui/release-files/CONTRIBUTORS.txt @@ -10,6 +10,7 @@ Hanmac Indigo Dragon Jamin Collins kevlahnota +klaxnek KrazyTheFox leriomaggio Luke From 31bb611ecfc44a927812d0169a1f671d46b1782e Mon Sep 17 00:00:00 2001 From: CCTV-1 Date: Tue, 15 Oct 2019 18:35:16 +0800 Subject: [PATCH 3/9] update BitmapFontWriter.java to latest version(https://github.com/libgdx/libgdx/blob/master/extensions/gdx-tools/src/com/badlogic/gdx/tools/bmfont/BitmapFontWriter.java) --- .../src/forge/assets/BitmapFontWriter.java | 691 +++++++++--------- 1 file changed, 343 insertions(+), 348 deletions(-) diff --git a/forge-gui-mobile/src/forge/assets/BitmapFontWriter.java b/forge-gui-mobile/src/forge/assets/BitmapFontWriter.java index 05234d5b1d6..5749828d89d 100644 --- a/forge-gui-mobile/src/forge/assets/BitmapFontWriter.java +++ b/forge-gui-mobile/src/forge/assets/BitmapFontWriter.java @@ -16,7 +16,6 @@ package forge.assets; - import com.badlogic.gdx.files.FileHandle; import com.badlogic.gdx.graphics.Pixmap; import com.badlogic.gdx.graphics.PixmapIO; @@ -27,365 +26,361 @@ import com.badlogic.gdx.utils.Array; /** A utility to output BitmapFontData to a FNT file. This can be useful for caching the result from TrueTypeFont, for faster load * times. - * - * The font format is from the AngelCodeFont BMFont tool. - * + *

+ * The font file format is from the AngelCodeFont BMFont tool. + *

+ * Output is nearly identical to the FreeType settting in the Hiero tool {@Link com.badlogic.gdx.tools.hiero.Hiero}. BitmapFontWriter gives more flexibility, eg + * borders and shadows can be used. Hiero is able to avoid outputting the same glyph image more than once if multiple character + * codes have the exact same glyph. * @author mattdesl AKA davedes */ +public class BitmapFontWriter { + /** The output format. */ + public static enum OutputFormat { -/** - * This file is 'borrowed' from gdx-tools in the libgdx source - */ + /** AngelCodeFont text format */ + Text, + /** AngelCodeFont XML format */ + XML; + } - public class BitmapFontWriter { + /** The output format */ + private static OutputFormat format = OutputFormat.Text; - /** The output format. */ - public enum OutputFormat { - - /** AngelCodeFont text format */ - Text, - /** AngelCodeFont XML format */ - XML - } - - /** The output format */ - private static OutputFormat format = OutputFormat.Text; + /** Sets the AngelCodeFont output format for subsequent writes; can be text (for LibGDX) or XML (for other engines, like + * Pixi.js). + * + * @param fmt the output format to use */ + public static void setOutputFormat (OutputFormat fmt) { + if (fmt == null) throw new NullPointerException("format cannot be null"); + format = fmt; + } - /** Sets the AngelCodeFont output format for subsequent writes; can be text (for LibGDX) or XML (for other engines, like - * Pixi.js). - * - * @param fmt the output format to use */ - public static void setOutputFormat(OutputFormat fmt) { - if (fmt==null) - throw new NullPointerException("format cannot be null"); - format = fmt; - } + /** Returns the currently used output format. + * @return the output format */ + public static OutputFormat getOutputFormat () { + return format; + } - /** Returns the currently used output format. - * @return the output format */ - public static OutputFormat getOutputFormat() { - return format; - } - - /** The Padding parameter for FontInfo. */ - public static class Padding { - public int up, down, left, right; + /** The Padding parameter for FontInfo. */ + public static class Padding { + public int up, down, left, right; - public Padding() { - } - - public Padding(int up, int down, int left, int right) { - this.up = up; - this.down = down; - this.left = left; - this.right = right; - } - } + public Padding () { + } - /** The spacing parameter for FontInfo. */ - public static class Spacing { - public int horizontal, vertical; - } + public Padding (int up, int down, int left, int right) { + this.up = up; + this.down = down; + this.left = left; + this.right = right; + } + } - /** The font "info" line; this will be ignored by LibGDX's BitmapFont reader, - * but useful for clean and organized output. */ - public static class FontInfo { - /** Face name */ - public String face; - /** Font size (pt) */ - public int size = 12; - /** Whether the font is bold */ - public boolean bold; - /** Whether the font is italic */ - public boolean italic; - /** The charset; or null/empty for default */ - public String charset; - /** Whether the font uses unicode glyphs */ - public boolean unicode = true; - /** Stretch for height; default to 100% */ - public int stretchH = 100; - /** Whether smoothing is applied */ - public boolean smooth = true; - /** Amount of anti-aliasing that was applied to the font */ - public int aa = 2; - /** Padding that was applied to the font */ - public Padding padding = new Padding(); - /** Horizontal/vertical spacing that was applied to font */ - public Spacing spacing = new Spacing(); - public int outline = 0; - - public FontInfo() { - } - - public FontInfo(String face, int size) { - this.face = face; - this.size = size; - } - } - - private static String quote(Object params) { - return quote(params, false); - } - - private static String quote(Object params, boolean spaceAfter) { - if (BitmapFontWriter.getOutputFormat() == OutputFormat.XML) - return "\"" + params.toString().trim() + "\"" + (spaceAfter ? " " : ""); - else - return params.toString(); - } + /** The spacing parameter for FontInfo. */ + public static class Spacing { + public int horizontal, vertical; + } - /** Writes the given BitmapFontData to a file, using the specified pageRefs strings as the image paths for each texture - * page. The glyphs in BitmapFontData have a "page" id, which references the index of the pageRef you specify here. - * - * The FontInfo parameter is useful for cleaner output; such as including a size and font face name hint. However, it can be - * null to use default values. Ultimately, LibGDX ignores the "info" line when reading back fonts. - * - * Likewise, the scaleW and scaleH are only for cleaner output. They are currently ignored by LibGDX's reader. For maximum - * compatibility with other BMFont tools, you should use the width and height of your texture pages (each page should be the - * same size). - * - * @param fontData the bitmap font - * @param pageRefs the references to each texture page image file, generally in the same folder as outFntFile - * @param outFntFile the font file to save to (typically ends with '.fnt') - * @param info the optional info for the file header; can be null - * @param scaleW the width of your texture pages - * @param scaleH the height of your texture pages */ - public static void writeFont (BitmapFontData fontData, String[] pageRefs, FileHandle outFntFile, FontInfo info, int scaleW, int scaleH) { - if (info==null) { - info = new FontInfo(); - info.face = outFntFile.nameWithoutExtension(); - } - - int lineHeight = (int)fontData.lineHeight; - int pages = pageRefs.length; - int packed = 0; - int base = (int)((fontData.capHeight) + (fontData.flipped ? -fontData.ascent : fontData.ascent)); - OutputFormat fmt = BitmapFontWriter.getOutputFormat(); - boolean xml = fmt == OutputFormat.XML; - - StringBuilder buf = new StringBuilder(); - - if (xml) { - buf.append("\n"); - } - String xmlOpen = xml ? "\t<" : ""; - String xmlCloseSelf = xml ? "/>" : ""; - String xmlTab = xml ? "\t" : ""; - String xmlClose = xml ? ">" : ""; - - String xmlQuote = xml ? "\"" : ""; - String alphaChnlParams = - xml ? " alphaChnl=\"0\" redChnl=\"0\" greenChnl=\"0\" blueChnl=\"0\"" - : " alphaChnl=0 redChnl=0 greenChnl=0 blueChnl=0"; - //INFO LINE - - buf.append(xmlOpen) - .append("info face=\"") - .append(info.face==null ? "" : info.face.replaceAll("\"", "'")) - .append("\" size=").append( quote(info.size) ) - .append(" bold=").append( quote(info.bold ? 1 : 0) ) - .append(" italic=").append( quote(info.italic ? 1 : 0) ) - .append(" charset=\"").append(info.charset==null ? "" : info.charset) - .append("\" unicode=").append( quote(info.unicode ? 1 : 0) ) - .append(" stretchH=").append( quote(info.stretchH) ) - .append(" smooth=").append( quote(info.smooth ? 1 : 0) ) - .append(" aa=").append( quote(info.aa) ) - .append(" padding=") - .append(xmlQuote) - .append(info.padding.up).append(",") - .append(info.padding.down).append(",") - .append(info.padding.left).append(",") - .append(info.padding.right) - .append(xmlQuote) - .append(" spacing=") - .append(xmlQuote) - .append(info.spacing.horizontal).append(",") - .append(info.spacing.vertical) - .append(xmlQuote) - .append(xmlCloseSelf) - .append("\n"); - - //COMMON line - buf.append(xmlOpen) - .append("common lineHeight=").append( quote(lineHeight) ) - .append(" base=").append( quote(base) ) - .append(" scaleW=").append( quote(scaleW) ) - .append(" scaleH=").append( quote(scaleH) ) - .append(" pages=").append( quote(pages) ) - .append(" packed=").append( quote(packed) ) - .append(alphaChnlParams) - .append(xmlCloseSelf) - .append("\n"); - - if (xml) - buf.append("\t\n"); - - //PAGES - for (int i=0; i\n"); - - //CHARS - Array glyphs = new Array<>(256); - for (int i=0; i\n"); - - //KERNINGS - int kernCount = 0; - StringBuilder kernBuf = new StringBuilder(); - for (int i = 0; i < glyphs.size; i++) { - for (int j = 0; j < glyphs.size; j++) { - Glyph first = glyphs.get(i); - Glyph second = glyphs.get(j); - int kern = first.getKerning((char)second.id); - if (kern!=0) { - kernCount++; - kernBuf.append(xmlTab) - .append(xmlOpen) - .append("kerning first=").append(quote(first.id)) - .append(" second=").append(quote(second.id)) - .append(" amount=").append(quote(kern, true)) - .append(xmlCloseSelf) - .append("\n"); - } - } - } + /** The font "info" line; everything except padding and override metrics are ignored by LibGDX's BitmapFont reader, it is otherwise just useful for + * clean and organized output. */ + public static class FontInfo { + /** Face name */ + public String face; + /** Font size (pt) */ + public int size = 12; + /** Whether the font is bold */ + public boolean bold; + /** Whether the font is italic */ + public boolean italic; + /** The charset; or null/empty for default */ + public String charset; + /** Whether the font uses unicode glyphs */ + public boolean unicode = true; + /** Stretch for height; default to 100% */ + public int stretchH = 100; + /** Whether smoothing is applied */ + public boolean smooth = true; + /** Amount of anti-aliasing that was applied to the font */ + public int aa = 2; + /** Padding that was applied to the font */ + public Padding padding = new Padding(); + /** Horizontal/vertical spacing that was applied to font */ + public Spacing spacing = new Spacing(); + public int outline = 0; - //KERN info - buf.append(xmlOpen) - .append("kernings count=").append(quote(kernCount)) - .append(xmlClose) - .append("\n"); - buf.append(kernBuf); - - if (xml) { - buf.append("\t\n"); - buf.append(""); - } - - String charset = info.charset; - if (charset!=null&&charset.length()==0) - charset = null; - - outFntFile.writeString(buf.toString(), false, charset); - } + /** Override metrics */ + public boolean hasOverrideMetrics; + public float ascent; + public float descent; + public float down; + public float capHeight; + public float lineHeight; + public float spaceXAdvance; + public float xHeight; - - /** A utility method which writes the given font data to a file. - * - * The specified pixmaps are written to the parent directory of outFntFile, using that file's name without an - * extension for the PNG file name(s). - * - * The specified FontInfo is optional, and can be null. - * - * Typical usage looks like this: - * - *

-     * BitmapFontWriter.writeFont(myFontData, myFontPixmaps, Gdx.files.external("fonts/output.fnt"), new FontInfo("Arial", 16));
-     * 
- * - * @param fontData the font data - * @param pages the pixmaps to write as PNGs - * @param outFntFile the output file for the font definition - * @param info the optional font info for the header file, can be null */ - public static void writeFont (BitmapFontData fontData, Pixmap[] pages, FileHandle outFntFile, FontInfo info) { - String[] pageRefs = writePixmaps(pages, outFntFile.parent(), outFntFile.nameWithoutExtension()); - - //write the font data - writeFont(fontData, pageRefs, outFntFile, info, pages[0].getWidth(), pages[0].getHeight()); - } + public FontInfo () { + } - /** A utility method to write the given array of pixmaps to the given output directory, with the specified file name. If the - * pages array is of length 1, then the resulting file ref will look like: "fileName.png". - * - * If the pages array is greater than length 1, the resulting file refs will be appended with "_N", such as "fileName_0.png", - * "fileName_1.png", "fileName_2.png" etc. - * - * The returned string array can then be passed to the writeFont method. - * - * Note: None of the pixmaps will be disposed. - * - * @param pages the pages of pixmap data to write - * @param outputDir the output directory - * @param fileName the file names for the output images - * @return the array of string references to be used with writeFont */ - public static String[] writePixmaps (Pixmap[] pages, FileHandle outputDir, String fileName) { - if (pages==null || pages.length==0) - throw new IllegalArgumentException("no pixmaps supplied to BitmapFontWriter.write"); - - String[] pageRefs = new String[pages.length]; - - for (int i=0; i pages, FileHandle outputDir, String fileName) { - Pixmap[] pix = new Pixmap[pages.size]; - for (int i=0; ipageRefs strings as the image paths for each + * texture page. The glyphs in BitmapFontData have a "page" id, which references the index of the pageRef you specify here. + * + * The FontInfo parameter is useful for cleaner output; such as including a size and font face name hint. However, it can be + * null to use default values. LibGDX ignores most of the "info" line when reading back fonts, only padding is used. Padding + * also affects the size, location, and offset of the glyphs that are output. + * + * Likewise, the scaleW and scaleH are only for cleaner output. They are currently ignored by LibGDX's reader. For maximum + * compatibility with other BMFont tools, you should use the width and height of your texture pages (each page should be the + * same size). + * + * @param fontData the bitmap font + * @param pageRefs the references to each texture page image file, generally in the same folder as outFntFile + * @param outFntFile the font file to save to (typically ends with '.fnt') + * @param info the optional info for the file header; can be null + * @param scaleW the width of your texture pages + * @param scaleH the height of your texture pages */ + public static void writeFont (BitmapFontData fontData, String[] pageRefs, FileHandle outFntFile, FontInfo info, int scaleW, + int scaleH) { + if (info == null) { + info = new FontInfo(); + info.face = outFntFile.nameWithoutExtension(); + } + + int lineHeight = (int)fontData.lineHeight; + int pages = pageRefs.length; + int packed = 0; + int base = (int)((fontData.capHeight) + (fontData.flipped ? -fontData.ascent : fontData.ascent)); + OutputFormat fmt = BitmapFontWriter.getOutputFormat(); + boolean xml = fmt == OutputFormat.XML; + + StringBuilder buf = new StringBuilder(); + + if (xml) { + buf.append("\n"); + } + String xmlOpen = xml ? "\t<" : ""; + String xmlCloseSelf = xml ? "/>" : ""; + String xmlTab = xml ? "\t" : ""; + String xmlClose = xml ? ">" : ""; + + String xmlQuote = xml ? "\"" : ""; + String alphaChnlParams = xml ? " alphaChnl=\"0\" redChnl=\"0\" greenChnl=\"0\" blueChnl=\"0\"" + : " alphaChnl=0 redChnl=0 greenChnl=0 blueChnl=0"; + + // INFO LINE + buf.append(xmlOpen).append("info face=\"").append(info.face == null ? "" : info.face.replaceAll("\"", "'")) + .append("\" size=").append(quote(info.size)).append(" bold=").append(quote(info.bold ? 1 : 0)).append(" italic=") + .append(quote(info.italic ? 1 : 0)).append(" charset=\"").append(info.charset == null ? "" : info.charset) + .append("\" unicode=").append(quote(info.unicode ? 1 : 0)).append(" stretchH=").append(quote(info.stretchH)) + .append(" smooth=").append(quote(info.smooth ? 1 : 0)).append(" aa=").append(quote(info.aa)).append(" padding=") + .append(xmlQuote).append(info.padding.up).append(",").append(info.padding.right).append(",").append(info.padding.down) + .append(",").append(info.padding.left).append(xmlQuote).append(" spacing=").append(xmlQuote) + .append(info.spacing.horizontal).append(",").append(info.spacing.vertical).append(xmlQuote).append(xmlCloseSelf) + .append("\n"); + + // COMMON line + buf.append(xmlOpen).append("common lineHeight=").append(quote(lineHeight)).append(" base=").append(quote(base)) + .append(" scaleW=").append(quote(scaleW)).append(" scaleH=").append(quote(scaleH)).append(" pages=").append(quote(pages)) + .append(" packed=").append(quote(packed)).append(alphaChnlParams).append(xmlCloseSelf).append("\n"); + + if (xml) buf.append("\t\n"); + + // PAGES + for (int i = 0; i < pageRefs.length; i++) { + buf.append(xmlTab).append(xmlOpen).append("page id=").append(quote(i)).append(" file=\"").append(pageRefs[i]) + .append("\"").append(xmlCloseSelf).append("\n"); + } + + if (xml) buf.append("\t\n"); + + // CHARS + Array glyphs = new Array(256); + for (int i = 0; i < fontData.glyphs.length; i++) { + if (fontData.glyphs[i] == null) continue; + + for (int j = 0; j < fontData.glyphs[i].length; j++) { + if (fontData.glyphs[i][j] != null) { + glyphs.add(fontData.glyphs[i][j]); + } + } + } + + buf.append(xmlOpen).append("chars count=").append(quote(glyphs.size)).append(xmlClose).append("\n"); + + int padLeft = 0, padRight = 0, padTop = 0, padX = 0, padY = 0; + if (info != null) { + padTop = info.padding.up; + padLeft = info.padding.left; + padRight = info.padding.right; + padX = padLeft + padRight; + padY = info.padding.up + info.padding.down; + } + + // CHAR definitions + for (int i = 0; i < glyphs.size; i++) { + Glyph g = glyphs.get(i); + boolean empty = g.width == 0 || g.height == 0; + buf.append(xmlTab).append(xmlOpen).append("char id=").append(quote(String.format("%-6s", g.id), true)).append("x=") + .append(quote(String.format("%-5s", empty ? 0 : g.srcX), true)).append("y=") + .append(quote(String.format("%-5s", empty ? 0 : g.srcY), true)).append("width=") + .append(quote(String.format("%-5s", empty ? 0 : g.width), true)).append("height=") + .append(quote(String.format("%-5s", empty ? 0 : g.height), true)).append("xoffset=") + .append(quote(String.format("%-5s", g.xoffset - padLeft), true)).append("yoffset=") + .append(quote(String.format("%-5s", fontData.flipped ? g.yoffset + padTop : -(g.height + (g.yoffset + padTop))), true)) + .append("xadvance=").append(quote(String.format("%-5s", g.xadvance), true)).append("page=") + .append(quote(String.format("%-5s", g.page), true)).append("chnl=").append(quote(0, true)).append(xmlCloseSelf) + .append("\n"); + } + + if (xml) buf.append("\t\n"); + + // KERNINGS + int kernCount = 0; + StringBuilder kernBuf = new StringBuilder(); + for (int i = 0; i < glyphs.size; i++) { + for (int j = 0; j < glyphs.size; j++) { + Glyph first = glyphs.get(i); + Glyph second = glyphs.get(j); + int kern = first.getKerning((char)second.id); + if (kern != 0) { + kernCount++; + kernBuf.append(xmlTab).append(xmlOpen).append("kerning first=").append(quote(first.id)).append(" second=") + .append(quote(second.id)).append(" amount=").append(quote(kern, true)).append(xmlCloseSelf).append("\n"); + } + } + } + + // KERN info + buf.append(xmlOpen).append("kernings count=").append(quote(kernCount)).append(xmlClose).append("\n"); + buf.append(kernBuf); + + if (xml) { + buf.append("\t\n"); + } + + // Override metrics + if (info.hasOverrideMetrics) { + if (xml) buf.append("\t\n"); + + buf.append(xmlTab).append(xmlOpen) + .append("metrics ascent=").append(quote(info.ascent, true)) + .append(" descent=").append(quote(info.descent, true)) + .append(" down=").append(quote(info.down, true)) + .append(" capHeight=").append(quote(info.capHeight, true)) + .append(" lineHeight=").append(quote(info.lineHeight, true)) + .append(" spaceXAdvance=").append(quote(info.spaceXAdvance, true)) + .append(" xHeight=").append(quote(info.xHeight, true)) + .append(xmlCloseSelf).append("\n"); + + if (xml) buf.append("\t\n"); + } + + if (xml) { + buf.append(""); + } + + String charset = info.charset; + if (charset != null && charset.length() == 0) charset = null; + + outFntFile.writeString(buf.toString(), false, charset); + } + + /** A utility method which writes the given font data to a file. + * + * The specified pixmaps are written to the parent directory of outFntFile, using that file's name without an + * extension for the PNG file name(s). + * + * The specified FontInfo is optional, and can be null. + * + * Typical usage looks like this: + * + *
+	 * BitmapFontWriter.writeFont(myFontData, myFontPixmaps, Gdx.files.external("fonts/output.fnt"), new FontInfo("Arial", 16));
+	 * 
+ * + * @param fontData the font data + * @param pages the pixmaps to write as PNGs + * @param outFntFile the output file for the font definition + * @param info the optional font info for the header file, can be null */ + public static void writeFont (BitmapFontData fontData, Pixmap[] pages, FileHandle outFntFile, FontInfo info) { + String[] pageRefs = writePixmaps(pages, outFntFile.parent(), outFntFile.nameWithoutExtension()); + + // write the font data + writeFont(fontData, pageRefs, outFntFile, info, pages[0].getWidth(), pages[0].getHeight()); + } + + /** A utility method to write the given array of pixmaps to the given output directory, with the specified file name. If the + * pages array is of length 1, then the resulting file ref will look like: "fileName.png". + * + * If the pages array is greater than length 1, the resulting file refs will be appended with "_N", such as "fileName_0.png", + * "fileName_1.png", "fileName_2.png" etc. + * + * The returned string array can then be passed to the writeFont method. + * + * Note: None of the pixmaps will be disposed. + * + * @param pages the pages of pixmap data to write + * @param outputDir the output directory + * @param fileName the file names for the output images + * @return the array of string references to be used with writeFont */ + public static String[] writePixmaps (Pixmap[] pages, FileHandle outputDir, String fileName) { + if (pages == null || pages.length == 0) throw new IllegalArgumentException("no pixmaps supplied to BitmapFontWriter.write"); + + String[] pageRefs = new String[pages.length]; + + for (int i = 0; i < pages.length; i++) { + String ref = pages.length == 1 ? (fileName + ".png") : (fileName + "_" + i + ".png"); + + // the ref for this image + pageRefs[i] = ref; + + // write the PNG in that directory + PixmapIO.writePNG(outputDir.child(ref), pages[i]); + } + return pageRefs; + } + + /** A convenience method to write pixmaps by page; typically returned from a PixmapPacker when used alongside + * FreeTypeFontGenerator. + * + * @param pages the pages containing the Pixmaps + * @param outputDir the output directory + * @param fileName the file name + * @return the file refs */ + public static String[] writePixmaps (Array pages, FileHandle outputDir, String fileName) { + Pixmap[] pix = new Pixmap[pages.size]; + for (int i = 0; i < pages.size; i++) { + pix[i] = pages.get(i).getPixmap(); + } + return writePixmaps(pix, outputDir, fileName); + } +} \ No newline at end of file From 91534776d1a8cf72ef9dfcf32a6c3ed91cdd608f Mon Sep 17 00:00:00 2001 From: CCTV-1 Date: Thu, 17 Oct 2019 11:07:00 +0800 Subject: [PATCH 4/9] convert \t to four spaces,makes the diff able to read --- .../src/forge/assets/BitmapFontWriter.java | 602 +++++++++--------- 1 file changed, 303 insertions(+), 299 deletions(-) diff --git a/forge-gui-mobile/src/forge/assets/BitmapFontWriter.java b/forge-gui-mobile/src/forge/assets/BitmapFontWriter.java index 5749828d89d..3bec04e875b 100644 --- a/forge-gui-mobile/src/forge/assets/BitmapFontWriter.java +++ b/forge-gui-mobile/src/forge/assets/BitmapFontWriter.java @@ -24,6 +24,10 @@ import com.badlogic.gdx.graphics.g2d.BitmapFont.Glyph; import com.badlogic.gdx.graphics.g2d.PixmapPacker.Page; import com.badlogic.gdx.utils.Array; +/** + * This file is 'borrowed' from gdx-tools in the libgdx source + */ + /** A utility to output BitmapFontData to a FNT file. This can be useful for caching the result from TrueTypeFont, for faster load * times. *

@@ -35,352 +39,352 @@ import com.badlogic.gdx.utils.Array; * @author mattdesl AKA davedes */ public class BitmapFontWriter { - /** The output format. */ - public static enum OutputFormat { + /** The output format. */ + public static enum OutputFormat { - /** AngelCodeFont text format */ - Text, - /** AngelCodeFont XML format */ - XML; - } + /** AngelCodeFont text format */ + Text, + /** AngelCodeFont XML format */ + XML; + } - /** The output format */ - private static OutputFormat format = OutputFormat.Text; + /** The output format */ + private static OutputFormat format = OutputFormat.Text; - /** Sets the AngelCodeFont output format for subsequent writes; can be text (for LibGDX) or XML (for other engines, like - * Pixi.js). - * - * @param fmt the output format to use */ - public static void setOutputFormat (OutputFormat fmt) { - if (fmt == null) throw new NullPointerException("format cannot be null"); - format = fmt; - } + /** Sets the AngelCodeFont output format for subsequent writes; can be text (for LibGDX) or XML (for other engines, like + * Pixi.js). + * + * @param fmt the output format to use */ + public static void setOutputFormat (OutputFormat fmt) { + if (fmt == null) throw new NullPointerException("format cannot be null"); + format = fmt; + } - /** Returns the currently used output format. - * @return the output format */ - public static OutputFormat getOutputFormat () { - return format; - } + /** Returns the currently used output format. + * @return the output format */ + public static OutputFormat getOutputFormat () { + return format; + } - /** The Padding parameter for FontInfo. */ - public static class Padding { - public int up, down, left, right; + /** The Padding parameter for FontInfo. */ + public static class Padding { + public int up, down, left, right; - public Padding () { - } + public Padding () { + } - public Padding (int up, int down, int left, int right) { - this.up = up; - this.down = down; - this.left = left; - this.right = right; - } - } + public Padding (int up, int down, int left, int right) { + this.up = up; + this.down = down; + this.left = left; + this.right = right; + } + } - /** The spacing parameter for FontInfo. */ - public static class Spacing { - public int horizontal, vertical; - } + /** The spacing parameter for FontInfo. */ + public static class Spacing { + public int horizontal, vertical; + } - /** The font "info" line; everything except padding and override metrics are ignored by LibGDX's BitmapFont reader, it is otherwise just useful for - * clean and organized output. */ - public static class FontInfo { - /** Face name */ - public String face; - /** Font size (pt) */ - public int size = 12; - /** Whether the font is bold */ - public boolean bold; - /** Whether the font is italic */ - public boolean italic; - /** The charset; or null/empty for default */ - public String charset; - /** Whether the font uses unicode glyphs */ - public boolean unicode = true; - /** Stretch for height; default to 100% */ - public int stretchH = 100; - /** Whether smoothing is applied */ - public boolean smooth = true; - /** Amount of anti-aliasing that was applied to the font */ - public int aa = 2; - /** Padding that was applied to the font */ - public Padding padding = new Padding(); - /** Horizontal/vertical spacing that was applied to font */ - public Spacing spacing = new Spacing(); - public int outline = 0; + /** The font "info" line; everything except padding and override metrics are ignored by LibGDX's BitmapFont reader, it is otherwise just useful for + * clean and organized output. */ + public static class FontInfo { + /** Face name */ + public String face; + /** Font size (pt) */ + public int size = 12; + /** Whether the font is bold */ + public boolean bold; + /** Whether the font is italic */ + public boolean italic; + /** The charset; or null/empty for default */ + public String charset; + /** Whether the font uses unicode glyphs */ + public boolean unicode = true; + /** Stretch for height; default to 100% */ + public int stretchH = 100; + /** Whether smoothing is applied */ + public boolean smooth = true; + /** Amount of anti-aliasing that was applied to the font */ + public int aa = 2; + /** Padding that was applied to the font */ + public Padding padding = new Padding(); + /** Horizontal/vertical spacing that was applied to font */ + public Spacing spacing = new Spacing(); + public int outline = 0; - /** Override metrics */ - public boolean hasOverrideMetrics; - public float ascent; - public float descent; - public float down; - public float capHeight; - public float lineHeight; - public float spaceXAdvance; - public float xHeight; + /** Override metrics */ + public boolean hasOverrideMetrics; + public float ascent; + public float descent; + public float down; + public float capHeight; + public float lineHeight; + public float spaceXAdvance; + public float xHeight; - public FontInfo () { - } + public FontInfo () { + } - public FontInfo (String face, int size) { - this.face = face; - this.size = size; - } + public FontInfo (String face, int size) { + this.face = face; + this.size = size; + } - public void overrideMetrics (BitmapFontData data) { - hasOverrideMetrics = true; - ascent = data.ascent; - descent = data.descent; - down = data.down; - capHeight = data.capHeight; - lineHeight = data.lineHeight; - spaceXAdvance = data.spaceXadvance; - xHeight = data.xHeight; - } + public void overrideMetrics (BitmapFontData data) { + hasOverrideMetrics = true; + ascent = data.ascent; + descent = data.descent; + down = data.down; + capHeight = data.capHeight; + lineHeight = data.lineHeight; + spaceXAdvance = data.spaceXadvance; + xHeight = data.xHeight; + } - } + } - private static String quote (Object params) { - return quote(params, false); - } + private static String quote (Object params) { + return quote(params, false); + } - private static String quote (Object params, boolean spaceAfter) { - if (BitmapFontWriter.getOutputFormat() == OutputFormat.XML) - return "\"" + params.toString().trim() + "\"" + (spaceAfter ? " " : ""); - else - return params.toString(); - } + private static String quote (Object params, boolean spaceAfter) { + if (BitmapFontWriter.getOutputFormat() == OutputFormat.XML) + return "\"" + params.toString().trim() + "\"" + (spaceAfter ? " " : ""); + else + return params.toString(); + } - /** Writes the given BitmapFontData to a file, using the specified pageRefs strings as the image paths for each - * texture page. The glyphs in BitmapFontData have a "page" id, which references the index of the pageRef you specify here. - * - * The FontInfo parameter is useful for cleaner output; such as including a size and font face name hint. However, it can be - * null to use default values. LibGDX ignores most of the "info" line when reading back fonts, only padding is used. Padding - * also affects the size, location, and offset of the glyphs that are output. - * - * Likewise, the scaleW and scaleH are only for cleaner output. They are currently ignored by LibGDX's reader. For maximum - * compatibility with other BMFont tools, you should use the width and height of your texture pages (each page should be the - * same size). - * - * @param fontData the bitmap font - * @param pageRefs the references to each texture page image file, generally in the same folder as outFntFile - * @param outFntFile the font file to save to (typically ends with '.fnt') - * @param info the optional info for the file header; can be null - * @param scaleW the width of your texture pages - * @param scaleH the height of your texture pages */ - public static void writeFont (BitmapFontData fontData, String[] pageRefs, FileHandle outFntFile, FontInfo info, int scaleW, - int scaleH) { - if (info == null) { - info = new FontInfo(); - info.face = outFntFile.nameWithoutExtension(); - } + /** Writes the given BitmapFontData to a file, using the specified pageRefs strings as the image paths for each + * texture page. The glyphs in BitmapFontData have a "page" id, which references the index of the pageRef you specify here. + * + * The FontInfo parameter is useful for cleaner output; such as including a size and font face name hint. However, it can be + * null to use default values. LibGDX ignores most of the "info" line when reading back fonts, only padding is used. Padding + * also affects the size, location, and offset of the glyphs that are output. + * + * Likewise, the scaleW and scaleH are only for cleaner output. They are currently ignored by LibGDX's reader. For maximum + * compatibility with other BMFont tools, you should use the width and height of your texture pages (each page should be the + * same size). + * + * @param fontData the bitmap font + * @param pageRefs the references to each texture page image file, generally in the same folder as outFntFile + * @param outFntFile the font file to save to (typically ends with '.fnt') + * @param info the optional info for the file header; can be null + * @param scaleW the width of your texture pages + * @param scaleH the height of your texture pages */ + public static void writeFont (BitmapFontData fontData, String[] pageRefs, FileHandle outFntFile, FontInfo info, int scaleW, + int scaleH) { + if (info == null) { + info = new FontInfo(); + info.face = outFntFile.nameWithoutExtension(); + } - int lineHeight = (int)fontData.lineHeight; - int pages = pageRefs.length; - int packed = 0; - int base = (int)((fontData.capHeight) + (fontData.flipped ? -fontData.ascent : fontData.ascent)); - OutputFormat fmt = BitmapFontWriter.getOutputFormat(); - boolean xml = fmt == OutputFormat.XML; + int lineHeight = (int)fontData.lineHeight; + int pages = pageRefs.length; + int packed = 0; + int base = (int)((fontData.capHeight) + (fontData.flipped ? -fontData.ascent : fontData.ascent)); + OutputFormat fmt = BitmapFontWriter.getOutputFormat(); + boolean xml = fmt == OutputFormat.XML; - StringBuilder buf = new StringBuilder(); + StringBuilder buf = new StringBuilder(); - if (xml) { - buf.append("\n"); - } - String xmlOpen = xml ? "\t<" : ""; - String xmlCloseSelf = xml ? "/>" : ""; - String xmlTab = xml ? "\t" : ""; - String xmlClose = xml ? ">" : ""; + if (xml) { + buf.append("\n"); + } + String xmlOpen = xml ? "\t<" : ""; + String xmlCloseSelf = xml ? "/>" : ""; + String xmlTab = xml ? "\t" : ""; + String xmlClose = xml ? ">" : ""; - String xmlQuote = xml ? "\"" : ""; - String alphaChnlParams = xml ? " alphaChnl=\"0\" redChnl=\"0\" greenChnl=\"0\" blueChnl=\"0\"" - : " alphaChnl=0 redChnl=0 greenChnl=0 blueChnl=0"; + String xmlQuote = xml ? "\"" : ""; + String alphaChnlParams = xml ? " alphaChnl=\"0\" redChnl=\"0\" greenChnl=\"0\" blueChnl=\"0\"" + : " alphaChnl=0 redChnl=0 greenChnl=0 blueChnl=0"; - // INFO LINE - buf.append(xmlOpen).append("info face=\"").append(info.face == null ? "" : info.face.replaceAll("\"", "'")) - .append("\" size=").append(quote(info.size)).append(" bold=").append(quote(info.bold ? 1 : 0)).append(" italic=") - .append(quote(info.italic ? 1 : 0)).append(" charset=\"").append(info.charset == null ? "" : info.charset) - .append("\" unicode=").append(quote(info.unicode ? 1 : 0)).append(" stretchH=").append(quote(info.stretchH)) - .append(" smooth=").append(quote(info.smooth ? 1 : 0)).append(" aa=").append(quote(info.aa)).append(" padding=") - .append(xmlQuote).append(info.padding.up).append(",").append(info.padding.right).append(",").append(info.padding.down) - .append(",").append(info.padding.left).append(xmlQuote).append(" spacing=").append(xmlQuote) - .append(info.spacing.horizontal).append(",").append(info.spacing.vertical).append(xmlQuote).append(xmlCloseSelf) - .append("\n"); + // INFO LINE + buf.append(xmlOpen).append("info face=\"").append(info.face == null ? "" : info.face.replaceAll("\"", "'")) + .append("\" size=").append(quote(info.size)).append(" bold=").append(quote(info.bold ? 1 : 0)).append(" italic=") + .append(quote(info.italic ? 1 : 0)).append(" charset=\"").append(info.charset == null ? "" : info.charset) + .append("\" unicode=").append(quote(info.unicode ? 1 : 0)).append(" stretchH=").append(quote(info.stretchH)) + .append(" smooth=").append(quote(info.smooth ? 1 : 0)).append(" aa=").append(quote(info.aa)).append(" padding=") + .append(xmlQuote).append(info.padding.up).append(",").append(info.padding.right).append(",").append(info.padding.down) + .append(",").append(info.padding.left).append(xmlQuote).append(" spacing=").append(xmlQuote) + .append(info.spacing.horizontal).append(",").append(info.spacing.vertical).append(xmlQuote).append(xmlCloseSelf) + .append("\n"); - // COMMON line - buf.append(xmlOpen).append("common lineHeight=").append(quote(lineHeight)).append(" base=").append(quote(base)) - .append(" scaleW=").append(quote(scaleW)).append(" scaleH=").append(quote(scaleH)).append(" pages=").append(quote(pages)) - .append(" packed=").append(quote(packed)).append(alphaChnlParams).append(xmlCloseSelf).append("\n"); + // COMMON line + buf.append(xmlOpen).append("common lineHeight=").append(quote(lineHeight)).append(" base=").append(quote(base)) + .append(" scaleW=").append(quote(scaleW)).append(" scaleH=").append(quote(scaleH)).append(" pages=").append(quote(pages)) + .append(" packed=").append(quote(packed)).append(alphaChnlParams).append(xmlCloseSelf).append("\n"); - if (xml) buf.append("\t\n"); + if (xml) buf.append("\t\n"); - // PAGES - for (int i = 0; i < pageRefs.length; i++) { - buf.append(xmlTab).append(xmlOpen).append("page id=").append(quote(i)).append(" file=\"").append(pageRefs[i]) - .append("\"").append(xmlCloseSelf).append("\n"); - } + // PAGES + for (int i = 0; i < pageRefs.length; i++) { + buf.append(xmlTab).append(xmlOpen).append("page id=").append(quote(i)).append(" file=\"").append(pageRefs[i]) + .append("\"").append(xmlCloseSelf).append("\n"); + } - if (xml) buf.append("\t\n"); + if (xml) buf.append("\t\n"); - // CHARS - Array glyphs = new Array(256); - for (int i = 0; i < fontData.glyphs.length; i++) { - if (fontData.glyphs[i] == null) continue; + // CHARS + Array glyphs = new Array(256); + for (int i = 0; i < fontData.glyphs.length; i++) { + if (fontData.glyphs[i] == null) continue; - for (int j = 0; j < fontData.glyphs[i].length; j++) { - if (fontData.glyphs[i][j] != null) { - glyphs.add(fontData.glyphs[i][j]); - } - } - } + for (int j = 0; j < fontData.glyphs[i].length; j++) { + if (fontData.glyphs[i][j] != null) { + glyphs.add(fontData.glyphs[i][j]); + } + } + } - buf.append(xmlOpen).append("chars count=").append(quote(glyphs.size)).append(xmlClose).append("\n"); + buf.append(xmlOpen).append("chars count=").append(quote(glyphs.size)).append(xmlClose).append("\n"); - int padLeft = 0, padRight = 0, padTop = 0, padX = 0, padY = 0; - if (info != null) { - padTop = info.padding.up; - padLeft = info.padding.left; - padRight = info.padding.right; - padX = padLeft + padRight; - padY = info.padding.up + info.padding.down; - } + int padLeft = 0, padRight = 0, padTop = 0, padX = 0, padY = 0; + if (info != null) { + padTop = info.padding.up; + padLeft = info.padding.left; + padRight = info.padding.right; + padX = padLeft + padRight; + padY = info.padding.up + info.padding.down; + } - // CHAR definitions - for (int i = 0; i < glyphs.size; i++) { - Glyph g = glyphs.get(i); - boolean empty = g.width == 0 || g.height == 0; - buf.append(xmlTab).append(xmlOpen).append("char id=").append(quote(String.format("%-6s", g.id), true)).append("x=") - .append(quote(String.format("%-5s", empty ? 0 : g.srcX), true)).append("y=") - .append(quote(String.format("%-5s", empty ? 0 : g.srcY), true)).append("width=") - .append(quote(String.format("%-5s", empty ? 0 : g.width), true)).append("height=") - .append(quote(String.format("%-5s", empty ? 0 : g.height), true)).append("xoffset=") - .append(quote(String.format("%-5s", g.xoffset - padLeft), true)).append("yoffset=") - .append(quote(String.format("%-5s", fontData.flipped ? g.yoffset + padTop : -(g.height + (g.yoffset + padTop))), true)) - .append("xadvance=").append(quote(String.format("%-5s", g.xadvance), true)).append("page=") - .append(quote(String.format("%-5s", g.page), true)).append("chnl=").append(quote(0, true)).append(xmlCloseSelf) - .append("\n"); - } + // CHAR definitions + for (int i = 0; i < glyphs.size; i++) { + Glyph g = glyphs.get(i); + boolean empty = g.width == 0 || g.height == 0; + buf.append(xmlTab).append(xmlOpen).append("char id=").append(quote(String.format("%-6s", g.id), true)).append("x=") + .append(quote(String.format("%-5s", empty ? 0 : g.srcX), true)).append("y=") + .append(quote(String.format("%-5s", empty ? 0 : g.srcY), true)).append("width=") + .append(quote(String.format("%-5s", empty ? 0 : g.width), true)).append("height=") + .append(quote(String.format("%-5s", empty ? 0 : g.height), true)).append("xoffset=") + .append(quote(String.format("%-5s", g.xoffset - padLeft), true)).append("yoffset=") + .append(quote(String.format("%-5s", fontData.flipped ? g.yoffset + padTop : -(g.height + (g.yoffset + padTop))), true)) + .append("xadvance=").append(quote(String.format("%-5s", g.xadvance), true)).append("page=") + .append(quote(String.format("%-5s", g.page), true)).append("chnl=").append(quote(0, true)).append(xmlCloseSelf) + .append("\n"); + } - if (xml) buf.append("\t\n"); + if (xml) buf.append("\t\n"); - // KERNINGS - int kernCount = 0; - StringBuilder kernBuf = new StringBuilder(); - for (int i = 0; i < glyphs.size; i++) { - for (int j = 0; j < glyphs.size; j++) { - Glyph first = glyphs.get(i); - Glyph second = glyphs.get(j); - int kern = first.getKerning((char)second.id); - if (kern != 0) { - kernCount++; - kernBuf.append(xmlTab).append(xmlOpen).append("kerning first=").append(quote(first.id)).append(" second=") - .append(quote(second.id)).append(" amount=").append(quote(kern, true)).append(xmlCloseSelf).append("\n"); - } - } - } + // KERNINGS + int kernCount = 0; + StringBuilder kernBuf = new StringBuilder(); + for (int i = 0; i < glyphs.size; i++) { + for (int j = 0; j < glyphs.size; j++) { + Glyph first = glyphs.get(i); + Glyph second = glyphs.get(j); + int kern = first.getKerning((char)second.id); + if (kern != 0) { + kernCount++; + kernBuf.append(xmlTab).append(xmlOpen).append("kerning first=").append(quote(first.id)).append(" second=") + .append(quote(second.id)).append(" amount=").append(quote(kern, true)).append(xmlCloseSelf).append("\n"); + } + } + } - // KERN info - buf.append(xmlOpen).append("kernings count=").append(quote(kernCount)).append(xmlClose).append("\n"); - buf.append(kernBuf); + // KERN info + buf.append(xmlOpen).append("kernings count=").append(quote(kernCount)).append(xmlClose).append("\n"); + buf.append(kernBuf); - if (xml) { - buf.append("\t\n"); - } + if (xml) { + buf.append("\t\n"); + } - // Override metrics - if (info.hasOverrideMetrics) { - if (xml) buf.append("\t\n"); + // Override metrics + if (info.hasOverrideMetrics) { + if (xml) buf.append("\t\n"); - buf.append(xmlTab).append(xmlOpen) - .append("metrics ascent=").append(quote(info.ascent, true)) - .append(" descent=").append(quote(info.descent, true)) - .append(" down=").append(quote(info.down, true)) - .append(" capHeight=").append(quote(info.capHeight, true)) - .append(" lineHeight=").append(quote(info.lineHeight, true)) - .append(" spaceXAdvance=").append(quote(info.spaceXAdvance, true)) - .append(" xHeight=").append(quote(info.xHeight, true)) - .append(xmlCloseSelf).append("\n"); + buf.append(xmlTab).append(xmlOpen) + .append("metrics ascent=").append(quote(info.ascent, true)) + .append(" descent=").append(quote(info.descent, true)) + .append(" down=").append(quote(info.down, true)) + .append(" capHeight=").append(quote(info.capHeight, true)) + .append(" lineHeight=").append(quote(info.lineHeight, true)) + .append(" spaceXAdvance=").append(quote(info.spaceXAdvance, true)) + .append(" xHeight=").append(quote(info.xHeight, true)) + .append(xmlCloseSelf).append("\n"); - if (xml) buf.append("\t\n"); - } + if (xml) buf.append("\t\n"); + } - if (xml) { - buf.append(""); - } + if (xml) { + buf.append(""); + } - String charset = info.charset; - if (charset != null && charset.length() == 0) charset = null; + String charset = info.charset; + if (charset != null && charset.length() == 0) charset = null; - outFntFile.writeString(buf.toString(), false, charset); - } + outFntFile.writeString(buf.toString(), false, charset); + } - /** A utility method which writes the given font data to a file. - * - * The specified pixmaps are written to the parent directory of outFntFile, using that file's name without an - * extension for the PNG file name(s). - * - * The specified FontInfo is optional, and can be null. - * - * Typical usage looks like this: - * - *

-	 * BitmapFontWriter.writeFont(myFontData, myFontPixmaps, Gdx.files.external("fonts/output.fnt"), new FontInfo("Arial", 16));
-	 * 
- * - * @param fontData the font data - * @param pages the pixmaps to write as PNGs - * @param outFntFile the output file for the font definition - * @param info the optional font info for the header file, can be null */ - public static void writeFont (BitmapFontData fontData, Pixmap[] pages, FileHandle outFntFile, FontInfo info) { - String[] pageRefs = writePixmaps(pages, outFntFile.parent(), outFntFile.nameWithoutExtension()); + /** A utility method which writes the given font data to a file. + * + * The specified pixmaps are written to the parent directory of outFntFile, using that file's name without an + * extension for the PNG file name(s). + * + * The specified FontInfo is optional, and can be null. + * + * Typical usage looks like this: + * + *
+     * BitmapFontWriter.writeFont(myFontData, myFontPixmaps, Gdx.files.external("fonts/output.fnt"), new FontInfo("Arial", 16));
+     * 
+ * + * @param fontData the font data + * @param pages the pixmaps to write as PNGs + * @param outFntFile the output file for the font definition + * @param info the optional font info for the header file, can be null */ + public static void writeFont (BitmapFontData fontData, Pixmap[] pages, FileHandle outFntFile, FontInfo info) { + String[] pageRefs = writePixmaps(pages, outFntFile.parent(), outFntFile.nameWithoutExtension()); - // write the font data - writeFont(fontData, pageRefs, outFntFile, info, pages[0].getWidth(), pages[0].getHeight()); - } + // write the font data + writeFont(fontData, pageRefs, outFntFile, info, pages[0].getWidth(), pages[0].getHeight()); + } - /** A utility method to write the given array of pixmaps to the given output directory, with the specified file name. If the - * pages array is of length 1, then the resulting file ref will look like: "fileName.png". - * - * If the pages array is greater than length 1, the resulting file refs will be appended with "_N", such as "fileName_0.png", - * "fileName_1.png", "fileName_2.png" etc. - * - * The returned string array can then be passed to the writeFont method. - * - * Note: None of the pixmaps will be disposed. - * - * @param pages the pages of pixmap data to write - * @param outputDir the output directory - * @param fileName the file names for the output images - * @return the array of string references to be used with writeFont */ - public static String[] writePixmaps (Pixmap[] pages, FileHandle outputDir, String fileName) { - if (pages == null || pages.length == 0) throw new IllegalArgumentException("no pixmaps supplied to BitmapFontWriter.write"); + /** A utility method to write the given array of pixmaps to the given output directory, with the specified file name. If the + * pages array is of length 1, then the resulting file ref will look like: "fileName.png". + * + * If the pages array is greater than length 1, the resulting file refs will be appended with "_N", such as "fileName_0.png", + * "fileName_1.png", "fileName_2.png" etc. + * + * The returned string array can then be passed to the writeFont method. + * + * Note: None of the pixmaps will be disposed. + * + * @param pages the pages of pixmap data to write + * @param outputDir the output directory + * @param fileName the file names for the output images + * @return the array of string references to be used with writeFont */ + public static String[] writePixmaps (Pixmap[] pages, FileHandle outputDir, String fileName) { + if (pages == null || pages.length == 0) throw new IllegalArgumentException("no pixmaps supplied to BitmapFontWriter.write"); - String[] pageRefs = new String[pages.length]; + String[] pageRefs = new String[pages.length]; - for (int i = 0; i < pages.length; i++) { - String ref = pages.length == 1 ? (fileName + ".png") : (fileName + "_" + i + ".png"); + for (int i = 0; i < pages.length; i++) { + String ref = pages.length == 1 ? (fileName + ".png") : (fileName + "_" + i + ".png"); - // the ref for this image - pageRefs[i] = ref; + // the ref for this image + pageRefs[i] = ref; - // write the PNG in that directory - PixmapIO.writePNG(outputDir.child(ref), pages[i]); - } - return pageRefs; - } + // write the PNG in that directory + PixmapIO.writePNG(outputDir.child(ref), pages[i]); + } + return pageRefs; + } - /** A convenience method to write pixmaps by page; typically returned from a PixmapPacker when used alongside - * FreeTypeFontGenerator. - * - * @param pages the pages containing the Pixmaps - * @param outputDir the output directory - * @param fileName the file name - * @return the file refs */ - public static String[] writePixmaps (Array pages, FileHandle outputDir, String fileName) { - Pixmap[] pix = new Pixmap[pages.size]; - for (int i = 0; i < pages.size; i++) { - pix[i] = pages.get(i).getPixmap(); - } - return writePixmaps(pix, outputDir, fileName); - } + /** A convenience method to write pixmaps by page; typically returned from a PixmapPacker when used alongside + * FreeTypeFontGenerator. + * + * @param pages the pages containing the Pixmaps + * @param outputDir the output directory + * @param fileName the file name + * @return the file refs */ + public static String[] writePixmaps (Array pages, FileHandle outputDir, String fileName) { + Pixmap[] pix = new Pixmap[pages.size]; + for (int i = 0; i < pages.size; i++) { + pix[i] = pages.get(i).getPixmap(); + } + return writePixmaps(pix, outputDir, fileName); + } } \ No newline at end of file From d780aa43d425c69e0eafe9f5fc09200b6e07f6ea Mon Sep 17 00:00:00 2001 From: CCTV-1 Date: Fri, 18 Oct 2019 18:30:59 +0800 Subject: [PATCH 5/9] update new settings translation --- .../forge/screens/settings/SettingsPage.java | 12 +- forge-gui/res/languages/de-DE.properties | 6 + forge-gui/res/languages/en-US.properties | 6 + forge-gui/res/languages/es-ES.properties | 6 + forge-gui/res/languages/zh-CN.properties | 182 +++++++++--------- 5 files changed, 118 insertions(+), 94 deletions(-) diff --git a/forge-gui-mobile/src/forge/screens/settings/SettingsPage.java b/forge-gui-mobile/src/forge/screens/settings/SettingsPage.java index 7c2b0cd4711..ec41c7ea9a8 100644 --- a/forge-gui-mobile/src/forge/screens/settings/SettingsPage.java +++ b/forge-gui-mobile/src/forge/screens/settings/SettingsPage.java @@ -302,8 +302,8 @@ public class SettingsPage extends TabPage { localizer.getMessage("nlDisableCardEffect")), 4); lstSettings.addItem(new BooleanSetting(FPref.UI_ENABLE_BORDER_MASKING, - "Enable Round Border Mask", - "When enabled, the card corners are rounded (Preferably Card with Full Borders)."){ + localizer.getMessage("lblEnableRoundBorder"), + localizer.getMessage("nlEnableRoundBorder")){ @Override public void select() { super.select(); @@ -312,8 +312,8 @@ public class SettingsPage extends TabPage { } },4); lstSettings.addItem(new BooleanSetting(FPref.UI_ENABLE_PRELOAD_EXTENDED_ART, - "Preload Extended Art Cards", - "When enabled, Preloads Extended Art Cards to Cache on Startup."){ + localizer.getMessage("lblPreloadExtendedArtCards"), + localizer.getMessage("nlPreloadExtendedArtCards")){ @Override public void select() { super.select(); @@ -322,8 +322,8 @@ public class SettingsPage extends TabPage { } },4); lstSettings.addItem(new BooleanSetting(FPref.UI_SHOW_FPS, - "Show FPS Display", - "When enabled, show the FPS Display (Experimental)."){ + localizer.getMessage("lblShowFPSDisplay"), + localizer.getMessage("nlShowFPSDisplay")){ @Override public void select() { super.select(); diff --git a/forge-gui/res/languages/de-DE.properties b/forge-gui/res/languages/de-DE.properties index 6efc55d23f1..97d9e50b513 100644 --- a/forge-gui/res/languages/de-DE.properties +++ b/forge-gui/res/languages/de-DE.properties @@ -950,6 +950,12 @@ nlShowMatchBackground=Zeige Bilder im Spielfeldhintergrund. nlTheme=Wähle ein Thema um die Bildschirmanzeigen anzupassen. nlVibrateAfterLongPress=Aktiviert Vibration bei langen Druck, z.B. beim Zoomen. nlVibrateWhenLosingLife=Aktiviert Vibration bei Lebenspunktverlust. +lblEnableRoundBorder=Enable Round Border Mask +nlEnableRoundBorder=When enabled, the card corners are rounded (Preferably Card with Full Borders). +lblPreloadExtendedArtCards=Preload Extended Art Cards +nlPreloadExtendedArtCards=When enabled, Preloads Extended Art Cards to Cache on Startup. +lblShowFPSDisplay=Show FPS Display +nlShowFPSDisplay=When enabled, show the FPS Display (Experimental). #MatchScreen.java lblPlayers=Spieler lblLog=Bericht diff --git a/forge-gui/res/languages/en-US.properties b/forge-gui/res/languages/en-US.properties index f5754b44fed..4436c3c9b69 100644 --- a/forge-gui/res/languages/en-US.properties +++ b/forge-gui/res/languages/en-US.properties @@ -950,6 +950,12 @@ nlShowMatchBackground=Show match background image on battlefield, otherwise back nlTheme=Sets the theme that determines how display components are skinned. nlVibrateAfterLongPress=Enable quick vibration to signify a long press, such as for card zooming. nlVibrateWhenLosingLife=Enable vibration when your player loses life or takes damage during a game. +lblEnableRoundBorder=Enable Round Border Mask +nlEnableRoundBorder=When enabled, the card corners are rounded (Preferably Card with Full Borders). +lblPreloadExtendedArtCards=Preload Extended Art Cards +nlPreloadExtendedArtCards=When enabled, Preloads Extended Art Cards to Cache on Startup. +lblShowFPSDisplay=Show FPS Display +nlShowFPSDisplay=When enabled, show the FPS Display (Experimental). #MatchScreen.java lblPlayers=Players lblLog=Log diff --git a/forge-gui/res/languages/es-ES.properties b/forge-gui/res/languages/es-ES.properties index 468a4ac6480..b3cc4878eda 100644 --- a/forge-gui/res/languages/es-ES.properties +++ b/forge-gui/res/languages/es-ES.properties @@ -950,6 +950,12 @@ nlShowMatchBackground=Muestra la imagen de fondo de la partida en el campo de ba nlTheme=Establece el tema que determina el aspecto global del juego. nlVibrateAfterLongPress=Habilita la vibración rápida cuando se realice una pulsación prolongada, como p.ej. al realizar zoom de la carta. nlVibrateWhenLosingLife=Habilita la vibración cuando tu jugador pierde vida o sufre daños durante un juego. +lblEnableRoundBorder=Enable Round Border Mask +nlEnableRoundBorder=When enabled, the card corners are rounded (Preferably Card with Full Borders). +lblPreloadExtendedArtCards=Preload Extended Art Cards +nlPreloadExtendedArtCards=When enabled, Preloads Extended Art Cards to Cache on Startup. +lblShowFPSDisplay=Show FPS Display +nlShowFPSDisplay=When enabled, show the FPS Display (Experimental). #MatchScreen.java lblPlayers=Jugadores lblLog=Log diff --git a/forge-gui/res/languages/zh-CN.properties b/forge-gui/res/languages/zh-CN.properties index 012b5a945e8..6c646e5ce53 100644 --- a/forge-gui/res/languages/zh-CN.properties +++ b/forge-gui/res/languages/zh-CN.properties @@ -1,21 +1,21 @@ language.name=Chinese (CN) #SplashScreen.java -splash.loading.examining-cards=加载牌张,检查文件夹 -splash.loading.cards-folders=从文件夹加载牌张 -splash.loading.cards-archive=从存档中加载牌张 +splash.loading.examining-cards=加载卡牌,检查文件夹 +splash.loading.cards-folders=从文件夹加载卡牌 +splash.loading.cards-archive=从存档中加载卡牌 splash.loading.decks=加载套牌 splash.loading.processingimagesprites=处理精灵图 #FControl.java lblOpeningMainWindow=打开主窗口中 lblCloseScreen=关闭屏幕 -txCloseAction1=Forge现在支持选项卡导航,可以轻松关闭和切换不同屏幕。因此,您不再需要使用右上角X按钮关闭当前屏幕并返回 -txCloseAction2=请选择右上角的X按钮选择接下来将要进行的操作。此选项保留给未来使用,您将不会再看到此消息,您可以随时在“首选项”中更改此行为 -titCloseAction=选择您的关闭行动 +txCloseAction1=Forge现在支持选项卡导航,可以轻松关闭和切换不同屏幕。因此,你不再需要使用右上角X按钮关闭当前屏幕并返回 +txCloseAction2=请通过右上角的X按钮选择将要进行的动作。此选项保留给未来使用,你将不会再看到此消息,你可以随时在“首选项”中更改此行为 +titCloseAction=选择你的关闭动作 lblAreYouSureYouWishRestartForge=你确定要重启Forge吗? lblAreYouSureYouWishExitForge=你确定要退出Forge吗? lblOneOrMoreGamesActive=一个或多个游戏正处于活动状态 -lblerrLoadingLayoutFile=无法读取您的布局文件:%s。按OK然后删除。\n游戏将以默认布局进行。 -lblLoadingQuest=加载时空竞逐中... +lblerrLoadingLayoutFile=无法读取你的布局文件:%s。按OK然后删除。\n游戏将以默认布局进行。 +lblLoadingQuest=加载冒险之旅... #FScreen.java lblHome=主页 lblWorkshop=作坊页面 @@ -30,13 +30,13 @@ lblDraftDeckEditor=轮抓套牌编辑器 lblSealedDeckEditor=现开套牌编辑器 lblTokenViewer=衍生物查看器 lblCloseViewer=关闭查看器 -lblQuestDeckEditor=竞逐套牌编辑器 -lblQuestTournamentDeckEditor=竞逐比赛套牌编辑器 -lblSpellShop=轮替商店 +lblQuestDeckEditor=冒险套牌编辑器 +lblQuestTournamentDeckEditor=冒险比赛套牌编辑器 +lblSpellShop=卡牌商店 lblLeaveShop=离开商店 lblLeaveDraft=离开轮抓 lblBazaar=珍宝集市 -lblConcedeGame=让出这场游戏 +lblConcedeGame=这场游戏认输 txerrFailedtodeletelayoutfile=删除布局文件失败。 #VSubmenuPreferences.java Preferences=偏好 @@ -62,7 +62,7 @@ cbEnableAICheats=允许人工智能作弊 cbManaBurn=法术力灼烧 cbManaLostPrompt=提示法术力池将要清空 cbDevMode=开发人员模式 -cbLoadCardsLazily=惰性加载牌张脚本 +cbLoadCardsLazily=惰性加载卡牌脚本 cbLoadHistoricFormats=加载史记赛制 cbWorkshopSyntax=作坊语法检查 cbEnforceDeckLegality=套牌一致性 @@ -74,7 +74,7 @@ cbCloneImgSource=复制使用原始的图片 cbScaleLarger=将图像缩放的更大 cbRenderBlackCardBorders=渲染黑卡边框 cbLargeCardViewers=使用大图查看器 -cbSmallDeckViewer=使用小套牌查看器 +cbSmallDeckViewer=使用小图查看器 cbDisplayFoil=显示闪卡 cbRandomFoil=随机闪卡 cbRandomArtInPools=在生成的卡池中随机加入闪卡 @@ -102,7 +102,7 @@ cbpGameLogEntryType=游戏日志详细程度 cbpCloseAction=关闭动作 cbpDefaultFontSize=默认字体大小 cbpAiProfiles=人工智能强度 -cbpDisplayCurrentCardColors=显示牌张颜色详情 +cbpDisplayCurrentCardColors=显示卡牌颜色详情 cbpAutoYieldMode=自动让过 cbpCounterDisplayType=计数器显示类型 cbpCounterDisplayLocation=计数器显示区域 @@ -141,13 +141,13 @@ nlSingletons=禁止在生成的套牌中非地牌重复出现 nlRemoveArtifacts=在生成的套牌中禁用神器牌 nlCardBased=构建具有更多协同效应的套牌(需要重启) DeckEditorOptions=套牌编辑器选项 -nlFilterLandsByColorId=当使用牌张颜色筛选器时,过滤地可以更容易找到产数相关法术力的地 +nlFilterLandsByColorId=当使用卡牌颜色筛选器时,过滤地可以更容易找到产数相关法术力的地 AdvancedSettings=高级设置 nlDevMode=启用在开发期间进行测试的功能菜单 -nlWorkshopSyntax=在作坊中启用牌张脚本检查。注意:该功能任在测试阶段。 +nlWorkshopSyntax=在作坊中启用卡牌脚本检查。注意:该功能任在测试阶段。 nlGameLogEntryType=更改游戏中日志显示的信息量。排序为最少到最详细。 -nlCloseAction=更改单击右上角X按钮时的行为 -nlLoadCardsLazily=如果打开该选项Forge将在使用到牌张脚本时才加载(警告:实验状态)。 +nlCloseAction=更改单击右上角X按钮时的动作 +nlLoadCardsLazily=如果打开该选项Forge将在使用到卡牌脚本时才加载(警告:实验状态)。 nlLoadHistoricFormats=如果打开,Forge将加载史记赛制,这个能会导致游戏载入时间变长。 GraphicOptions=图形选项 nlDefaultFontSize=UI中字体的默认大小。所有字体元素都相对于此缩放。(需要重启) @@ -155,21 +155,21 @@ cbpMulliganRule = 调度规则 nlImageFetcher=允许从在线资源中实时获取缺失的图片 nlDisplayFoil=显示闪卡 nlRandomFoil=随机将牌设置为闪卡 -nlScaleLarger=允许牌张图片缩放为初始大小 +nlScaleLarger=允许卡牌图片缩放为初始大小 nlRenderBlackCardBorders=为牌周围渲染黑色边框 nlLargeCardViewers=是所有牌看起来更大以便高分辨率图片看起来更舒适,不适合低分辨率设备使用 nlSmallDeckViewer=将套牌查看器设置为800X600而不是按屏幕大小等比缩放 nlRandomArtInPools=限制赛生成的卡池中带有闪卡。 nlUiForTouchScreen=增加一些UI元素以提高触屏体验(需要重启)。 nlCompactPrompt=隐藏标题并在“提示”窗格中使用较小的字体使其更紧凑。 -nlHideReminderText=在“牌张详情“窗格中隐藏提醒文本 +nlHideReminderText=在“卡牌详情“窗格中隐藏提醒文本 nlOpenPacksIndiv=打开肥包或者补充盒的时候一包一包开。 nlTokensInSeparateRow=生物与衍生物分不同的行显示。 nlStackCreatures=在战场上如同地、神器、结界一般堆叠一样的生物。 nlTimedTargOverlay=启用基于限制目标的覆盖优化以减少CPU使用率(仅在旧设备上需要使用,需要重启游戏)。 nlCounterDisplayType=选择指示物的样式。基于文本还是基于图片还是二者混合。 -nlCounterDisplayLocation=确定牌张上指示物的位置:靠近底部还是顶部 -nlDisplayCurrentCardColors=在牌张详情窗格中显示当前牌的颜色 +nlCounterDisplayLocation=确定卡牌上指示物的位置:靠近底部还是顶部 +nlDisplayCurrentCardColors=在卡牌详情窗格中显示当前牌的颜色 SoundOptions=声音选项 nlEnableSounds=在游戏中启用声音效果 nlEnableMusic=在游戏中启用背景音乐 @@ -188,18 +188,18 @@ btnListImageData=统计牌和图片数据 lblListImageData=统计Forge实现且缺少的图片的牌 btnImportPictures=导入数据 btnHowToPlay=如何玩 -btnDownloadPrices=下载牌张价格 +btnDownloadPrices=下载卡牌价格 btnLicensing=许可证详情 lblDownloadPics=下载缺省牌的图片 lblDownloadPicsHQ=下载缺省牌的高清图片 lblDownloadSetPics=下载每张牌的图片(每张牌出现一次) lblDownloadQuestImages=下载冒险之旅里使用的衍生物与图标 lblDownloadAchievementImages=下载成就图片,让你的奖杯更引人注目。 -lblDownloadPrices=下载牌张商店最新的价格表 +lblDownloadPrices=下载卡牌商店最新的价格表 lblYourVersionOfJavaIsTooOld=你的Java版本太旧无法开始下载内容 lblPleaseUpdateToTheLatestVersionOfJava=请更新到最新版本的JRE lblYoureRunning=你在运行 -lblYouNeedAtLeastJavaVersion=您的JRE版本至少需要为1.8.0_101。 +lblYouNeedAtLeastJavaVersion=你的JRE版本至少需要为1.8.0_101。 lblImportPictures=从本地目录导入数据 lblReportBug=什么东西坏了? lblHowToPlay=游戏规则。 @@ -230,7 +230,7 @@ lblGameSettings=游戏设置 #VLobby.java lblHeaderConstructedMode=游戏模式:构筑 lblGetNewRandomName=获取一个随机名称 -lbltypeofName=您想要生成什么类型的名称? +lbltypeofName=你想要生成什么类型的名称? lblconfirmName=你想使用名称%s,还是想重试 lblUseThisName=使用这个名称 lblTryAgain=再试一次 @@ -299,7 +299,7 @@ lblAlphaStrike=先攻 lblEndTurn=结束回合 lblTargetingArcs=瞄准弧 lblOff=关闭 -lblCardMouseOver=牌张悬停 +lblCardMouseOver=卡牌悬停 lblAlwaysOn=总是打开 lblAutoYields=自动让过 lblDeckList=套牌列表 @@ -357,7 +357,7 @@ lblDraftText3=然后对抗一个或多个人工智能对手 lblNewBoosterDraftGame=新的补充包轮抓 lblDraftDecks=轮抓套牌 #CSubmenuDraft.java -lblNoDeckSelected=没有为人类选择套牌。\n(您可能要建立一个新的套牌) +lblNoDeckSelected=没有为人类选择套牌。\n(你可能要建立一个新的套牌) lblNoDeck=没有套牌 lblChooseDraftFormat=选择轮抓模式 #VSubmenuSealed.java @@ -365,7 +365,7 @@ lblSealedDeck=现开 lblSealedDecks=现开套牌 lblHeaderSealed=游戏模式:现开 lblSealedText1=构建或选择一个套牌 -lblSealedText2=在现开模式中,您可以从补充包里(最多10个)构建一套牌 +lblSealedText2=在现开模式中,你可以从补充包里(最多10个)构建一套牌 lblSealedText3=从你得到的牌中组一套牌。人工智能也会这样做 lblSealedText4=然后对抗一个或多个人工智能对手 btnBuildNewSealedDeck=构建新的现开套牌 @@ -392,7 +392,7 @@ lblGauntlet=决斗 lblTournament=锦标赛 lblQuest=冒险 lblQuestDraft=冒险轮抓 -lblPlanarConquest=时空竞逐征服 +lblPlanarConquest=时空征服 lblPuzzle=谜题 lblPuzzleDesc=从给定的游戏状态解谜 lblDeckManager=套牌管理 @@ -425,7 +425,7 @@ lblNextChallengeNotYet=没有确定下次胜利后的挑战 btnUnlockSets=解锁系列 btnTravel=时空旅行 btnBazaar=珍宝集市 -btnSpellShop=牌张商店 +btnSpellShop=卡牌商店 cbSummonPlant=召唤植物 cbLaunchZeppelin=启动飞艇 #VSubmenuQuest.java @@ -448,7 +448,7 @@ lblCustomdeck=自定义套牌 lblDefineCustomFormat=定义自定义赛制 lblSelectFormat=选择赛制 lblStartWithAllCards=从所选系列的所有牌开始 -lblAllowDuplicateCards=允许重复的牌张 +lblAllowDuplicateCards=允许重复的卡牌 lblStartingPoolDistribution=初始牌池分配 lblChooseDistribution=选择分配 lblPrizedCards=奖励卡 @@ -505,9 +505,9 @@ lblColors=颜色 lblnoSettings=没有可用于此选择的设置 lblDistribution=分配 lblHoverforDescription=将鼠标悬停在每个选项上以获得更详细的说明 -lblradBalanced=“均衡”将在每种选定的颜色中提供数量均衡的牌张。 -lblradRandom=“随机”将随机分配牌张和颜色。 -lblradSurpriseMe=随机挑选颜色并提供数量均衡的随机牌张。 +lblradBalanced=“均衡”将在每种选定的颜色中提供数量均衡的卡牌。 +lblradRandom=“随机”将随机分配卡牌和颜色。 +lblradSurpriseMe=随机挑选颜色并提供数量均衡的随机卡牌。 lblradBoosters=忽略所有颜色设置,从指定数量的补充包中生成牌池 lblcbxArtifacts=选择后无论选择的颜色如何,神器都包涵在牌池中,这模拟了旧牌池的行为。 #VSubmenuChallenges.java @@ -620,7 +620,7 @@ lblBuildAndSelectaDeck=构建,然后在“冒险套牌”子菜单中选择一 lblCurrentDeck=你现在的套牌是%n PleaseCreateAQuestBefore=请在%n之前创建套牌。 lblNoQuest=没有探索 -lblVisitTheSpellShop=参观牌张商店 +lblVisitTheSpellShop=进入卡牌商店 lblVisitTheBazaar=参观珍宝集市 lblUnlockEditions=解锁新的时空 lblUnlocked=你已经成功解锁%n @@ -628,7 +628,7 @@ titleUnlocked=%n解锁! lblStartADuel=开始决斗! lblSelectAQuestDeck=请选择一个冒险套牌。 lblInvalidDeck=错误的套牌 -lblInvalidDeckDesc=您的套牌%n请编辑或者选择其他套牌 +lblInvalidDeckDesc=你的套牌%n请编辑或者选择其他套牌 #VSubmenuQuestPrefs.java lblQuestPreferences=冒险偏好 lblRewardsError=奖励错误 @@ -672,7 +672,7 @@ lblStartingCredits=初始积分 lblWinsforNewChallenge=新挑战所需的胜利 lblStartingSnowLands=初始雪境地 lblColorBias=颜色偏差(1-100%) -ttColorBias=初始卡池中您选择的颜色的百分比 +ttColorBias=初始卡池中的颜色百分比 lblPenaltyforLoss=失败补偿 lblMoreDuelChoices=更多决斗选择 lblCommon=铁 @@ -695,11 +695,11 @@ lblCardSalePercentageCap=出售牌的系数上限 lblCardSalePriceCap=出售牌的价格上限 lblWinstoUncapSalePrice=胜利解锁价格系数 lblPlaysetSize=玩家收藏大小 -ttPlaysetSize=在售卖牌张时要保留的牌张数量 +ttPlaysetSize=在售卖卡牌时要保留的卡牌数量 lblPlaysetSizeBasicLand=玩家收藏大小:基本地 -ttPlaysetSizeBasicLand=在售卖牌张时要保留的基本地数量 +ttPlaysetSizeBasicLand=在售卖卡牌时要保留的基本地数量 lblPlaysetSizeAnyNumber=玩家收藏大小:任意数量 -ttPlaysetSizeAnyNumber=售卖牌张时不保留牌张 +ttPlaysetSizeAnyNumber=售卖卡牌时不保留 lblItemLevelRestriction=物品等级限制 lblFoilfilterAlwaysOn=闪卡过滤器始终开启 lblRatingsfilterAlwaysOn=评级过滤器始终开启。 @@ -767,7 +767,7 @@ lblRemove4ofcard=移除4张牌 ttRemove4ofcard=最多可以将4张所选牌从当前套牌移除 lblAddBasicLands=添加基本地 ttAddBasicLands=添加基本地到套牌 -lblCardCatalog=牌张目录 +lblCardCatalog=卡牌目录 lblJumptoprevioustable=跳转到上一个表格 lblJumptopnexttable=跳转到下一个表格 lblJumptotextfilter=跳转到文本筛选器 @@ -904,8 +904,8 @@ lblAutomaticBugReports=自动报告BUG lblBattlefieldTextureFiltering=战场纹理过滤 lblCompactListItems=紧凑的项目列表 lblCompactTabs=紧凑标签 -lblCardOverlays=牌张叠加层 -lblDisableCardEffect=禁用牌张“效果”图 +lblCardOverlays=卡牌叠加层 +lblDisableCardEffect=禁用卡牌“效果”图 lblDynamicBackgroundPlanechase=动态时空背景 lblGameplayOptions=游戏选项 lblGeneralSettings=常规设置 @@ -915,14 +915,14 @@ lblLater=以后 lblMinimizeScreenLock=锁屏时最小化 lblOrderGraveyard=坟场顺序 lblRestartForge=重启Forge -lblRestartForgeDescription=您必须重启Forge才能使此更改生效 +lblRestartForgeDescription=你必须重启Forge才能使此更改生效 lblRotateZoomPlanesPhenomena=旋转缩放时空/异象图 lblRotateZoomSplit=旋转缩放连体牌 lblShowAbilityIconsOverlays=显示异能图标 -lblShowCardIDOverlays=显示牌张ID叠加层 -lblShowCardManaCostOverlays=显示牌张法术力费用叠加层 -lblShowCardNameOverlays=显示牌张名称叠加层 -lblShowCardOverlays=显示牌张叠加层 +lblShowCardIDOverlays=显示卡牌ID叠加层 +lblShowCardManaCostOverlays=显示卡牌法术力费用叠加层 +lblShowCardNameOverlays=显示卡牌名称叠加层 +lblShowCardOverlays=显示卡牌叠加层 lblShowCardPTOverlays=显示攻击/防御叠加层 lblShowMatchBackground=显示比赛背景 lblVibrateAfterLongPress=长按后震动 @@ -930,26 +930,32 @@ lblVibrateWhenLosingLife=失去生命时震动 lblVibrationOptions=振动选项 nlAutomaticBugReports=在没有提示的情况下自动向开发人员报告错误 nlBattlefieldTextureFiltering=在战场上过滤闪卡特效,使其在大屏幕上不像素化(需要重启,可能会降低性能)。 -nlCompactListItems=默认情况下,在所有视图列表中只显示牌张和套牌的单行文本。 +nlCompactListItems=默认情况下,在所有视图列表中只显示卡牌和套牌的单行文本。 nlCompactTabs=在标签页屏幕顶部显示较小的标签(例如此屏幕)。 nlDisableCardEffect=禁用“效果”卡的缩放图片。 nlDynamicBackgroundPlanechase=使用当前时空图片作为背景(时空图片必须位于cache/pics/planechase文件夹中)。 nlHotSeatMode=当用两个人类玩家开始游戏的时候,用单个提示控制两个玩家。 nlLandscapeMode=使用横向(水平)而不是纵向(垂直)。 nlMinimizeScreenLock=锁定屏幕时最小化Forge(锁屏以后出现图形故障使用)。 -nlOrderGraveyard=确定何时让玩家确定同时进入坟场的牌的顺序(绝不/总是/只对有关牌张)。 +nlOrderGraveyard=确定何时让玩家确定同时进入坟场的牌的顺序(绝不/总是/只对有关卡牌)。 nlRotateZoomPlanesPhenomena=旋转缩放时空或异象图片。 nlRotateZoomSplit=旋转缩放连体牌图片。 -nlShowAbilityIconsOverlays=在牌张上显示异能图标,否则他们被隐藏。 -nlShowCardIDOverlays=显示牌张的ID叠加层,否则他们被隐藏。 -nlShowCardManaCostOverlays=显示牌张的法术力费用叠加层,否则他们被隐藏。 -nlShowCardNameOverlays=显示牌张的名称费用叠加层,否则他们被隐藏。 -nlShowCardOverlays=显示牌张名称,法术力费用,力量/防御和ID叠加层,否则他们被隐藏。 +nlShowAbilityIconsOverlays=在卡牌上显示异能图标,否则他们被隐藏。 +nlShowCardIDOverlays=显示卡牌的ID叠加层,否则他们被隐藏。 +nlShowCardManaCostOverlays=显示卡牌的法术力费用叠加层,否则他们被隐藏。 +nlShowCardNameOverlays=显示卡牌的名称费用叠加层,否则他们被隐藏。 +nlShowCardOverlays=显示卡牌名称,法术力费用,力量/防御和ID叠加层,否则他们被隐藏。 nlShowCardPTOverlays=显示力量/防御/忠诚叠加层,否则他们被隐藏。 nlShowMatchBackground=在战场显示背景图片,否则显示背景纹理。 nlTheme=设置显示的组件使用的外观主题。 -nlVibrateAfterLongPress=启用长按触发震动,例如长按缩放牌张图片。 +nlVibrateAfterLongPress=启用长按触发震动,例如长按缩放卡牌图片。 nlVibrateWhenLosingLife=启用当玩家在游戏中失去生命或收到伤害时震动。 +lblEnableRoundBorder=启用圆角边框掩码 +nlEnableRoundBorder=启用后,卡牌边框会变成圆角(带有完整边框的卡牌图片效果最好)。 +lblPreloadExtendedArtCards=预加载拉伸卡图 +nlPreloadExtendedArtCards=启用后,拉伸卡图将在启动时加载到缓存。 +lblShowFPSDisplay=显示当前的FPS值 +nlShowFPSDisplay=启用后,将在画面左上角显示当前Forge的FPS(实验性特性)。 #MatchScreen.java lblPlayers=玩家列表 lblLog=日志 @@ -973,7 +979,7 @@ lblChangePreferredArt=改变首选卡图 lblSelectPreferredArt=选择首选的卡图版本 lblTo=到 lblAvatar=头像 -lblCards=牌张 +lblCards=卡牌 lblPlanes=时空 lblSchemes=阴谋 lblToMainDeck=到主牌 @@ -984,7 +990,7 @@ lblCommanders=指挥官 lblOathbreakers=破誓者 #Forge.java lblLoadingFonts=加载字体中 -lblLoadingCardTranslations=加载牌张翻译中 +lblLoadingCardTranslations=加载卡牌翻译中 lblFinishingStartup=完成启动 #LobbyScreen.java lblMore=更多 @@ -1038,11 +1044,11 @@ lblNoPlayerPriorityNoDeckListViewed=现在玩家没有优先权,因此无法 #FilesPage.java lblFiles=文件 lblStorageLocations=储存位置 -lblCardPicsLocation=牌张图片位置 +lblCardPicsLocation=卡牌图片位置 lblDecksLocation=套牌位置 lblDataLocation=数据位置(例如 设置和探索模式) lblImageCacheLocation=图片缓存位置 -lblRestartForgeMoveFilesNewLocation=您必须重启Forge才能使此更改生效。执行此操作之前,请确保将所有必要的文件移动到新的位置。 +lblRestartForgeMoveFilesNewLocation=你必须重启Forge才能使此更改生效。执行此操作之前,请确保将所有必要的文件移动到新的位置。 lblRestartRequired=需要重启 lblSelect=选择%s #AddBasicLandsDialog.java @@ -1050,17 +1056,17 @@ lblLandSet=地牌的系列 lblAddBasicLandsAutoSuggest=添加基本地到%s\n(双击自动添加) lblAssortedArt=各种画 lblCardArt=卡图%d -lblNonLandCount=%d张非地 -lblOldLandCount=%d张地 -lblNewLandCount=添加%d张地 +lblNonLandCount=%d张非地牌 +lblOldLandCount=%d张地牌 +lblNewLandCount=添加%d张地牌 lblNewTotalCount=%d张牌 #FDeckImportDialog.java -lblImportLatestVersionCard=导入牌张的最新版本 +lblImportLatestVersionCard=导入卡牌的最新版本 lblUseOnlySetsReleasedBefore=只用之前上市系列的版本: lblUseOnlyCoreAndExpansionSets=只使用核心系列和拓展系列 -lblFollowingCardsCannotBeImported=由于拼写错误,系列限制或forge尚未实现,以下牌张没有被导入: +lblFollowingCardsCannotBeImported=由于拼写错误,系列限制或forge尚未实现,以下卡牌没有被导入: lblImportRemainingCards=导入剩余的卡? -lblNoKnownCardsOnClipboard=在剪切板找不到已知的牌张。\n\n将套牌列表复制到剪切板,然后重新打开此对话框。 +lblNoKnownCardsOnClipboard=在剪切板找不到已知的卡牌。\n\n将套牌列表复制到剪切板,然后重新打开此对话框。 #FDeckViewer.java lblDeckListCopiedClipboard=套牌列表'%s'已经复制到剪切板 #FSideboardDialog.java @@ -1092,11 +1098,11 @@ lblWouldYouLiketoPlayorDraw=你想先手还是后手? lblWhoWouldYouLiketoStartthisGame=你想谁先开始游戏?(单击头像) lblPlay=先手 lblDraw=后手 -lblTooFewCardsMainDeck=主牌中牌张数过少(最少为%s),请重新修改套牌。 -lblTooManyCardsSideboard=备牌中牌张数过多(最多为%s),请重新修改套牌。 +lblTooFewCardsMainDeck=主牌中卡牌数过少(最少为%s),请重新修改套牌。 +lblTooManyCardsSideboard=备牌中卡牌数过多(最多为%s),请重新修改套牌。 lblAssignCombatDamageWerentBlocked=是否要像没有被阻挡一样分配战斗伤害? lblChosenCards=选择牌 -lblAttacker=攻击者 +lblAttacker=进攻者 lblTriggeredby=触发者 lblChooseWhichCardstoReveal=选择要展示的牌 lblChooseCardsActivateOpeningHandandOrder=选择要展示的手牌和顺序 @@ -1110,16 +1116,16 @@ lblPleaseDefineanActionSequenceFirst=请先定义一个动作序列。 lblRememberActionSequence=记住动作序列 lblYouMustHavePrioritytoUseThisFeature=你必须有使用此功能的优先权。 lblNameTheCard=命名牌 -lblWhichPlayerShouldRoll=那个玩家掷骰子? +lblWhichPlayerShouldRoll=哪位玩家掷骰子? lblChooseResult=选择结果 lblChosenCardNotPermanentorCantExistIndependentlyontheBattleground=选择的牌不是永久物,也不能在战场单独存在。\n如果你想释放费永久物咒语或者你想释放永久物咒语并将之放于堆叠上,请按"Cast Spell/Play Land"按钮。 lblError=错误 lblWinGame=赢得这局游戏 lblSetLifetoWhat=设定生命值为多少? -lblSetLifeforWhichPlayer=设定哪个牌手的生命值? +lblSetLifeforWhichPlayer=设定哪位牌手的生命值? lblChoosePermanentstoTap=选择要横置的永久物 lblChoosePermanentstoUntap=选择要重置的永久物 -lblWhichTypeofCounter=那种指示物? +lblWhichTypeofCounter=哪种指示物? lblHowManyCounters=多少指示物? lblRemoveCountersFromWhichCard=从哪张牌移除指示物? lblAddCountersToWhichCard=添加指示物到哪张牌? @@ -1127,23 +1133,23 @@ lblChooseaCard=选择一张牌 lblNoPlayerPriorityDeckCantBeTutoredFrom=目前没有玩家拥有优先权,因此无法从其套牌导师。 lblNoPlayerPriorityGameStateCannotBeSetup=目前没有玩家拥有优先权,因此无法设置游戏状态。 lblErrorLoadingBattleSetupFile=加载战场设置文件出错! -lblSelectCardstoAddtoYourDeck=选择要添加到套牌的牌张。 +lblSelectCardstoAddtoYourDeck=选择要添加到套牌的卡牌。 lblAddTheseToMyDeck=添加这些到我的套牌 lblChooseaPile=选择一堆 lblSelectOrderForSimultaneousAbilities=选择同时触发的异能的结算顺序 lblReorderSimultaneousAbilities=重新对同时触发异能的结算顺序进行排序 lblResolveFirst=先结算 -lblMoveCardstoToporBbottomofLibrary=将牌张移动到牌库顶或底 -lblSelectCardsToBeOutOnTheBottomOfYourLibrary=选择要放到牌库底的牌张 -lblCardsToPutOnTheBottom=放到底部的牌张 -lblArrangeCardsToBePutOnTopOfYourLibrary=为放于牌库顶的牌张排序 +lblMoveCardstoToporBbottomofLibrary=将卡牌移动到牌库顶或底 +lblSelectCardsToBeOutOnTheBottomOfYourLibrary=选择要放到牌库底的卡牌 +lblCardsToPutOnTheBottom=放到底部的卡牌 +lblArrangeCardsToBePutOnTopOfYourLibrary=为放于牌库顶的卡牌排序 lblTopOfLibrary=牌库顶 -lblSelectCardsToBePutIntoTheGraveyard=选择要放于坟场的牌张 -lblCardsToPutInTheGraveyard=放于坟场的牌张 +lblSelectCardsToBePutIntoTheGraveyard=选择要放于坟场的卡牌 +lblCardsToPutInTheGraveyard=放于坟场的卡牌 #AbstractGuiGame.java -lblConcedeCurrentGame=这将让出这局游戏,而你将输掉。\n\n一定要让出吗? -lblConcedeTitle=让出这局游戏? -lblConcede=让出 +lblConcedeCurrentGame=这局游戏认输。\n\n确认吗? +lblConcedeTitle=这局游戏认输? +lblConcede=认输 lblCloseGameSpectator=这将关闭游戏,你将无法继续观看它。\n\n一定要关闭吗? lblCloseGame=关闭游戏? lblWaitingForOpponent=等待对手中 @@ -1153,16 +1159,16 @@ lblEnterNumberBetweenMinAndMax=输入介于%min到%max之间的数字: lblEnterNumberGreaterThanOrEqualsToMin=输入一个大于等于%min的数字: lblEnterNumberLessThanOrEqualsToMax=输入一个小于等于%max的数字: #PlayerOutcome.java -lblWonBecauseAllOpponentsHaveLost=由于所有对手都输了所以你赢了 -lblWonDueToEffectOf=受'%s'的影响而获胜了 -lblConceded=已经让出 +lblWonBecauseAllOpponentsHaveLost=因所有对手都输了而赢得胜利 +lblWonDueToEffectOf=受'%s'的影响赢得胜利 +lblConceded=已经认输 lblLostTryingToDrawCardsFromEmptyLibrary=尝试从为空的牌库中抓牌而输 lblLostBecauseLifeTotalReachedZero=生命值为0而输 lblLostBecauseOfObtainingTenPoisonCounters=中毒指示物达到10而输 lblLostBecauseAnOpponentHasWonBySpell=因对手用咒语'%s'获胜而输 lblLostDueToEffectOfSpell=受咒语'%s'的影响而输 lblLostDueToAccumulationOf21DamageFromGenerals=受到大于21点主将伤害而输 -lblAcceptedThatTheGameIsADraw=已经接受此局游戏平局 +lblAcceptedThatTheGameIsADraw=此局游戏平局 lblLostForUnknownReasonBug=由于未知错误而输(这是一个错误) #ViewWinLose.java btnNextGame=下一局游戏 From 37bae14dfdd22b320f9ed4b1cf4f9ee96b54f30a Mon Sep 17 00:00:00 2001 From: CCTV-1 Date: Sat, 19 Oct 2019 10:26:43 +0800 Subject: [PATCH 6/9] update Simplified Chinese characters list --- forge-gui-mobile/src/forge/assets/FSkinFont.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/forge-gui-mobile/src/forge/assets/FSkinFont.java b/forge-gui-mobile/src/forge/assets/FSkinFont.java index c6436bfd3d4..3139809db11 100644 --- a/forge-gui-mobile/src/forge/assets/FSkinFont.java +++ b/forge-gui-mobile/src/forge/assets/FSkinFont.java @@ -463,7 +463,7 @@ public class FSkinFont { + "驽驾驿骁骂骄骆骇验骏骐骑骗骚骤骨骰骷骸骼髅髓高鬃鬓鬣鬼魁魂魄" + "魅魇魈魏魔鰴鱼鲁鲜鲤鲨鲮鲸鲽鳃鳄鳍鳐鳗鳝鳞鸟鸠鸡鸢鸣鸦鸽鹅鹉" + "鹊鹏鹗鹞鹤鹦鹫鹭鹰鹿麋麒麟麦麻黄黎黏黑默黛黜點黠黯鼎鼓鼠鼬鼹" - + "鼻齐齑齿龇龙龟!(),/:;?~"; + + "鼻齐齑齿龇龙龟伸!(),/:;?~"; final PixmapPacker packer = new PixmapPacker(pageSize, pageSize, Pixmap.Format.RGBA8888, 2, false); final FreeTypeFontParameter parameter = new FreeTypeFontParameter(); From 299de54ba51c5c8db3999416ec003e072231d5e4 Mon Sep 17 00:00:00 2001 From: Hans Mackowiak Date: Tue, 22 Oct 2019 00:40:49 +0000 Subject: [PATCH 7/9] BanList 2019-10-21 --- forge-gui/res/formats/Casual/pauper.txt | 2 +- forge-gui/res/formats/Sanctioned/Standard.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/forge-gui/res/formats/Casual/pauper.txt b/forge-gui/res/formats/Casual/pauper.txt index 9a7d7f51d72..91762248c40 100644 --- a/forge-gui/res/formats/Casual/pauper.txt +++ b/forge-gui/res/formats/Casual/pauper.txt @@ -4,4 +4,4 @@ Order:108 Subtype:Custom Type:Casual Rarities:L, C -Banned:Gush;Gitaxian Probe;Daze +Banned:Gush;Gitaxian Probe;Daze;Arcum's Astrolabe diff --git a/forge-gui/res/formats/Sanctioned/Standard.txt b/forge-gui/res/formats/Sanctioned/Standard.txt index 9a0f5f86109..9cb794c8243 100644 --- a/forge-gui/res/formats/Sanctioned/Standard.txt +++ b/forge-gui/res/formats/Sanctioned/Standard.txt @@ -4,4 +4,4 @@ Order:101 Subtype:Standard Type:Sanctioned Sets:GRN, RNA, WAR, M20, ELD -Banned: +Banned:Field of the Dead From f1a76e1e76066a486ed7f7dfc4501cdbfa100a37 Mon Sep 17 00:00:00 2001 From: Hans Mackowiak Date: Tue, 22 Oct 2019 00:41:25 +0000 Subject: [PATCH 8/9] Questing Beast: fix Damage Trigger --- forge-gui/res/cardsfolder/q/questing_beast.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/forge-gui/res/cardsfolder/q/questing_beast.txt b/forge-gui/res/cardsfolder/q/questing_beast.txt index 5887abf709c..8bc09495eb9 100644 --- a/forge-gui/res/cardsfolder/q/questing_beast.txt +++ b/forge-gui/res/cardsfolder/q/questing_beast.txt @@ -7,7 +7,7 @@ K:Deathtouch K:Haste K:CantBeBlockedBy Creature.powerLE2 S:Mode$ CantPreventDamage | IsCombat$ True | ValidSource$ Creature.YouCtrl | Description$ Combat damage that would be dealt by creatures you control can’t be prevented. -T:Mode$ DamageDone | ValidSource$ Creature.YouCtrl | ValidTarget$ Opponent | CombatDamage$ True | TriggerZones$ Battlefield | Execute$ MoreDamage | TriggerDescription$ Whenever CARDNAME deals combat damage to an opponent, it deals that much damage to target planeswalker that player controls. +T:Mode$ DamageDone | ValidSource$ Card.Self | ValidTarget$ Opponent | CombatDamage$ True | TriggerZones$ Battlefield | Execute$ MoreDamage | TriggerDescription$ Whenever CARDNAME deals combat damage to an opponent, it deals that much damage to target planeswalker that player controls. SVar:MoreDamage:DB$ DealDamage | ValidTgts$ Planeswalker.ControlledBy TriggeredTarget | TgtPrompt$ Select target planeswalker that player controls | NumDmg$ X | References$ X SVar:X:TriggerCount$DamageAmount Oracle:Vigilance, deathtouch, haste\nQuesting Beast can’t be blocked by creatures with power 2 or less.\nCombat damage that would be dealt by creatures you control can’t be prevented.\nWhenever Questing Beast deals combat damage to an opponent, it deals that much damage to target planeswalker that player controls. \ No newline at end of file From 8567b69073bc85e37789557f7002bb9097dde6a6 Mon Sep 17 00:00:00 2001 From: CCTV-1 Date: Tue, 22 Oct 2019 13:01:37 +0800 Subject: [PATCH 9/9] update 'Draft, Gauntlet and Puzzle Screens' Simplified Chinese translation --- forge-gui/res/languages/zh-CN.properties | 40 ++++++++++++------------ 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/forge-gui/res/languages/zh-CN.properties b/forge-gui/res/languages/zh-CN.properties index b0933d39a2d..19fa169b2c9 100644 --- a/forge-gui/res/languages/zh-CN.properties +++ b/forge-gui/res/languages/zh-CN.properties @@ -1179,26 +1179,26 @@ lblTeamWon=队伍%s胜利了! lblWinnerWon=%s胜利了! lblGameLog=游戏日志 #NewDraftScreen.java -lblLoadingNewDraft=Loading new draft... +lblLoadingNewDraft=加载新的轮抽中 #LoadDraftScreen.java -lblDoubleTapToEditDeck=Double-tap to edit deck (Long-press to view) -lblMode=Mode: -lblYouMustSelectExistingDeck=You must select an existing deck or build a deck from a new booster draft game. -lblWhichOpponentWouldYouLikeToFace=Which opponent would you like to face? -lblSingleMatch=Single Match +lblDoubleTapToEditDeck=双击以编辑套牌(长按可以查看) +lblMode=模式: +lblYouMustSelectExistingDeck=你必须选择一个已有的卡组或者从新的补充包轮抽游戏中构筑一个卡组。 +lblWhichOpponentWouldYouLikeToFace=你想面对哪个对手? +lblSingleMatch=单场比赛 #NewGauntletScreen.java -lblGauntletText1=In Gauntlet mode, you select a deck and play against multiple opponents. -lblGauntletText2=Configure how many opponents you wish to face and what decks or types of decks they will play. -lblGauntletText3=Then, try to beat all AI opponents without losing a match. -lblSelectGauntletType=Select a Gauntlet Type -lblCustomGauntlet=Custom Gauntlet -lblGauntletContest=Gauntlet Contest -lblSelectYourDeck=Select Your Deck -lblSelectDeckForOpponent=Select Deck for Opponent -lblSelectGauntletContest=Select Gauntlet Contest +lblGauntletText1=在决斗模式下,你可以选择一套牌与多个对手进行对战。 +lblGauntletText2=设置你想面对的对手数量以及他们所使用的套牌类型或者套牌。 +lblGauntletText3=然后,尝试击败所有人工智能对手而不输掉一场比赛。 +lblSelectGauntletType=选择一个决斗类型 +lblCustomGauntlet=自定义决斗 +lblGauntletContest=决斗竞赛 +lblSelectYourDeck=选择你的套牌 +lblSelectDeckForOpponent=选择对手的套牌 +lblSelectGauntletContest=选择决斗竞赛 #PuzzleScreen.java -lblPuzzleText1=Puzzle Mode loads in a puzzle that you have to win in a predetermined time/way. -lblPuzzleText2=To begin, press the Start button below, then select a puzzle from a list. -lblPuzzleText3=Your objective will be displayed in a pop-up window when the puzzle starts and also specified on a special effect card which will be placed in your command zone. -lblChooseAPuzzle=Choose a puzzle -lblLoadingThePuzzle=Loading the puzzle... \ No newline at end of file +lblPuzzleText1=解谜模式会加载一个谜题,你必须在预定的时间/方式中获胜。 +lblPuzzleText2=首先,按下面的开始按钮,然后从列表中选择一个谜题。 +lblPuzzleText3=当解谜开始的时候,该谜题的要求将会显示在弹窗中,并且还会在指挥官区域放置一张特殊效应卡指示这个谜题的要求。 +lblChooseAPuzzle=选择一个谜题 +lblLoadingThePuzzle=加载新的谜题中 \ No newline at end of file