update interactive message translate

This commit is contained in:
CCTV-1
2019-12-24 11:42:46 +08:00
parent a90e9f05e2
commit 047f018da4
5 changed files with 320 additions and 96 deletions

View File

@@ -1188,6 +1188,62 @@ lblChooseOrderCardsPutIntoSchemeDeck=Wähle die Reihenfolge der Karten, in der s
lblChooseOrderCopiesCast=Wähle die Reihenfolge für die Kopien lblChooseOrderCopiesCast=Wähle die Reihenfolge für die Kopien
lblDelveHowManyCards=Wühlen - Wie viele Karten? lblDelveHowManyCards=Wühlen - Wie viele Karten?
lblExileWhichCard=Schicke welche Karte ins Exil? lblExileWhichCard=Schicke welche Karte ins Exil?
lblDestroy=destroy
lblUpTo=up to
lblHighestBidder=Highest Bidder
lblUseTriggeredAbilityOf=Use triggered ability of
lblExertAttackersConfirm=Exert Attackers?
lblThereNoCardIn=There are no cards in
lblPut=Put
lblOnTheTopLibraryOrGraveyard=on the top of library or graveyard?
lblLibrary=Library
lblGraveyard=Graveyard
lblTop=Top
lblBottom=Bottom
lblManaFrom=mana from
lblPayManaFromManaPool=Pay Mana from Mana Pool
lblChooseATargetType=Choose a %s type
lblUntap=Untap
lblOdds=Odds
lblEvens=Evens
lblLeaveTapped=Leave tapped
lblUntapAndSkipThisTurn=Untap (and skip this turn)
lblLeft=Left
lblRight=Right
lblAddCounter=Add Counter
lblRemoveCounter=Remove Counter
lblWinTheFlip=win the flip
lblLoseTheFlip=lose the flip
lblChooseAResult=Choose a result
lblSelectPreventionShieldToUse=select which prevention shield to use
lblChooseAMode=Choose a mode
lblActivated=activated
lblNoPlayerHasPriorityCannotAddedManaToPool=No player has priority at the moment, so mana cannot be added to their pool.
lblOverwriteExistFileConfirm=Overwrite existing file?
lblFileExists=File exists!
lblSelectGameStateFile=Select Game State File
lblFileNotFound=File not found
lblIn=in
lblOnTheBattlefield=on the battlefield
lblOnTheStackOrInPlay=on the stack / in play
lblPutCard=Put card
lblForWhichPlayer=for which player?
lblShould=Should
lblAffectedWithSummoningSickness=be affected with Summoning Sickness?
lblBeAddedToLibraryTopOrBottom=be added to the top or to the bottom of the library?
lblExileCardsFromPlayerHandConfirm=Exile card(s) from which player's hand?
lblChooseCardsExile=Choose cards to exile
lblExileCardsFromPlayerBattlefieldConfirm=Exile card(s) from which player's battlefield?
lblRemoveCardBelongingWitchPlayer=Remove card(s) belonging to which player?
lblRemoveCardFromWhichZone=Remove card(s) from which zone?
lblChooseCardsRemoveFromGame=Choose cards to remove from game
lblRemoved=Removed
lblEnterASequence=Enter a sequence (card IDs and/or "opponent"/"me"). (e.g. 7, opponent, 18)
lblActionSequenceCleared=Action sequence cleared.
lblRestartingActionSequence=Restarting action sequence.
lblErrorPleaseCheckID=Error: Check IDs and ensure they're separated by spaces and/or commas.
lblErrorEntityWithId=Error: Entity with ID
lblNotFound=not found
#AbstractGuiGame.java #AbstractGuiGame.java
lblConcedeCurrentGame=Das Spiel wird als verloren gewertet.\n\nTrotzdem aufgeben? lblConcedeCurrentGame=Das Spiel wird als verloren gewertet.\n\nTrotzdem aufgeben?
lblConcedeTitle=Spiel verloren geben? lblConcedeTitle=Spiel verloren geben?
@@ -1557,7 +1613,7 @@ lblGainControl=gain control.
lblReturnToHand=return to hand. lblReturnToHand=return to hand.
lbldiscard=discard. lbldiscard=discard.
lblReveal=reveal lblReveal=reveal
lblTap=tap. lblTap=tap
lblCurrentCard=Current Card lblCurrentCard=Current Card
lblSelectOfCardsTo=Select lblSelectOfCardsTo=Select
lblCardsTo=card(s) to lblCardsTo=card(s) to

View File

