mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-15 18:28:00 +00:00
Translated strings related to Win/Loose/Concede
This commit is contained in:
@@ -234,6 +234,6 @@ public final class GameOutcome implements Iterable<Entry<RegisteredPlayer, Playe
|
|||||||
}
|
}
|
||||||
|
|
||||||
public String getOutcomeString(RegisteredPlayer player) {
|
public String getOutcomeString(RegisteredPlayer player) {
|
||||||
return playerNames.get(player) + " has " + playerRating.get(player).getOutcome();
|
return playerNames.get(player) + " " + playerRating.get(player).getOutcome();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
package forge.game.player;
|
package forge.game.player;
|
||||||
|
|
||||||
|
|
||||||
|
import forge.util.Localizer;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* TODO: Write javadoc for this type.
|
* TODO: Write javadoc for this type.
|
||||||
*/
|
*/
|
||||||
@@ -58,23 +60,24 @@ public class PlayerOutcome {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
|
Localizer localizer = Localizer.getInstance();
|
||||||
if ( lossState == null ) {
|
if ( lossState == null ) {
|
||||||
if ( altWinSourceName == null )
|
if ( altWinSourceName == null )
|
||||||
return "won because all opponents have lost";
|
return localizer.getMessage("lblWonBecauseAllOpponentsHaveLost");
|
||||||
else
|
else
|
||||||
return "won due to effect of '" + altWinSourceName + "'";
|
return localizer.getMessage("lblWonDueToEffectOf").replace("%s", altWinSourceName);
|
||||||
}
|
}
|
||||||
switch(lossState){
|
switch(lossState){
|
||||||
case Conceded: return "conceded";
|
case Conceded: return localizer.getMessage("lblConceded");
|
||||||
case Milled: return "lost trying to draw cards from empty library";
|
case Milled: return localizer.getMessage("lblLostTryingToDrawCardsFromEmptyLibrary");
|
||||||
case LifeReachedZero: return "lost because life total reached 0";
|
case LifeReachedZero: return localizer.getMessage("lblLostBecauseLifeTotalReachedZero");
|
||||||
case Poisoned: return "lost because of obtaining 10 poison counters";
|
case Poisoned: return localizer.getMessage("lblLostBecauseOfObtainingTenPoisonCounters");
|
||||||
case OpponentWon: return "lost because an opponent has won by spell '" + loseConditionSpell + "'";
|
case OpponentWon: return localizer.getMessage("lblLostBecauseAnOpponentHasWonBySpell").replace("%s", loseConditionSpell);
|
||||||
case SpellEffect: return "lost due to effect of spell '" + loseConditionSpell + "'";
|
case SpellEffect: return localizer.getMessage("lblLostDueToEffectOfSpell").replace("%s", loseConditionSpell);
|
||||||
case CommanderDamage: return "lost due to accumulation of 21 damage from generals";
|
case CommanderDamage: return localizer.getMessage("lblLostDueToAccumulationOf21DamageFromGenerals");
|
||||||
case IntentionalDraw: return "accepted that the game is a draw";
|
case IntentionalDraw: return localizer.getMessage("lblAcceptedThatTheGameIsADraw");
|
||||||
}
|
}
|
||||||
return "lost for unknown reason (this is a bug)";
|
return localizer.getMessage("lblLostForUnknownReasonBug");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ import javax.swing.JPanel;
|
|||||||
import javax.swing.SwingConstants;
|
import javax.swing.SwingConstants;
|
||||||
import javax.swing.SwingUtilities;
|
import javax.swing.SwingUtilities;
|
||||||
|
|
||||||
|
import forge.util.Localizer;
|
||||||
import forge.util.TextUtil;
|
import forge.util.TextUtil;
|
||||||
import net.miginfocom.swing.MigLayout;
|
import net.miginfocom.swing.MigLayout;
|
||||||
|
|
||||||
@@ -116,11 +117,12 @@ public class ViewWinLose implements IWinLoseView<FButton> {
|
|||||||
lblStats.setHorizontalAlignment(SwingConstants.CENTER);
|
lblStats.setHorizontalAlignment(SwingConstants.CENTER);
|
||||||
lblStats.setFont(FSkin.getRelativeFont(26));
|
lblStats.setFont(FSkin.getRelativeFont(26));
|
||||||
|
|
||||||
btnContinue.setText("Next Game");
|
final Localizer localizer = Localizer.getInstance();
|
||||||
|
btnContinue.setText(localizer.getMessage("btnNextGame"));
|
||||||
btnContinue.setFont(FSkin.getRelativeFont(22));
|
btnContinue.setFont(FSkin.getRelativeFont(22));
|
||||||
btnRestart.setText("Start New Match");
|
btnRestart.setText(localizer.getMessage("btnStartNewMatch"));
|
||||||
btnRestart.setFont(FSkin.getRelativeFont(22));
|
btnRestart.setFont(FSkin.getRelativeFont(22));
|
||||||
btnQuit.setText("Quit Match");
|
btnQuit.setText(localizer.getMessage("btnQuitMatch"));
|
||||||
btnQuit.setFont(FSkin.getRelativeFont(22));
|
btnQuit.setFont(FSkin.getRelativeFont(22));
|
||||||
btnContinue.setEnabled(!game0.isMatchOver());
|
btnContinue.setEnabled(!game0.isMatchOver());
|
||||||
|
|
||||||
@@ -130,7 +132,7 @@ public class ViewWinLose implements IWinLoseView<FButton> {
|
|||||||
txtLog.setFont(FSkin.getRelativeFont(14));
|
txtLog.setFont(FSkin.getRelativeFont(14));
|
||||||
txtLog.setFocusable(true); // allow highlighting and copying of log
|
txtLog.setFocusable(true); // allow highlighting and copying of log
|
||||||
|
|
||||||
final FLabel btnCopyLog = new FLabel.ButtonBuilder().text("Copy to clipboard").build();
|
final FLabel btnCopyLog = new FLabel.ButtonBuilder().text(localizer.getMessage("btnCopyToClipboard")).build();
|
||||||
btnCopyLog.setCommand(new UiCommand() {
|
btnCopyLog.setCommand(new UiCommand() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
@@ -178,7 +180,7 @@ public class ViewWinLose implements IWinLoseView<FButton> {
|
|||||||
pnlLog.setOpaque(false);
|
pnlLog.setOpaque(false);
|
||||||
|
|
||||||
pnlLog.add(
|
pnlLog.add(
|
||||||
new FLabel.Builder().text("Game Log").fontAlign(SwingConstants.CENTER).fontSize(18)
|
new FLabel.Builder().text(localizer.getMessage("lblGameLog")).fontAlign(SwingConstants.CENTER).fontSize(18)
|
||||||
.fontStyle(Font.BOLD).build(), "w 300px!, h 28px!, gaptop 20px");
|
.fontStyle(Font.BOLD).build(), "w 300px!, h 28px!, gaptop 20px");
|
||||||
|
|
||||||
pnlLog.add(scrLog, "w 300px!, h 100px!, gap 0 0 10 10");
|
pnlLog.add(scrLog, "w 300px!, h 100px!, gap 0 0 10 10");
|
||||||
@@ -214,12 +216,13 @@ public class ViewWinLose implements IWinLoseView<FButton> {
|
|||||||
private static String composeTitle(final GameView game) {
|
private static String composeTitle(final GameView game) {
|
||||||
final String winner = game.getWinningPlayerName();
|
final String winner = game.getWinningPlayerName();
|
||||||
final int winningTeam = game.getWinningTeam();
|
final int winningTeam = game.getWinningTeam();
|
||||||
|
final Localizer localizer = Localizer.getInstance();
|
||||||
if (winner == null || winner.isEmpty()) {
|
if (winner == null || winner.isEmpty()) {
|
||||||
return "It's a draw!";
|
return localizer.getMessage("lblItsADraw");
|
||||||
} else if (winningTeam != -1) {
|
} else if (winningTeam != -1) {
|
||||||
return TextUtil.concatNoSpace("Team ", String.valueOf(winningTeam), " won!");
|
return localizer.getMessage("lblTeamWon").replace("%s", String.valueOf(winningTeam));
|
||||||
} else {
|
} else {
|
||||||
return TextUtil.concatNoSpace(winner, " won!");
|
return localizer.getMessage("lblWinnerWon").replace("%s", winner);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ import forge.toolbox.FEvent.FEventHandler;
|
|||||||
import forge.toolbox.FLabel;
|
import forge.toolbox.FLabel;
|
||||||
import forge.toolbox.FOverlay;
|
import forge.toolbox.FOverlay;
|
||||||
import forge.toolbox.FTextArea;
|
import forge.toolbox.FTextArea;
|
||||||
|
import forge.util.Localizer;
|
||||||
import forge.util.TextUtil;
|
import forge.util.TextUtil;
|
||||||
import forge.util.Utils;
|
import forge.util.Utils;
|
||||||
import forge.util.gui.SGuiChoose;
|
import forge.util.gui.SGuiChoose;
|
||||||
@@ -86,15 +87,16 @@ public class ViewWinLose extends FOverlay implements IWinLoseView<FButton> {
|
|||||||
control = new ControlWinLose(this, game0);
|
control = new ControlWinLose(this, game0);
|
||||||
}
|
}
|
||||||
|
|
||||||
btnContinue.setText("Next Game");
|
final Localizer localizer = Localizer.getInstance();
|
||||||
|
btnContinue.setText(localizer.getMessage("btnNextGame"));
|
||||||
btnContinue.setFont(FSkinFont.get(22));
|
btnContinue.setFont(FSkinFont.get(22));
|
||||||
btnRestart.setText("Start New Match");
|
btnRestart.setText(localizer.getMessage("btnStartNewMatch"));
|
||||||
btnRestart.setFont(btnContinue.getFont());
|
btnRestart.setFont(btnContinue.getFont());
|
||||||
btnQuit.setText("Quit Match");
|
btnQuit.setText(localizer.getMessage("btnQuitMatch"));
|
||||||
btnQuit.setFont(btnContinue.getFont());
|
btnQuit.setFont(btnContinue.getFont());
|
||||||
btnContinue.setEnabled(!game0.isMatchOver());
|
btnContinue.setEnabled(!game0.isMatchOver());
|
||||||
|
|
||||||
lblLog = add(new FLabel.Builder().text("Game Log").align(Align.center).font(FSkinFont.get(18)).build());
|
lblLog = add(new FLabel.Builder().text(localizer.getMessage("lblGameLog")).align(Align.center).font(FSkinFont.get(18)).build());
|
||||||
txtLog = add(new FTextArea(true, StringUtils.join(game.getGameLog().getLogEntries(null), "\r\n").replace("[COMPUTER]", "[AI]")) {
|
txtLog = add(new FTextArea(true, StringUtils.join(game.getGameLog().getLogEntries(null), "\r\n").replace("[COMPUTER]", "[AI]")) {
|
||||||
@Override
|
@Override
|
||||||
public boolean tap(float x, float y, int count) {
|
public boolean tap(float x, float y, int count) {
|
||||||
@@ -106,7 +108,7 @@ public class ViewWinLose extends FOverlay implements IWinLoseView<FButton> {
|
|||||||
});
|
});
|
||||||
txtLog.setFont(FSkinFont.get(12));
|
txtLog.setFont(FSkinFont.get(12));
|
||||||
|
|
||||||
btnCopyLog = add(new FLabel.ButtonBuilder().text("Copy to clipboard").command(new FEventHandler() {
|
btnCopyLog = add(new FLabel.ButtonBuilder().text(localizer.getMessage("btnCopyToClipboard")).command(new FEventHandler() {
|
||||||
@Override
|
@Override
|
||||||
public void handleEvent(FEvent e) {
|
public void handleEvent(FEvent e) {
|
||||||
Forge.getClipboard().setContents(txtLog.getText());
|
Forge.getClipboard().setContents(txtLog.getText());
|
||||||
@@ -123,12 +125,13 @@ public class ViewWinLose extends FOverlay implements IWinLoseView<FButton> {
|
|||||||
private String composeTitle(final GameView game) {
|
private String composeTitle(final GameView game) {
|
||||||
final String winner = game.getWinningPlayerName();
|
final String winner = game.getWinningPlayerName();
|
||||||
final int winningTeam = game.getWinningTeam();
|
final int winningTeam = game.getWinningTeam();
|
||||||
|
final Localizer localizer = Localizer.getInstance();
|
||||||
if (winner == null) {
|
if (winner == null) {
|
||||||
return "It's a draw!";
|
return localizer.getMessage("lblItsADraw");
|
||||||
} else if (winningTeam != -1) {
|
} else if (winningTeam != -1) {
|
||||||
return TextUtil.concatNoSpace("Team ", String.valueOf(winningTeam), " won!");
|
return localizer.getMessage("lblTeamWon").replace("%s", String.valueOf(winningTeam));
|
||||||
} else {
|
} else {
|
||||||
return TextUtil.concatNoSpace(winner, " won!");
|
return localizer.getMessage("lblWinnerWon").replace("%s", winner);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1140,3 +1140,35 @@ lblArrangeCardsToBePutOnTopOfYourLibrary=Ordne Karten, welche unter die Biblioth
|
|||||||
lblTopOfLibrary=Oben auf Bibliothek
|
lblTopOfLibrary=Oben auf Bibliothek
|
||||||
lblSelectCardsToBePutIntoTheGraveyard=Wähle Karten, welche auf den Friedhof gelegt werden sollen
|
lblSelectCardsToBePutIntoTheGraveyard=Wähle Karten, welche auf den Friedhof gelegt werden sollen
|
||||||
lblCardsToPutInTheGraveyard=Karten, welche auf den Friedhof gelegt werden sollen
|
lblCardsToPutInTheGraveyard=Karten, welche auf den Friedhof gelegt werden sollen
|
||||||
|
#AbstractGuiGame.java
|
||||||
|
lblConcedeCurrentGame=This will concede the current game and you will lose.\n\nConcede anyway?
|
||||||
|
lblConcedeTitle=Concede Game?
|
||||||
|
lblConcede=Concede
|
||||||
|
lblCloseGameSpectator=This will close this game and you will not be able to resume watching it.\n\nClose anyway?
|
||||||
|
lblCloseGame=Close Game?
|
||||||
|
lblWaitingForOpponent=Waiting for opponent...
|
||||||
|
lblYieldingUntilEndOfTurn=Yielding until end of turn.\nYou may cancel this yield to take an action.
|
||||||
|
lblStopWatching=Stop Watching
|
||||||
|
lblEnterNumberBetweenMinAndMax=Enter a number between %min and %max:
|
||||||
|
lblEnterNumberGreaterThanOrEqualsToMin=Enter a number greater than or equal to %min:
|
||||||
|
lblEnterNumberLessThanOrEqualsToMax=Enter a number less than or equal to %max:
|
||||||
|
#PlayerOutcome.java
|
||||||
|
lblWonBecauseAllOpponentsHaveLost=has won because all opponents have lost
|
||||||
|
lblWonDueToEffectOf=has won due to effect of '%s'
|
||||||
|
lblConceded=has conceded
|
||||||
|
lblLostTryingToDrawCardsFromEmptyLibrary=has lost trying to draw cards from empty library
|
||||||
|
lblLostBecauseLifeTotalReachedZero=has lost because life total reached 0
|
||||||
|
lblLostBecauseOfObtainingTenPoisonCounters=has lost because of obtaining 10 poison counters
|
||||||
|
lblLostBecauseAnOpponentHasWonBySpell=has lost because an opponent has won by spell '%s'
|
||||||
|
lblLostDueToEffectOfSpell=has lost due to effect of spell '%s'
|
||||||
|
lblLostDueToAccumulationOf21DamageFromGenerals=has lost due to accumulation of 21 damage from generals
|
||||||
|
lblAcceptedThatTheGameIsADraw=has accepted that the game is a draw
|
||||||
|
lblLostForUnknownReasonBug=has lost for unknown reason (this is a bug)
|
||||||
|
#ViewWinLose.java
|
||||||
|
btnNextGame=Next Game
|
||||||
|
btnStartNewMatch=Start New Match
|
||||||
|
btnQuitMatch=Quit Match
|
||||||
|
lblItsADraw=It's a draw!
|
||||||
|
lblTeamWon=Team %s won!
|
||||||
|
lblWinnerWon=%s won!
|
||||||
|
lblGameLog=Game Log
|
||||||
@@ -1140,3 +1140,35 @@ lblArrangeCardsToBePutOnTopOfYourLibrary=Arrange cards to be put on top of your
|
|||||||
lblTopOfLibrary=Top of Library
|
lblTopOfLibrary=Top of Library
|
||||||
lblSelectCardsToBePutIntoTheGraveyard=Select cards to be put into the graveyard
|
lblSelectCardsToBePutIntoTheGraveyard=Select cards to be put into the graveyard
|
||||||
lblCardsToPutInTheGraveyard=Cards to put in the graveyard
|
lblCardsToPutInTheGraveyard=Cards to put in the graveyard
|
||||||
|
#AbstractGuiGame.java
|
||||||
|
lblConcedeCurrentGame=This will concede the current game and you will lose.\n\nConcede anyway?
|
||||||
|
lblConcedeTitle=Concede Game?
|
||||||
|
lblConcede=Concede
|
||||||
|
lblCloseGameSpectator=This will close this game and you will not be able to resume watching it.\n\nClose anyway?
|
||||||
|
lblCloseGame=Close Game?
|
||||||
|
lblWaitingForOpponent=Waiting for opponent...
|
||||||
|
lblYieldingUntilEndOfTurn=Yielding until end of turn.\nYou may cancel this yield to take an action.
|
||||||
|
lblStopWatching=Stop Watching
|
||||||
|
lblEnterNumberBetweenMinAndMax=Enter a number between %min and %max:
|
||||||
|
lblEnterNumberGreaterThanOrEqualsToMin=Enter a number greater than or equal to %min:
|
||||||
|
lblEnterNumberLessThanOrEqualsToMax=Enter a number less than or equal to %max:
|
||||||
|
#PlayerOutcome.java
|
||||||
|
lblWonBecauseAllOpponentsHaveLost=has won because all opponents have lost
|
||||||
|
lblWonDueToEffectOf=has won due to effect of '%s'
|
||||||
|
lblConceded=has conceded
|
||||||
|
lblLostTryingToDrawCardsFromEmptyLibrary=has lost trying to draw cards from empty library
|
||||||
|
lblLostBecauseLifeTotalReachedZero=has lost because life total reached 0
|
||||||
|
lblLostBecauseOfObtainingTenPoisonCounters=has lost because of obtaining 10 poison counters
|
||||||
|
lblLostBecauseAnOpponentHasWonBySpell=has lost because an opponent has won by spell '%s'
|
||||||
|
lblLostDueToEffectOfSpell=has lost due to effect of spell '%s'
|
||||||
|
lblLostDueToAccumulationOf21DamageFromGenerals=has lost due to accumulation of 21 damage from generals
|
||||||
|
lblAcceptedThatTheGameIsADraw=has accepted that the game is a draw
|
||||||
|
lblLostForUnknownReasonBug=has lost for unknown reason (this is a bug)
|
||||||
|
#ViewWinLose.java
|
||||||
|
btnNextGame=Next Game
|
||||||
|
btnStartNewMatch=Start New Match
|
||||||
|
btnQuitMatch=Quit Match
|
||||||
|
lblItsADraw=It's a draw!
|
||||||
|
lblTeamWon=Team %s won!
|
||||||
|
lblWinnerWon=%s won!
|
||||||
|
lblGameLog=Game Log
|
||||||
@@ -983,9 +983,9 @@ lblCollection=Colección
|
|||||||
lblCommanders=Commanders
|
lblCommanders=Commanders
|
||||||
lblOathbreakers=Oathbreakers
|
lblOathbreakers=Oathbreakers
|
||||||
#Forge.java
|
#Forge.java
|
||||||
lblLoadingFonts=Loading fonts...
|
lblLoadingFonts=Cargando fuentes...
|
||||||
lblLoadingCardTranslations=Loading card translations...
|
lblLoadingCardTranslations=Cargando traducciones de cartas...
|
||||||
lblFinishingStartup=Finishing startup...
|
lblFinishingStartup=Finalizando el arranque...
|
||||||
#LobbyScreen.java
|
#LobbyScreen.java
|
||||||
lblMore=Más...
|
lblMore=Más...
|
||||||
lblLoadingNewGame=Cargando nueva partida...
|
lblLoadingNewGame=Cargando nueva partida...
|
||||||
@@ -1140,3 +1140,35 @@ lblArrangeCardsToBePutOnTopOfYourLibrary=Organizar las cartas para colocarlas en
|
|||||||
lblTopOfLibrary=Parte Superior de la Biblioteca
|
lblTopOfLibrary=Parte Superior de la Biblioteca
|
||||||
lblSelectCardsToBePutIntoTheGraveyard=Selecciona las cartas para ponerlas en el Cementerio
|
lblSelectCardsToBePutIntoTheGraveyard=Selecciona las cartas para ponerlas en el Cementerio
|
||||||
lblCardsToPutInTheGraveyard=Cartas para poner en el Cementerio
|
lblCardsToPutInTheGraveyard=Cartas para poner en el Cementerio
|
||||||
|
#AbstractGuiGame.java
|
||||||
|
lblConcedeCurrentGame=Esto concederá la partida actual y perderás.\n\n¿Conceder de todos modos?
|
||||||
|
lblConcedeTitle=¿Conceder Partida?
|
||||||
|
lblConcede=Conceder
|
||||||
|
lblCloseGameSpectator=Esto cerrará la partida y no podrás volver a verla.\n\n¿Cerrar de todos modos?
|
||||||
|
lblCloseGame=¿Cerrar Partida?
|
||||||
|
lblWaitingForOpponent=Esperando al oponente...
|
||||||
|
lblYieldingUntilEndOfTurn=Cediendo hasta el final del turno.\nPuedes cancelar esta cesión para realizar una acción.
|
||||||
|
lblStopWatching=Dejar de Observar
|
||||||
|
lblEnterNumberBetweenMinAndMax=Introduce un número entre %min y %max:
|
||||||
|
lblEnterNumberGreaterThanOrEqualsToMin=Introduce un número mayor o igual a %min:
|
||||||
|
lblEnterNumberLessThanOrEqualsToMax=Introduce un número menor o igual a %max:
|
||||||
|
#PlayerOutcome.java
|
||||||
|
lblWonBecauseAllOpponentsHaveLost=ha ganado porque todos los oponentes han perdido
|
||||||
|
lblWonDueToEffectOf=ha ganado debido al efecto de '%s'
|
||||||
|
lblConceded=ha concedido
|
||||||
|
lblLostTryingToDrawCardsFromEmptyLibrary=ha perdido intentando robar cartas de una biblioteca vacía
|
||||||
|
lblLostBecauseLifeTotalReachedZero=ha perdido porque el total de la vida llegó a 0
|
||||||
|
lblLostBecauseOfObtainingTenPoisonCounters=ha perdido debido a la obtención de 10 contadores de veneno
|
||||||
|
lblLostBecauseAnOpponentHasWonBySpell=ha perdido porque un oponente ha ganado por el hechizo '%s'
|
||||||
|
lblLostDueToEffectOfSpell=ha perdido debido al efecto del hechizo '%s'
|
||||||
|
lblLostDueToAccumulationOf21DamageFromGenerals=ha perdido debido a la acumulación de 21 de daño de los generales
|
||||||
|
lblAcceptedThatTheGameIsADraw=ha aceptado que la partida es un empate
|
||||||
|
lblLostForUnknownReasonBug=ha perdido por una razón desconocida (esto es un error)
|
||||||
|
#ViewWinLose.java
|
||||||
|
btnNextGame=Siguiente Juego
|
||||||
|
btnStartNewMatch=Iniciar Nueva Partida
|
||||||
|
btnQuitMatch=Salir de la Partida
|
||||||
|
lblItsADraw=¡Es un empate!
|
||||||
|
lblTeamWon=¡El equipo %s ha ganado!
|
||||||
|
lblWinnerWon=¡%s ha ganado!
|
||||||
|
lblGameLog=Registro del Juego
|
||||||
@@ -1140,3 +1140,35 @@ lblArrangeCardsToBePutOnTopOfYourLibrary=为放于牌库顶的牌张排序
|
|||||||
lblTopOfLibrary=牌库顶
|
lblTopOfLibrary=牌库顶
|
||||||
lblSelectCardsToBePutIntoTheGraveyard=选择要放于坟场的牌张
|
lblSelectCardsToBePutIntoTheGraveyard=选择要放于坟场的牌张
|
||||||
lblCardsToPutInTheGraveyard=放于坟场的牌张
|
lblCardsToPutInTheGraveyard=放于坟场的牌张
|
||||||
|
#AbstractGuiGame.java
|
||||||
|
lblConcedeCurrentGame=This will concede the current game and you will lose.\n\nConcede anyway?
|
||||||
|
lblConcedeTitle=Concede Game?
|
||||||
|
lblConcede=Concede
|
||||||
|
lblCloseGameSpectator=This will close this game and you will not be able to resume watching it.\n\nClose anyway?
|
||||||
|
lblCloseGame=Close Game?
|
||||||
|
lblWaitingForOpponent=Waiting for opponent...
|
||||||
|
lblYieldingUntilEndOfTurn=Yielding until end of turn.\nYou may cancel this yield to take an action.
|
||||||
|
lblStopWatching=Stop Watching
|
||||||
|
lblEnterNumberBetweenMinAndMax=Enter a number between %min and %max:
|
||||||
|
lblEnterNumberGreaterThanOrEqualsToMin=Enter a number greater than or equal to %min:
|
||||||
|
lblEnterNumberLessThanOrEqualsToMax=Enter a number less than or equal to %max:
|
||||||
|
#PlayerOutcome.java
|
||||||
|
lblWonBecauseAllOpponentsHaveLost=has won because all opponents have lost
|
||||||
|
lblWonDueToEffectOf=has won due to effect of '%s'
|
||||||
|
lblConceded=has conceded
|
||||||
|
lblLostTryingToDrawCardsFromEmptyLibrary=has lost trying to draw cards from empty library
|
||||||
|
lblLostBecauseLifeTotalReachedZero=has lost because life total reached 0
|
||||||
|
lblLostBecauseOfObtainingTenPoisonCounters=has lost because of obtaining 10 poison counters
|
||||||
|
lblLostBecauseAnOpponentHasWonBySpell=has lost because an opponent has won by spell '%s'
|
||||||
|
lblLostDueToEffectOfSpell=has lost due to effect of spell '%s'
|
||||||
|
lblLostDueToAccumulationOf21DamageFromGenerals=has lost due to accumulation of 21 damage from generals
|
||||||
|
lblAcceptedThatTheGameIsADraw=has accepted that the game is a draw
|
||||||
|
lblLostForUnknownReasonBug=has lost for unknown reason (this is a bug)
|
||||||
|
#ViewWinLose.java
|
||||||
|
btnNextGame=Next Game
|
||||||
|
btnStartNewMatch=Start New Match
|
||||||
|
btnQuitMatch=Quit Match
|
||||||
|
lblItsADraw=It's a draw!
|
||||||
|
lblTeamWon=Team %s won!
|
||||||
|
lblWinnerWon=%s won!
|
||||||
|
lblGameLog=Game Log
|
||||||
@@ -9,6 +9,7 @@ import java.util.Set;
|
|||||||
import java.util.Timer;
|
import java.util.Timer;
|
||||||
import java.util.TimerTask;
|
import java.util.TimerTask;
|
||||||
|
|
||||||
|
import forge.util.Localizer;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
|
||||||
import com.google.common.collect.ImmutableList;
|
import com.google.common.collect.ImmutableList;
|
||||||
@@ -238,7 +239,7 @@ public abstract class AbstractGuiGame implements IGuiGame, IMayViewCards {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (hasLocalPlayers()) {
|
if (hasLocalPlayers()) {
|
||||||
if (showConfirmDialog("This will concede the current game and you will lose.\n\nConcede anyway?", "Concede Game?", "Concede", "Cancel")) {
|
if (showConfirmDialog(Localizer.getInstance().getMessage("lblConcedeCurrentGame"), Localizer.getInstance().getMessage("lblConcedeTitle"), Localizer.getInstance().getMessage("lblConcede"), Localizer.getInstance().getMessage("lblCancel"))) {
|
||||||
for (final IGameController c : getOriginalGameControllers()) {
|
for (final IGameController c : getOriginalGameControllers()) {
|
||||||
// Concede each player on this Gui (except mind-controlled players)
|
// Concede each player on this Gui (except mind-controlled players)
|
||||||
c.concede();
|
c.concede();
|
||||||
@@ -262,7 +263,7 @@ public abstract class AbstractGuiGame implements IGuiGame, IMayViewCards {
|
|||||||
return true; //if no local players or spectator, just quit
|
return true; //if no local players or spectator, just quit
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (showConfirmDialog("This will close this game and you will not be able to resume watching it.\n\nClose anyway?", "Close Game?", "Close", "Cancel")) {
|
if (showConfirmDialog(Localizer.getInstance().getMessage("lblCloseGameSpectator"), Localizer.getInstance().getMessage("lblCloseGame"), Localizer.getInstance().getMessage("lblClose"), Localizer.getInstance().getMessage("lblCancel"))) {
|
||||||
IGameController controller = spectator;
|
IGameController controller = spectator;
|
||||||
spectator = null; //ensure we don't prompt again, including when calling nextGameDecision below
|
spectator = null; //ensure we don't prompt again, including when calling nextGameDecision below
|
||||||
controller.nextGameDecision(NextGameDecision.QUIT);
|
controller.nextGameDecision(NextGameDecision.QUIT);
|
||||||
@@ -273,14 +274,14 @@ public abstract class AbstractGuiGame implements IGuiGame, IMayViewCards {
|
|||||||
|
|
||||||
public String getConcedeCaption() {
|
public String getConcedeCaption() {
|
||||||
if (hasLocalPlayers()) {
|
if (hasLocalPlayers()) {
|
||||||
return "Concede";
|
return Localizer.getInstance().getMessage("lblConcede");
|
||||||
}
|
}
|
||||||
return "Stop Watching";
|
return Localizer.getInstance().getMessage("lblStopWatching");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updateButtons(final PlayerView owner, final boolean okEnabled, final boolean cancelEnabled, final boolean focusOk) {
|
public void updateButtons(final PlayerView owner, final boolean okEnabled, final boolean cancelEnabled, final boolean focusOk) {
|
||||||
updateButtons(owner, "OK", "Cancel", okEnabled, cancelEnabled, focusOk);
|
updateButtons(owner, Localizer.getInstance().getMessage("lblOK"), Localizer.getInstance().getMessage("lblCancel"), okEnabled, cancelEnabled, focusOk);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Auto-yield and other input-related code
|
// Auto-yield and other input-related code
|
||||||
@@ -341,7 +342,7 @@ public abstract class AbstractGuiGame implements IGuiGame, IMayViewCards {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected final void updatePromptForAwait(final PlayerView playerView) {
|
protected final void updatePromptForAwait(final PlayerView playerView) {
|
||||||
showPromptMessage(playerView, "Waiting for opponent...");
|
showPromptMessage(playerView, Localizer.getInstance().getMessage("lblWaitingForOpponent"));
|
||||||
updateButtons(playerView, false, false, false);
|
updateButtons(playerView, false, false, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -362,7 +363,7 @@ public abstract class AbstractGuiGame implements IGuiGame, IMayViewCards {
|
|||||||
if (!autoPassUntilEndOfTurn.isEmpty()) {
|
if (!autoPassUntilEndOfTurn.isEmpty()) {
|
||||||
//allow user to cancel auto-pass
|
//allow user to cancel auto-pass
|
||||||
cancelAwaitNextInput(); //don't overwrite prompt with awaiting opponent
|
cancelAwaitNextInput(); //don't overwrite prompt with awaiting opponent
|
||||||
showPromptMessage(getCurrentPlayer(), "Yielding until end of turn.\nYou may cancel this yield to take an action.");
|
showPromptMessage(getCurrentPlayer(), Localizer.getInstance().getMessage("lblYieldingUntilEndOfTurn"));
|
||||||
updateButtons(getCurrentPlayer(), false, true, false);
|
updateButtons(getCurrentPlayer(), false, true, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -540,17 +541,17 @@ public abstract class AbstractGuiGame implements IGuiGame, IMayViewCards {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//if Other option picked, prompt for number input
|
//if Other option picked, prompt for number input
|
||||||
String prompt = "Enter a number";
|
Localizer localizer = Localizer.getInstance();
|
||||||
|
String prompt = "";
|
||||||
if (min != Integer.MIN_VALUE) {
|
if (min != Integer.MIN_VALUE) {
|
||||||
if (max != Integer.MAX_VALUE) {
|
if (max != Integer.MAX_VALUE) {
|
||||||
prompt += " between " + min + " and " + max;
|
prompt = localizer.getMessage("lblEnterNumberBetweenMinAndMax").replace("%min", String.valueOf(min)).replace("%max", String.valueOf(max));
|
||||||
} else {
|
} else {
|
||||||
prompt += " greater than or equal to " + min;
|
prompt = localizer.getMessage("lblEnterNumberGreaterThanOrEqualsToMin").replace("%min", String.valueOf(min));
|
||||||
}
|
}
|
||||||
} else if (max != Integer.MAX_VALUE) {
|
} else if (max != Integer.MAX_VALUE) {
|
||||||
prompt += " less than or equal to " + max;
|
prompt = localizer.getMessage("lblEnterNumberLessThanOrEqualsToMax").replace("%max", String.valueOf(max));
|
||||||
}
|
}
|
||||||
prompt += ":";
|
|
||||||
|
|
||||||
while (true) {
|
while (true) {
|
||||||
final String str = showInputDialog(prompt, message);
|
final String str = showInputDialog(prompt, message);
|
||||||
@@ -651,7 +652,7 @@ public abstract class AbstractGuiGame implements IGuiGame, IMayViewCards {
|
|||||||
@Override
|
@Override
|
||||||
public boolean showConfirmDialog(final String message, final String title,
|
public boolean showConfirmDialog(final String message, final String title,
|
||||||
final boolean defaultYes) {
|
final boolean defaultYes) {
|
||||||
return showConfirmDialog(message, title, "Yes", "No");
|
return showConfirmDialog(message, title, Localizer.getInstance().getMessage("lblYes"), Localizer.getInstance().getMessage("lblNo"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user