@@ -1188,6 +1188,62 @@ lblChooseOrderCardsPutIntoSchemeDeck=Choose order of cards to put into the schem
lblChooseOrderCopiesCast=Choose order of copies to cast lblChooseOrderCopiesCast=Choose order of copies to cast
lblDelveHowManyCards=Delve how many cards? lblDelveHowManyCards=Delve how many cards?
lblExileWhichCard=Exile which card? lblExileWhichCard=Exile which card?
lblDestroy=destroy
lblUpTo=up to
lblHighestBidder=Highest Bidder
lblUseTriggeredAbilityOf=Use triggered ability of
lblExertAttackersConfirm=Exert Attackers?
lblThereNoCardIn=There are no cards in
lblPut=Put
lblOnTheTopLibraryOrGraveyard=on the top of library or graveyard?
lblLibrary=Library
lblGraveyard=Graveyard
lblTop=Top
lblBottom=Bottom
lblManaFrom=mana from
lblPayManaFromManaPool=Pay Mana from Mana Pool
lblChooseATargetType=Choose a %s type
lblUntap=Untap
lblOdds=Odds
lblEvens=Evens
lblLeaveTapped=Leave tapped
lblUntapAndSkipThisTurn=Untap (and skip this turn)
lblLeft=Left
lblRight=Right
lblAddCounter=Add Counter
lblRemoveCounter=Remove Counter
lblWinTheFlip=win the flip
lblLoseTheFlip=lose the flip
lblChooseAResult=Choose a result
lblSelectPreventionShieldToUse=select which prevention shield to use
lblChooseAMode=Choose a mode
lblActivated=activated
lblNoPlayerHasPriorityCannotAddedManaToPool=No player has priority at the moment, so mana cannot be added to their pool.
lblOverwriteExistFileConfirm=Overwrite existing file?
lblFileExists=File exists!
lblSelectGameStateFile=Select Game State File
lblFileNotFound=File not found
lblIn=in
lblOnTheBattlefield=on the battlefield
lblOnTheStackOrInPlay=on the stack / in play
lblPutCard=Put card
lblForWhichPlayer=for which player?
lblShould=Should
lblAffectedWithSummoningSickness=be affected with Summoning Sickness?
lblBeAddedToLibraryTopOrBottom=be added to the top or to the bottom of the library?
lblExileCardsFromPlayerHandConfirm=Exile card(s) from which player's hand?
lblChooseCardsExile=Choose cards to exile
lblExileCardsFromPlayerBattlefieldConfirm=Exile card(s) from which player's battlefield?
lblRemoveCardBelongingWitchPlayer=Remove card(s) belonging to which player?
lblRemoveCardFromWhichZone=Remove card(s) from which zone?
lblChooseCardsRemoveFromGame=Choose cards to remove from game
lblRemoved=Removed
lblEnterASequence=Enter a sequence (card IDs and/or "opponent"/"me"). (e.g. 7, opponent, 18)
lblActionSequenceCleared=Action sequence cleared.
lblRestartingActionSequence=Restarting action sequence.
lblErrorPleaseCheckID=Error: Check IDs and ensure they're separated by spaces and/or commas.
lblErrorEntityWithId=Error: Entity with ID
lblNotFound=not found
#AbstractGuiGame.java #AbstractGuiGame.java
lblConcedeCurrentGame=This will concede the current game and you will lose.\n\nConcede anyway? lblConcedeCurrentGame=This will concede the current game and you will lose.\n\nConcede anyway?
lblConcedeTitle=Concede Game? lblConcedeTitle=Concede Game?
@@ -1557,7 +1613,7 @@ lblGainControl=gain control.
lblReturnToHand=return to hand. lblReturnToHand=return to hand.
lbldiscard=discard. lbldiscard=discard.
lblReveal=reveal lblReveal=reveal
lblTap=tap. lblTap=tap
lblCurrentCard=Current Card lblCurrentCard=Current Card
lblSelectOfCardsTo=Select lblSelectOfCardsTo=Select
lblCardsTo=card(s) to lblCardsTo=card(s) to

View File

@@ -1188,6 +1188,62 @@ lblChooseOrderCardsPutIntoSchemeDeck=Elige el orden de las cartas que quieres po
lblChooseOrderCopiesCast=Elige el orden de las copias que se van a invocar lblChooseOrderCopiesCast=Elige el orden de las copias que se van a invocar
lblDelveHowManyCards=¿Excavar cuántas cartas? lblDelveHowManyCards=¿Excavar cuántas cartas?
lblExileWhichCard=¿Exiliar qué carta? lblExileWhichCard=¿Exiliar qué carta?
lblDestroy=destroy
lblUpTo=up to
lblHighestBidder=Highest Bidder
lblUseTriggeredAbilityOf=Use triggered ability of
lblExertAttackersConfirm=Exert Attackers?
lblThereNoCardIn=There are no cards in
lblPut=Put
lblOnTheTopLibraryOrGraveyard=on the top of library or graveyard?
lblLibrary=Library
lblGraveyard=Graveyard
lblTop=Top
lblBottom=Bottom
lblManaFrom=mana from
lblPayManaFromManaPool=Pay Mana from Mana Pool
lblChooseATargetType=Choose a %s type
lblUntap=Untap
lblOdds=Odds
lblEvens=Evens
lblLeaveTapped=Leave tapped
lblUntapAndSkipThisTurn=Untap (and skip this turn)
lblLeft=Left
lblRight=Right
lblAddCounter=Add Counter
lblRemoveCounter=Remove Counter
lblWinTheFlip=win the flip
lblLoseTheFlip=lose the flip
lblChooseAResult=Choose a result
lblSelectPreventionShieldToUse=select which prevention shield to use
lblChooseAMode=Choose a mode
lblActivated=activated
lblNoPlayerHasPriorityCannotAddedManaToPool=No player has priority at the moment, so mana cannot be added to their pool.
lblOverwriteExistFileConfirm=Overwrite existing file?
lblFileExists=File exists!
lblSelectGameStateFile=Select Game State File
lblFileNotFound=File not found
lblIn=in
lblOnTheBattlefield=on the battlefield
lblOnTheStackOrInPlay=on the stack / in play
lblPutCard=Put card
lblForWhichPlayer=for which player?
lblShould=Should
lblAffectedWithSummoningSickness=be affected with Summoning Sickness?
lblBeAddedToLibraryTopOrBottom=be added to the top or to the bottom of the library?
lblExileCardsFromPlayerHandConfirm=Exile card(s) from which player's hand?
lblChooseCardsExile=Choose cards to exile
lblExileCardsFromPlayerBattlefieldConfirm=Exile card(s) from which player's battlefield?
lblRemoveCardBelongingWitchPlayer=Remove card(s) belonging to which player?
lblRemoveCardFromWhichZone=Remove card(s) from which zone?
lblChooseCardsRemoveFromGame=Choose cards to remove from game
lblRemoved=Removed
lblEnterASequence=Enter a sequence (card IDs and/or "opponent"/"me"). (e.g. 7, opponent, 18)
lblActionSequenceCleared=Action sequence cleared.
lblRestartingActionSequence=Restarting action sequence.
lblErrorPleaseCheckID=Error: Check IDs and ensure they're separated by spaces and/or commas.
lblErrorEntityWithId=Error: Entity with ID
lblNotFound=not found
#AbstractGuiGame.java #AbstractGuiGame.java
lblConcedeCurrentGame=Esto concederá la partida actual y perderás.\n\n¿Conceder de todos modos? lblConcedeCurrentGame=Esto concederá la partida actual y perderás.\n\n¿Conceder de todos modos?
lblConcedeTitle=¿Conceder Partida? lblConcedeTitle=¿Conceder Partida?
@@ -1557,7 +1613,7 @@ lblGainControl=gain control.
lblReturnToHand=return to hand. lblReturnToHand=return to hand.
lbldiscard=discard. lbldiscard=discard.
lblReveal=reveal lblReveal=reveal
lblTap=tap. lblTap=tap
lblCurrentCard=Current Card lblCurrentCard=Current Card
lblSelectOfCardsTo=Select lblSelectOfCardsTo=Select
lblCardsTo=card(s) to lblCardsTo=card(s) to

View File

@@ -1188,6 +1188,62 @@ lblChooseOrderCardsPutIntoSchemeDeck=选择要放入魔王套牌中的牌的顺
lblChooseOrderCopiesCast=选择要复制品的释放顺序。 lblChooseOrderCopiesCast=选择要复制品的释放顺序。
lblDelveHowManyCards=掘穴多少张牌? lblDelveHowManyCards=掘穴多少张牌?
lblExileWhichCard=放逐哪张牌? lblExileWhichCard=放逐哪张牌?
lblDestroy=消灭
lblUpTo=最多
lblHighestBidder=最高出价者
lblUseTriggeredAbilityOf=使用触发异能
lblExertAttackersConfirm=进攻者耗竭?
lblThereNoCardIn=里面没有牌
lblPut=放到
lblOnTheTopLibraryOrGraveyard=牌库顶或坟场?
lblLibrary=牌库
lblGraveyard=坟场
lblTop=
lblBottom=
lblManaFrom=法术力自
lblPayManaFromManaPool=从法术力池支付法术力
lblChooseATargetType=选择一个%s类型
lblUntap=重置
lblOdds=赔率
lblEvens=偶数
lblLeaveTapped=轻按一下
lblUntapAndSkipThisTurn=取消点击(并跳过当前回合)
lblLeft=
lblRight=
lblAddCounter=增加指示物
lblRemoveCounter=移除指示物
lblWinTheFlip=赢得此掷
lblLoseTheFlip=输掉此掷
lblChooseAResult=选择一个结果
lblSelectPreventionShieldToUse=选择一个保护罩使用
lblChooseAMode=选择一种模式
lblActivated=已启动
lblNoPlayerHasPriorityCannotAddedManaToPool=目前没有牌手具有优先权,因此无法向法术力池中加入法术力。
lblOverwriteExistFileConfirm=覆盖已有的文件?
lblFileExists=文件已存在!
lblSelectGameStateFile=选择游戏状态文件
lblFileNotFound=文件未找到
lblIn=
lblOnTheBattlefield=在战场上
lblOnTheStackOrInPlay=在堆叠/在使用
lblPutCard=放置牌
lblForWhichPlayer=哪个牌手?
lblShould=应该
lblAffectedWithSummoningSickness=被召唤失调效应影响?
lblBeAddedToLibraryTopOrBottom=被添加到牌库顶还是底?
lblExileCardsFromPlayerHandConfirm=从哪位玩家手中放逐牌?
lblChooseCardsExile=选择要放逐的牌
lblExileCardsFromPlayerBattlefieldConfirm=从哪个玩家的战场放逐牌?
lblRemoveCardBelongingWitchPlayer=删除属于哪个玩家的牌?
lblRemoveCardFromWhichZone=从哪个区域删除牌?
lblChooseCardsRemoveFromGame=选择要从游戏中移除的牌
lblRemoved=已移除
lblEnterASequence=输入一个序列 (card IDs and/or "opponent"/"me"). (例如 7, opponent, 18)
lblActionSequenceCleared=行动序列已清除。
lblRestartingActionSequence=重新启动行动序列
lblErrorPleaseCheckID=错误请检查ID并确保他们之间用空格和/或逗号分隔。
lblErrorEntityWithId=错误实体的ID
lblNotFound=没有找到
#AbstractGuiGame.java #AbstractGuiGame.java
lblConcedeCurrentGame=这局游戏认输。\n\n确认吗 lblConcedeCurrentGame=这局游戏认输。\n\n确认吗
lblConcedeTitle=这局游戏认输? lblConcedeTitle=这局游戏认输?
@@ -1557,7 +1613,7 @@ lblGainControl=获得控制权。
lblReturnToHand=返回手牌。 lblReturnToHand=返回手牌。
lbldiscard=弃牌。 lbldiscard=弃牌。
lblReveal=展示 lblReveal=展示
lblTap=横置 lblTap=横置
lblCurrentCard=当前牌 lblCurrentCard=当前牌
lblSelectOfCardsTo=选择 lblSelectOfCardsTo=选择
lblCardsTo=牌到 lblCardsTo=牌到
@@ -1593,7 +1649,7 @@ lblDoYouWantMove=你想要移动
lblDeclareDefenderFor=声明阻挡者 lblDeclareDefenderFor=声明阻挡者
lblCardMatchSearchingTypeInAlternateZones=在你的备用区域搜索匹配类型的卡牌。 lblCardMatchSearchingTypeInAlternateZones=在你的备用区域搜索匹配类型的卡牌。
lblPutThatCardFrom=放置这张牌从 lblPutThatCardFrom=放置这张牌从
lblLookingCardIn=这张牌于 lblLookingCardIn=牌自
lblDoYouWantPlay=你想要使用 lblDoYouWantPlay=你想要使用
lblSelectCardFrom=选择一张牌从 lblSelectCardFrom=选择一张牌从
lblSelectUpTo=最多选择 lblSelectUpTo=最多选择
@@ -1736,7 +1792,7 @@ lblDoYouWantRepeatProcessAgain=你是否想再次重复这个过程?
#RevealHandEffect.java #RevealHandEffect.java
lblDoYouWantRevealYourHand=你想展示你的手牌吗? lblDoYouWantRevealYourHand=你想展示你的手牌吗?
#RollPlanarDiceEffect.java #RollPlanarDiceEffect.java
lblRolled=rolled lblRolled=已转动
#SacrificeEffect.java #SacrificeEffect.java
lblDoYouWantPayEcho=你想支付返响费用 lblDoYouWantPayEcho=你想支付返响费用
lblPayEcho=支付返响费用 lblPayEcho=支付返响费用

View File

@@ -313,20 +313,20 @@ public class PlayerControllerHuman extends PlayerController implements IGameCont
public Integer announceRequirements(final SpellAbility ability, final String announce, public Integer announceRequirements(final SpellAbility ability, final String announce,
final boolean canChooseZero) { final boolean canChooseZero) {
final int min = canChooseZero ? 0 : 1; final int min = canChooseZero ? 0 : 1;
return getGui().getInteger("Choose " + announce + " for " + ability.getHostCard().getName(), min, return getGui().getInteger(localizer.getMessage("Choose %s for ").replace("%s", announce) + ability.getHostCard().getName(), min,
Integer.MAX_VALUE, min + 9); Integer.MAX_VALUE, min + 9);
} }
@Override @Override
public CardCollectionView choosePermanentsToSacrifice(final SpellAbility sa, final int min, final int max, public CardCollectionView choosePermanentsToSacrifice(final SpellAbility sa, final int min, final int max,
final CardCollectionView valid, final String message) { final CardCollectionView valid, final String message) {
return choosePermanentsTo(min, max, valid, message, "sacrifice", sa); return choosePermanentsTo(min, max, valid, message, localizer.getMessage("lblSacrifice"), sa);
} }
@Override @Override
public CardCollectionView choosePermanentsToDestroy(final SpellAbility sa, final int min, final int max, public CardCollectionView choosePermanentsToDestroy(final SpellAbility sa, final int min, final int max,
final CardCollectionView valid, final String message) { final CardCollectionView valid, final String message) {
return choosePermanentsTo(min, max, valid, message, "destroy", sa); return choosePermanentsTo(min, max, valid, message, localizer.getMessage("lblDestroy"), sa);
} }
private CardCollectionView choosePermanentsTo(final int min, int max, final CardCollectionView valid, private CardCollectionView choosePermanentsTo(final int min, int max, final CardCollectionView valid,
@@ -336,11 +336,11 @@ public class PlayerControllerHuman extends PlayerController implements IGameCont
return CardCollection.EMPTY; return CardCollection.EMPTY;
} }
final StringBuilder builder = new StringBuilder("Select "); final StringBuilder builder = new StringBuilder(localizer.getMessage("lblSelectOfCardsTo") + " ");
if (min == 0) { if (min == 0) {
builder.append("up to "); builder.append(localizer.getMessage("lblUpTo") + " ");
} }
builder.append("%d ").append(message).append("(s) to ").append(action).append("."); builder.append("%d ").append(message).append("(s) " + localizer.getMessage("lblTo") + " ").append(action).append(".");
final InputSelectCardsFromList inp = new InputSelectCardsFromList(this, min, max, valid, sa); final InputSelectCardsFromList inp = new InputSelectCardsFromList(this, min, max, valid, sa);
inp.setMessage(builder.toString()); inp.setMessage(builder.toString());
@@ -597,7 +597,7 @@ public class PlayerControllerHuman extends PlayerController implements IGameCont
@Override @Override
public boolean confirmBidAction(final SpellAbility sa, final PlayerActionConfirmMode bidlife, final String string, public boolean confirmBidAction(final SpellAbility sa, final PlayerActionConfirmMode bidlife, final String string,
final int bid, final Player winner) { final int bid, final Player winner) {
return InputConfirm.confirm(this, sa, string + " Highest Bidder " + winner); return InputConfirm.confirm(this, sa, string + " " + localizer.getMessage("lblHighestBidder") + " " + winner);
} }
@Override @Override
@@ -623,7 +623,7 @@ public class PlayerControllerHuman extends PlayerController implements IGameCont
return true; return true;
} }
final StringBuilder buildQuestion = new StringBuilder("Use triggered ability of "); final StringBuilder buildQuestion = new StringBuilder(localizer.getMessage("lblUseTriggeredAbilityOf") + " ");
buildQuestion.append(regtrig.getHostCard().toString()).append("?"); buildQuestion.append(regtrig.getHostCard().toString()).append("?");
if (!FModel.getPreferences().getPrefBoolean(FPref.UI_COMPACT_PROMPT) if (!FModel.getPreferences().getPrefBoolean(FPref.UI_COMPACT_PROMPT)
&& !FModel.getPreferences().getPrefBoolean(FPref.UI_DETAILED_SPELLDESC_IN_PROMPT)) { && !FModel.getPreferences().getPrefBoolean(FPref.UI_DETAILED_SPELLDESC_IN_PROMPT)) {
@@ -690,7 +690,7 @@ public class PlayerControllerHuman extends PlayerController implements IGameCont
} }
List<CardView> chosen; List<CardView> chosen;
List<CardView> choices = new ArrayList<>(mapCVtoC.keySet()); List<CardView> choices = new ArrayList<>(mapCVtoC.keySet());
chosen = getGui().order("Exert Attackers?", "Exerted", 0, choices.size(), choices, null, null, false); chosen = getGui().order(localizer.getMessage("lblExertAttackersConfirm"), localizer.getMessage("lblExerted"), 0, choices.size(), choices, null, null, false);
List<Card> chosenCards = new ArrayList<>(); List<Card> chosenCards = new ArrayList<>();
for (CardView cardView : chosen) { for (CardView cardView : chosen) {
chosenCards.add(mapCVtoC.get(cardView)); chosenCards.add(mapCVtoC.get(cardView));
@@ -723,7 +723,7 @@ public class PlayerControllerHuman extends PlayerController implements IGameCont
@Override @Override
public void reveal(final List<CardView> cards, final ZoneType zone, final PlayerView owner, String message) { public void reveal(final List<CardView> cards, final ZoneType zone, final PlayerView owner, String message) {
if (StringUtils.isBlank(message)) { if (StringUtils.isBlank(message)) {
message = "Looking at cards in {player's} " + zone.name().toLowerCase(); message = localizer.getMessage("lblLookingCardIn") + " {player's} " + zone.name().toLowerCase();
} else { } else {
message += "{player's} " + zone.name().toLowerCase(); message += "{player's} " + zone.name().toLowerCase();
} }
@@ -733,7 +733,7 @@ public class PlayerControllerHuman extends PlayerController implements IGameCont
getGui().reveal(fm, cards); getGui().reveal(fm, cards);
endTempShowCards(); endTempShowCards();
} else { } else {
getGui().message(MessageUtil.formatMessage("There are no cards in {player's} " + zone.name().toLowerCase(), getGui().message(MessageUtil.formatMessage(localizer.getMessage("lblThereNoCardIn") + " {player's} " + zone.name().toLowerCase(),
player, owner), fm); player, owner), fm);
} }
} }
@@ -809,8 +809,8 @@ public class PlayerControllerHuman extends PlayerController implements IGameCont
tempShowCard(c); tempShowCard(c);
getGui().setCard(view); getGui().setCard(view);
boolean result = false; boolean result = false;
result = InputConfirm.confirm(this, view, TextUtil.concatNoSpace("Put ", view.toString(), " on the top of library or graveyard?"), result = InputConfirm.confirm(this, view, TextUtil.concatNoSpace(localizer.getMessage("lblPut") + " ", view.toString(), " " + localizer.getMessage("lblOnTheTopLibraryOrGraveyard")),
true, ImmutableList.of("Library", "Graveyard")); true, ImmutableList.of(localizer.getMessage("lblLibrary"), localizer.getMessage("lblGraveyard")));
if (result) { if (result) {
toTop = topN; toTop = topN;
} else { } else {
@@ -842,7 +842,7 @@ public class PlayerControllerHuman extends PlayerController implements IGameCont
boolean result = false; boolean result = false;
result = InputConfirm.confirm(this, view, localizer.getMessage("lblPutCardOnTopOrBottomLibrary").replace("%s", view.toString()), result = InputConfirm.confirm(this, view, localizer.getMessage("lblPutCardOnTopOrBottomLibrary").replace("%s", view.toString()),
true, ImmutableList.of("Top", "Bottom")); true, ImmutableList.of(localizer.getMessage("lblTop"), localizer.getMessage("lblBottom")));
endTempShowCards(); endTempShowCards();
return result; return result;
@@ -1020,9 +1020,9 @@ public class PlayerControllerHuman extends PlayerController implements IGameCont
for (int i = 0; i < manaChoices.size(); i++) { for (int i = 0; i < manaChoices.size(); i++) {
final Mana m = manaChoices.get(i); final Mana m = manaChoices.get(i);
options.add(TextUtil.concatNoSpace(String.valueOf(1 + i), ". ", MagicColor.toLongString(m.getColor()), options.add(TextUtil.concatNoSpace(String.valueOf(1 + i), ". ", MagicColor.toLongString(m.getColor()),
" mana from ", m.getSourceCard().toString())); " " + localizer.getMessage("lblManaFrom") + " ", m.getSourceCard().toString()));
} }
final String chosen = getGui().one("Pay Mana from Mana Pool", options); final String chosen = getGui().one(localizer.getMessage("lblPayManaFromManaPool"), options);
final String idx = TextUtil.split(chosen, '.')[0]; final String idx = TextUtil.split(chosen, '.')[0];
return manaChoices.get(Integer.parseInt(idx) - 1); return manaChoices.get(Integer.parseInt(idx) - 1);
} }
@@ -1044,9 +1044,9 @@ public class PlayerControllerHuman extends PlayerController implements IGameCont
sortCreatureTypes(types); sortCreatureTypes(types);
} }
if (isOptional) { if (isOptional) {
return getGui().oneOrNone("Choose a " + kindOfType.toLowerCase() + " type", types); return getGui().oneOrNone(localizer.getMessage("lblChooseATargetType").replace("%s", kindOfType.toLowerCase()), types);
} }
return getGui().one("Choose a " + kindOfType.toLowerCase() + " type", types); return getGui().one(localizer.getMessage("lblChooseATargetType").replace("%s", kindOfType.toLowerCase()), types);
} }
// sort creature types such that those most prevalent in player's deck are // sort creature types such that those most prevalent in player's deck are
@@ -1374,28 +1374,28 @@ public class PlayerControllerHuman extends PlayerController implements IGameCont
final List<String> labels; final List<String> labels;
switch (kindOfChoice) { switch (kindOfChoice) {
case HeadsOrTails: case HeadsOrTails:
labels = ImmutableList.of("Heads", "Tails"); labels = ImmutableList.of(localizer.getMessage("lblHeads"), localizer.getMessage("lblTails"));
break; break;
case TapOrUntap: case TapOrUntap:
labels = ImmutableList.of("Tap", "Untap"); labels = ImmutableList.of(localizer.getMessage("lblTap"), localizer.getMessage("lblUntap"));
break; break;
case OddsOrEvens: case OddsOrEvens:
labels = ImmutableList.of("Odds", "Evens"); labels = ImmutableList.of(localizer.getMessage("lblOdds"), localizer.getMessage("lblEvens"));
break; break;
case UntapOrLeaveTapped: case UntapOrLeaveTapped:
labels = ImmutableList.of("Untap", "Leave tapped"); labels = ImmutableList.of(localizer.getMessage("lblUntap"), localizer.getMessage("lblLeaveTapped"));
break; break;
case UntapTimeVault: case UntapTimeVault:
labels = ImmutableList.of("Untap (and skip this turn)", "Leave tapped"); labels = ImmutableList.of(localizer.getMessage("lblUntapAndSkipThisTurn"), localizer.getMessage("lblLeaveTapped"));
break; break;
case PlayOrDraw: case PlayOrDraw:
labels = ImmutableList.of("Play", "Draw"); labels = ImmutableList.of(localizer.getMessage("lblPlay"), localizer.getMessage("lblDraw"));
break; break;
case LeftOrRight: case LeftOrRight:
labels = ImmutableList.of("Left", "Right"); labels = ImmutableList.of(localizer.getMessage("lblLeft"), localizer.getMessage("lblRight"));
break; break;
case AddOrRemove: case AddOrRemove:
labels = ImmutableList.of("Add Counter", "Remove Counter"); labels = ImmutableList.of(localizer.getMessage("lblAddCounter"), localizer.getMessage("lblRemoveCounter"));
break; break;
default: default:
labels = ImmutableList.copyOf(kindOfChoice.toString().split("Or")); labels = ImmutableList.copyOf(kindOfChoice.toString().split("Or"));
@@ -1407,8 +1407,8 @@ public class PlayerControllerHuman extends PlayerController implements IGameCont
@Override @Override
public boolean chooseFlipResult(final SpellAbility sa, final Player flipper, final boolean[] results, public boolean chooseFlipResult(final SpellAbility sa, final Player flipper, final boolean[] results,
final boolean call) { final boolean call) {
final String[] labelsSrc = call ? new String[] { "heads", "tails" } final String[] labelsSrc = call ? new String[] { localizer.getMessage("lblHeads"), localizer.getMessage("lblTails") }
: new String[] { "win the flip", "lose the flip" }; : new String[] { localizer.getMessage("lblWinTheFlip"), localizer.getMessage("lblLoseTheFlip") };
final List<String> sortedResults = new ArrayList<String>(); final List<String> sortedResults = new ArrayList<String>();
for (boolean result : results) { for (boolean result : results) {
sortedResults.add(labelsSrc[result ? 0 : 1]); sortedResults.add(labelsSrc[result ? 0 : 1]);
@@ -1418,13 +1418,13 @@ public class PlayerControllerHuman extends PlayerController implements IGameCont
if (!call) { if (!call) {
Collections.reverse(sortedResults); Collections.reverse(sortedResults);
} }
return getGui().one(sa.getHostCard().getName() + " - Choose a result", sortedResults).equals(labelsSrc[0]); return getGui().one(sa.getHostCard().getName() + " - " + localizer.getMessage("lblChooseAResult"), sortedResults).equals(labelsSrc[0]);
} }
@Override @Override
public Card chooseProtectionShield(final GameEntity entityBeingDamaged, final List<String> options, public Card chooseProtectionShield(final GameEntity entityBeingDamaged, final List<String> options,
final Map<String, Card> choiceMap) { final Map<String, Card> choiceMap) {
final String title = entityBeingDamaged + " - select which prevention shield to use"; final String title = entityBeingDamaged + " - " + localizer.getMessage("lblSelectPreventionShieldToUse");
return choiceMap.get(getGui().one(title, options)); return choiceMap.get(getGui().one(title, options));
} }
@@ -1486,8 +1486,8 @@ public class PlayerControllerHuman extends PlayerController implements IGameCont
game.getTracker().freeze(); // refreeze if the tracker was frozen prior to this update game.getTracker().freeze(); // refreeze if the tracker was frozen prior to this update
} }
final List<SpellAbilityView> choices = new ArrayList<>(spellViewCache.keySet()); final List<SpellAbilityView> choices = new ArrayList<>(spellViewCache.keySet());
final String modeTitle = TextUtil.concatNoSpace(sa.getActivatingPlayer().toString(), " activated ", final String modeTitle = TextUtil.concatNoSpace(sa.getActivatingPlayer().toString(), " " + localizer.getMessage("lblActivated") + " ",
sa.getHostCard().toString(), " - Choose a mode"); sa.getHostCard().toString(), " - " + localizer.getMessage("lblChooseAMode"));
final List<AbilitySub> chosen = Lists.newArrayListWithCapacity(num); final List<AbilitySub> chosen = Lists.newArrayListWithCapacity(num);
for (int i = 0; i < num; i++) { for (int i = 0; i < num; i++) {
SpellAbilityView a; SpellAbilityView a;
@@ -1770,7 +1770,7 @@ public class PlayerControllerHuman extends PlayerController implements IGameCont
@Override @Override
public void revealAnte(final String message, final Multimap<Player, PaperCard> removedAnteCards) { public void revealAnte(final String message, final Multimap<Player, PaperCard> removedAnteCards) {
for (final Player p : removedAnteCards.keySet()) { for (final Player p : removedAnteCards.keySet()) {
getGui().reveal(message + " from " + Lang.getPossessedObject(MessageUtil.mayBeYou(player, p), "deck"), getGui().reveal(message + " " + localizer.getMessage("lblFrom") + " " + Lang.getPossessedObject(MessageUtil.mayBeYou(player, p), localizer.getMessage("lblDeck")),
ImmutableList.copyOf(removedAnteCards.get(p))); ImmutableList.copyOf(removedAnteCards.get(p)));
} }
} }
@@ -2008,7 +2008,7 @@ public class PlayerControllerHuman extends PlayerController implements IGameCont
public void generateMana() { public void generateMana() {
final Player pPriority = game.getPhaseHandler().getPriorityPlayer(); final Player pPriority = game.getPhaseHandler().getPriorityPlayer();
if (pPriority == null) { if (pPriority == null) {
getGui().message("No player has priority at the moment, so mana cannot be added to their pool."); getGui().message(localizer.getMessage("lblNoPlayerHasPriorityCannotAddedManaToPool"));
return; return;
} }
@@ -2046,7 +2046,7 @@ public class PlayerControllerHuman extends PlayerController implements IGameCont
state.initFromGame(game); state.initFromGame(game);
final File f = GuiBase.getInterface().getSaveFile(new File(ForgeConstants.USER_GAMES_DIR, "state.txt")); final File f = GuiBase.getInterface().getSaveFile(new File(ForgeConstants.USER_GAMES_DIR, "state.txt"));
if (f != null if (f != null
&& (!f.exists() || getGui().showConfirmDialog("Overwrite existing file?", "File exists!"))) { && (!f.exists() || getGui().showConfirmDialog(localizer.getMessage("lblOverwriteExistFileConfirm"), localizer.getMessage("lblFileExists")))) {
try (BufferedWriter bw = new BufferedWriter(new FileWriter(f))) { try (BufferedWriter bw = new BufferedWriter(new FileWriter(f))) {
bw.write(state.toString()); bw.write(state.toString());
} }
@@ -2074,7 +2074,7 @@ public class PlayerControllerHuman extends PlayerController implements IGameCont
gamesDir.mkdir(); gamesDir.mkdir();
} }
final String filename = GuiBase.getInterface().showFileDialog("Select Game State File", final String filename = GuiBase.getInterface().showFileDialog(localizer.getMessage("lblSelectGameStateFile"),
ForgeConstants.USER_GAMES_DIR); ForgeConstants.USER_GAMES_DIR);
if (filename == null) { if (filename == null) {
return; return;
@@ -2086,7 +2086,7 @@ public class PlayerControllerHuman extends PlayerController implements IGameCont
state.parse(fstream); state.parse(fstream);
fstream.close(); fstream.close();
} catch (final FileNotFoundException fnfe) { } catch (final FileNotFoundException fnfe) {
SOptionPane.showErrorDialog("File not found: " + filename); SOptionPane.showErrorDialog(localizer.getMessage("lblFileNotFound") + ": " + filename);
return; return;
} catch (final Exception e) { } catch (final Exception e) {
SOptionPane.showErrorDialog(localizer.getMessage("lblErrorLoadingBattleSetupFile")); SOptionPane.showErrorDialog(localizer.getMessage("lblErrorLoadingBattleSetupFile"));
@@ -2356,11 +2356,11 @@ public class PlayerControllerHuman extends PlayerController implements IGameCont
private void addCardToZone(ZoneType zone, final boolean repeatLast, final boolean noTriggers) { private void addCardToZone(ZoneType zone, final boolean repeatLast, final boolean noTriggers) {
final ZoneType targetZone = repeatLast ? lastAddedZone : zone; final ZoneType targetZone = repeatLast ? lastAddedZone : zone;
String zoneStr = targetZone != ZoneType.Battlefield ? "in " + targetZone.name().toLowerCase() String zoneStr = targetZone != ZoneType.Battlefield ? localizer.getMessage("lblIn") + " " + targetZone.name().toLowerCase()
: noTriggers ? "on the battlefield" : "on the stack / in play"; : noTriggers ? localizer.getMessage("lblOnTheBattlefield") : localizer.getMessage("lblOnTheStackOrInPlay");
final Player p = repeatLast ? lastAddedPlayer final Player p = repeatLast ? lastAddedPlayer
: game.getPlayer(getGui().oneOrNone("Put card " + zoneStr + " for which player?", : game.getPlayer(getGui().oneOrNone(localizer.getMessage("lblPutCard") + " " + zoneStr + " " + localizer.getMessage("lblForWhichPlayer"),
PlayerView.getCollection(game.getPlayers()))); PlayerView.getCollection(game.getPlayers())));
if (p == null) { if (p == null) {
return; return;
@@ -2391,7 +2391,7 @@ public class PlayerControllerHuman extends PlayerController implements IGameCont
lastSummoningSickness = true; lastSummoningSickness = true;
} else { } else {
lastSummoningSickness = getGui().confirm(forgeCard.getView(), lastSummoningSickness = getGui().confirm(forgeCard.getView(),
TextUtil.concatWithSpace("Should", forgeCard.toString(), "be affected with Summoning Sickness?")); TextUtil.concatWithSpace(localizer.getMessage("lblShould"), forgeCard.toString(), localizer.getMessage("lblAffectedWithSummoningSickness")));
} }
} }
} }
@@ -2420,7 +2420,7 @@ public class PlayerControllerHuman extends PlayerController implements IGameCont
if (choices.size() == 1) { if (choices.size() == 1) {
sa = choices.iterator().next(); sa = choices.iterator().next();
} else { } else {
sa = repeatLast ? lastAddedSA : getGui().oneOrNone("Choose", (FCollection<SpellAbility>) choices); sa = repeatLast ? lastAddedSA : getGui().oneOrNone(localizer.getMessage("lblChoose"), (FCollection<SpellAbility>) choices);
} }
if (sa == null) { if (sa == null) {
return; // happens if cancelled return; // happens if cancelled
@@ -2441,7 +2441,7 @@ public class PlayerControllerHuman extends PlayerController implements IGameCont
} else if (targetZone == ZoneType.Library) { } else if (targetZone == ZoneType.Library) {
if (!repeatLast) { if (!repeatLast) {
lastTopOfTheLibrary = getGui().confirm(forgeCard.getView(), lastTopOfTheLibrary = getGui().confirm(forgeCard.getView(),
TextUtil.concatWithSpace("Should", forgeCard.toString(), "be added to the top or to the bottom of the library?"), true, Arrays.asList("Top", "Bottom")); TextUtil.concatWithSpace(localizer.getMessage("lblShould"), forgeCard.toString(), localizer.getMessage("lblBeAddedToLibraryTopOrBottom")), true, Arrays.asList(localizer.getMessage("lblTop"), localizer.getMessage("lblBottom")));
} }
if (lastTopOfTheLibrary) { if (lastTopOfTheLibrary) {
game.getAction().moveToLibrary(forgeCard, null); game.getAction().moveToLibrary(forgeCard, null);
@@ -2467,7 +2467,7 @@ public class PlayerControllerHuman extends PlayerController implements IGameCont
*/ */
@Override @Override
public void exileCardsFromHand() { public void exileCardsFromHand() {
final Player p = game.getPlayer(getGui().oneOrNone("Exile card(s) from which player's hand?", final Player p = game.getPlayer(getGui().oneOrNone(localizer.getMessage("lblExileCardsFromPlayerHandConfirm"),
PlayerView.getCollection(game.getPlayers()))); PlayerView.getCollection(game.getPlayers())));
if (p == null) { if (p == null) {
return; return;
@@ -2476,7 +2476,7 @@ public class PlayerControllerHuman extends PlayerController implements IGameCont
final CardCollection selection; final CardCollection selection;
CardCollectionView cardsInHand = p.getCardsIn(ZoneType.Hand); CardCollectionView cardsInHand = p.getCardsIn(ZoneType.Hand);
selection = game.getCardList(getGui().many("Choose cards to exile", "Discarded", 0, -1, selection = game.getCardList(getGui().many(localizer.getMessage("lblChooseCardsExile"), localizer.getMessage("lblDiscarded"), 0, -1,
CardView.getCollection(cardsInHand), null)); CardView.getCollection(cardsInHand), null));
if (selection != null && selection.size() > 0) { if (selection != null && selection.size() > 0) {
@@ -2502,7 +2502,7 @@ public class PlayerControllerHuman extends PlayerController implements IGameCont
*/ */
@Override @Override
public void exileCardsFromBattlefield() { public void exileCardsFromBattlefield() {
final Player p = game.getPlayer(getGui().oneOrNone("Exile card(s) from which player's battlefield?", final Player p = game.getPlayer(getGui().oneOrNone(localizer.getMessage("lblExileCardsFromPlayerBattlefieldConfirm"),
PlayerView.getCollection(game.getPlayers()))); PlayerView.getCollection(game.getPlayers())));
if (p == null) { if (p == null) {
return; return;
@@ -2511,7 +2511,7 @@ public class PlayerControllerHuman extends PlayerController implements IGameCont
final CardCollection selection; final CardCollection selection;
CardCollectionView cardsInPlay = p.getCardsIn(ZoneType.Battlefield); CardCollectionView cardsInPlay = p.getCardsIn(ZoneType.Battlefield);
selection = game.getCardList(getGui().many("Choose cards to exile", "Discarded", 0, -1, selection = game.getCardList(getGui().many(localizer.getMessage("lblChooseCardsExile"), localizer.getMessage("lblDiscarded"), 0, -1,
CardView.getCollection(cardsInPlay), null)); CardView.getCollection(cardsInPlay), null));
if (selection != null && selection.size() > 0) { if (selection != null && selection.size() > 0) {
@@ -2537,19 +2537,19 @@ public class PlayerControllerHuman extends PlayerController implements IGameCont
*/ */
@Override @Override
public void removeCardsFromGame() { public void removeCardsFromGame() {
final Player p = game.getPlayer(getGui().oneOrNone("Remove card(s) belonging to which player?", final Player p = game.getPlayer(getGui().oneOrNone(localizer.getMessage("lblRemoveCardBelongingWitchPlayer"),
PlayerView.getCollection(game.getPlayers()))); PlayerView.getCollection(game.getPlayers())));
if (p == null) { if (p == null) {
return; return;
} }
final String zone = getGui().one("Remove card(s) from which zone?", final String zone = getGui().one(localizer.getMessage("lblRemoveCardFromWhichZone"),
Arrays.asList("Hand", "Battlefield", "Library", "Graveyard", "Exile")); Arrays.asList("Hand", "Battlefield", "Library", "Graveyard", "Exile"));
final CardCollection selection; final CardCollection selection;
CardCollectionView cards = p.getCardsIn(ZoneType.smartValueOf(zone)); CardCollectionView cards = p.getCardsIn(ZoneType.smartValueOf(zone));
selection = game.getCardList(getGui().many("Choose cards to remove from game", "Removed", 0, -1, selection = game.getCardList(getGui().many(localizer.getMessage("lblChooseCardsRemoveFromGame"), localizer.getMessage("lblRemoved"), 0, -1,
CardView.getCollection(cards), null)); CardView.getCollection(cards), null));
if (selection != null && selection.size() > 0) { if (selection != null && selection.size() > 0) {
@@ -2687,14 +2687,14 @@ public class PlayerControllerHuman extends PlayerController implements IGameCont
// A more informative prompt would be useful, but the dialog seems // A more informative prompt would be useful, but the dialog seems
// to // to
// like to clip text in long messages... // like to clip text in long messages...
final String prompt = "Enter a sequence (card IDs and/or \"opponent\"/\"me\"). (e.g. 7, opponent, 18)"; final String prompt = localizer.getMessage("lblEnterASequence");
String textSequence = getGui().showInputDialog(prompt, dialogTitle, FSkinProp.ICO_QUEST_NOTES, String textSequence = getGui().showInputDialog(prompt, dialogTitle, FSkinProp.ICO_QUEST_NOTES,
rememberedSequenceText); rememberedSequenceText);
if (textSequence == null || textSequence.trim().isEmpty()) { if (textSequence == null || textSequence.trim().isEmpty()) {
rememberedActions.clear(); rememberedActions.clear();
if (!rememberedSequenceText.isEmpty()) { if (!rememberedSequenceText.isEmpty()) {
rememberedSequenceText = ""; rememberedSequenceText = "";
getGui().message("Action sequence cleared.", dialogTitle); getGui().message(localizer.getMessage("lblActionSequenceCleared"), dialogTitle);
} }
return; return;
} }
@@ -2703,7 +2703,7 @@ public class PlayerControllerHuman extends PlayerController implements IGameCont
// but don't change rememberedActions. // but don't change rememberedActions.
if (textSequence.equals(rememberedSequenceText)) { if (textSequence.equals(rememberedSequenceText)) {
if (currentIndex > 0 && currentIndex < rememberedActions.size()) { if (currentIndex > 0 && currentIndex < rememberedActions.size()) {
getGui().message("Restarting action sequence.", dialogTitle); getGui().message(localizer.getMessage("lblRestartingActionSequence"), dialogTitle);
} }
return; return;
} }
@@ -2731,7 +2731,7 @@ public class PlayerControllerHuman extends PlayerController implements IGameCont
} }
} }
if (entityInfo.isEmpty()) { if (entityInfo.isEmpty()) {
getGui().message("Error: Check IDs and ensure they're separated by spaces and/or commas.", dialogTitle); getGui().message(localizer.getMessage("lblErrorPleaseCheckID"), dialogTitle);
return; return;
} }
@@ -2762,7 +2762,7 @@ public class PlayerControllerHuman extends PlayerController implements IGameCont
} }
} }
if (!found) { if (!found) {
getGui().message("Error: Entity with ID " + entity.getKey() + " not found.", dialogTitle); getGui().message(localizer.getMessage("lblErrorEntityWithId") + " " + entity.getKey() + " " + localizer.getMessage("lblNotFound") + ".", dialogTitle);
rememberedActions.clear(); rememberedActions.clear();
return; return;
} }