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
lblDelveHowManyCards=Wühlen - Wie viele Karten?
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
lblConcedeCurrentGame=Das Spiel wird als verloren gewertet.\n\nTrotzdem aufgeben?
lblConcedeTitle=Spiel verloren geben?
@@ -1557,7 +1613,7 @@ lblGainControl=gain control.
lblReturnToHand=return to hand.
lbldiscard=discard.
lblReveal=reveal
lblTap=tap.
lblTap=tap
lblCurrentCard=Current Card
lblSelectOfCardsTo=Select
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
lblDelveHowManyCards=Delve how many cards?
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
lblConcedeCurrentGame=This will concede the current game and you will lose.\n\nConcede anyway?
lblConcedeTitle=Concede Game?
@@ -1557,7 +1613,7 @@ lblGainControl=gain control.
lblReturnToHand=return to hand.
lbldiscard=discard.
lblReveal=reveal
lblTap=tap.
lblTap=tap
lblCurrentCard=Current Card
lblSelectOfCardsTo=Select
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
lblDelveHowManyCards=¿Excavar cuántas cartas?
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
lblConcedeCurrentGame=Esto concederá la partida actual y perderás.\n\n¿Conceder de todos modos?
lblConcedeTitle=¿Conceder Partida?
@@ -1557,7 +1613,7 @@ lblGainControl=gain control.
lblReturnToHand=return to hand.
lbldiscard=discard.
lblReveal=reveal
lblTap=tap.
lblTap=tap
lblCurrentCard=Current Card
lblSelectOfCardsTo=Select
lblCardsTo=card(s) to

View File

@@ -1188,6 +1188,62 @@ lblChooseOrderCardsPutIntoSchemeDeck=选择要放入魔王套牌中的牌的顺
lblChooseOrderCopiesCast=选择要复制品的释放顺序。
lblDelveHowManyCards=掘穴多少张牌?
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
lblConcedeCurrentGame=这局游戏认输。\n\n确认吗
lblConcedeTitle=这局游戏认输?
@@ -1557,7 +1613,7 @@ lblGainControl=获得控制权。
lblReturnToHand=返回手牌。
lbldiscard=弃牌。
lblReveal=展示
lblTap=横置
lblTap=横置
lblCurrentCard=当前牌
lblSelectOfCardsTo=选择
lblCardsTo=牌到
@@ -1593,7 +1649,7 @@ lblDoYouWantMove=你想要移动
lblDeclareDefenderFor=声明阻挡者
lblCardMatchSearchingTypeInAlternateZones=在你的备用区域搜索匹配类型的卡牌。
lblPutThatCardFrom=放置这张牌从
lblLookingCardIn=这张牌于
lblLookingCardIn=牌自
lblDoYouWantPlay=你想要使用
lblSelectCardFrom=选择一张牌从
lblSelectUpTo=最多选择
@@ -1736,7 +1792,7 @@ lblDoYouWantRepeatProcessAgain=你是否想再次重复这个过程?
#RevealHandEffect.java
lblDoYouWantRevealYourHand=你想展示你的手牌吗?
#RollPlanarDiceEffect.java
lblRolled=rolled
lblRolled=已转动
#SacrificeEffect.java
lblDoYouWantPayEcho=你想支付返响费用
lblPayEcho=支付返响费用

View File

@@ -313,20 +313,20 @@ public class PlayerControllerHuman extends PlayerController implements IGameCont
public Integer announceRequirements(final SpellAbility ability, final String announce,
final boolean canChooseZero) {
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);
}
@Override
public CardCollectionView choosePermanentsToSacrifice(final SpellAbility sa, final int min, final int max,
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
public CardCollectionView choosePermanentsToDestroy(final SpellAbility sa, final int min, final int max,
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,
@@ -336,11 +336,11 @@ public class PlayerControllerHuman extends PlayerController implements IGameCont
return CardCollection.EMPTY;
}
final StringBuilder builder = new StringBuilder("Select ");
final StringBuilder builder = new StringBuilder(localizer.getMessage("lblSelectOfCardsTo") + " ");
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);
inp.setMessage(builder.toString());
@@ -396,12 +396,12 @@ public class PlayerControllerHuman extends PlayerController implements IGameCont
getGui().setPanelSelection(CardView.get(sa.getHostCard()));
if (useSelectCardsInput(sourceList)) {
tempShowCards(sourceList);
tempShowCards(sourceList);
final InputSelectCardsFromList sc = new InputSelectCardsFromList(this, min, max, sourceList, sa);
sc.setMessage(title);
sc.setCancelAllowed(isOptional);
sc.showAndWait();
endTempShowCards();
endTempShowCards();
return new CardCollection(sc.getSelected());
}
@@ -454,7 +454,7 @@ public class PlayerControllerHuman extends PlayerController implements IGameCont
input.setCancelAllowed(isOptional);
input.setMessage(MessageUtil.formatMessage(title, player, targetedPlayer));
input.showAndWait();
endTempShowCards();
endTempShowCards();
return Iterables.getFirst(input.getSelected(), null);
}
@@ -493,7 +493,7 @@ public class PlayerControllerHuman extends PlayerController implements IGameCont
input.setCancelAllowed(true);
input.setMessage(MessageUtil.formatMessage(title, player, targetedPlayer));
input.showAndWait();
endTempShowCards();
endTempShowCards();
return (List<T>) input.getSelected();
}
final List<GameEntityView> chosen = getGui().chooseEntitiesForEffect(title,
@@ -597,7 +597,7 @@ public class PlayerControllerHuman extends PlayerController implements IGameCont
@Override
public boolean confirmBidAction(final SpellAbility sa, final PlayerActionConfirmMode bidlife, final String string,
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
@@ -623,7 +623,7 @@ public class PlayerControllerHuman extends PlayerController implements IGameCont
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("?");
if (!FModel.getPreferences().getPrefBoolean(FPref.UI_COMPACT_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> 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<>();
for (CardView cardView : chosen) {
chosenCards.add(mapCVtoC.get(cardView));
@@ -723,7 +723,7 @@ public class PlayerControllerHuman extends PlayerController implements IGameCont
@Override
public void reveal(final List<CardView> cards, final ZoneType zone, final PlayerView owner, String 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 {
message += "{player's} " + zone.name().toLowerCase();
}
@@ -733,7 +733,7 @@ public class PlayerControllerHuman extends PlayerController implements IGameCont
getGui().reveal(fm, cards);
endTempShowCards();
} 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);
}
}
@@ -748,12 +748,12 @@ public class PlayerControllerHuman extends PlayerController implements IGameCont
CardCollection toBottom = new CardCollection();
CardCollection toTop = new CardCollection();
for (int i = 0; i<cards.size() && manipulable.contains(result.get(i)) ; i++ ) {
toTop.add(result.get(i));
toTop.add(result.get(i));
}
if (toTop.size() < cards.size()) { // the top isn't everything
for (int i = result.size()-1; i>=0 && manipulable.contains(result.get(i)); i-- ) {
for (int i = result.size()-1; i>=0 && manipulable.contains(result.get(i)); i-- ) {
toBottom.add(result.get(i));
}
}
}
return ImmutablePair.of(toTop,toBottom);
}
@@ -764,34 +764,34 @@ public class PlayerControllerHuman extends PlayerController implements IGameCont
CardCollection toTop = null;
tempShowCards(topN);
if ( FModel.getPreferences().getPrefBoolean(FPref.UI_SELECT_FROM_CARD_DISPLAYS) &&
(!GuiBase.getInterface().isLibgdxPort()) ) {
CardCollectionView cardList = player.getCardsIn(ZoneType.Library);
ImmutablePair<CardCollection, CardCollection> result =
arrangeForMove(localizer.getMessage("lblMoveCardstoToporBbottomofLibrary"), cardList, topN, true, true);
toTop = result.getLeft();
toBottom = result.getRight();
} else {
if (topN.size() == 1) {
if (willPutCardOnTop(topN.get(0))) {
toTop = topN;
} else {
toBottom = topN;
}
} else {
toBottom = game.getCardList(getGui().many(localizer.getMessage("lblSelectCardsToBeOutOnTheBottomOfYourLibrary"),
localizer.getMessage("lblCardsToPutOnTheBottom"), -1, CardView.getCollection(topN), null));
topN.removeAll(toBottom);
if (topN.isEmpty()) {
toTop = null;
} else if (topN.size() == 1) {
toTop = topN;
} else {
toTop = game.getCardList(getGui().order(localizer.getMessage("lblArrangeCardsToBePutOnTopOfYourLibrary"),
localizer.getMessage("lblTopOfLibrary"), CardView.getCollection(topN), null));
}
}
}
if ( FModel.getPreferences().getPrefBoolean(FPref.UI_SELECT_FROM_CARD_DISPLAYS) &&
(!GuiBase.getInterface().isLibgdxPort()) ) {
CardCollectionView cardList = player.getCardsIn(ZoneType.Library);
ImmutablePair<CardCollection, CardCollection> result =
arrangeForMove(localizer.getMessage("lblMoveCardstoToporBbottomofLibrary"), cardList, topN, true, true);
toTop = result.getLeft();
toBottom = result.getRight();
} else {
if (topN.size() == 1) {
if (willPutCardOnTop(topN.get(0))) {
toTop = topN;
} else {
toBottom = topN;
}
} else {
toBottom = game.getCardList(getGui().many(localizer.getMessage("lblSelectCardsToBeOutOnTheBottomOfYourLibrary"),
localizer.getMessage("lblCardsToPutOnTheBottom"), -1, CardView.getCollection(topN), null));
topN.removeAll(toBottom);
if (topN.isEmpty()) {
toTop = null;
} else if (topN.size() == 1) {
toTop = topN;
} else {
toTop = game.getCardList(getGui().order(localizer.getMessage("lblArrangeCardsToBePutOnTopOfYourLibrary"),
localizer.getMessage("lblTopOfLibrary"), CardView.getCollection(topN), null));
}
}
}
endTempShowCards();
return ImmutablePair.of(toTop, toBottom);
}
@@ -809,8 +809,8 @@ public class PlayerControllerHuman extends PlayerController implements IGameCont
tempShowCard(c);
getGui().setCard(view);
boolean result = false;
result = InputConfirm.confirm(this, view, TextUtil.concatNoSpace("Put ", view.toString(), " on the top of library or graveyard?"),
true, ImmutableList.of("Library", "Graveyard"));
result = InputConfirm.confirm(this, view, TextUtil.concatNoSpace(localizer.getMessage("lblPut") + " ", view.toString(), " " + localizer.getMessage("lblOnTheTopLibraryOrGraveyard")),
true, ImmutableList.of(localizer.getMessage("lblLibrary"), localizer.getMessage("lblGraveyard")));
if (result) {
toTop = topN;
} else {
@@ -842,7 +842,7 @@ public class PlayerControllerHuman extends PlayerController implements IGameCont
boolean result = false;
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();
return result;
@@ -1020,9 +1020,9 @@ public class PlayerControllerHuman extends PlayerController implements IGameCont
for (int i = 0; i < manaChoices.size(); i++) {
final Mana m = manaChoices.get(i);
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];
return manaChoices.get(Integer.parseInt(idx) - 1);
}
@@ -1044,9 +1044,9 @@ public class PlayerControllerHuman extends PlayerController implements IGameCont
sortCreatureTypes(types);
}
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
@@ -1374,28 +1374,28 @@ public class PlayerControllerHuman extends PlayerController implements IGameCont
final List<String> labels;
switch (kindOfChoice) {
case HeadsOrTails:
labels = ImmutableList.of("Heads", "Tails");
labels = ImmutableList.of(localizer.getMessage("lblHeads"), localizer.getMessage("lblTails"));
break;
case TapOrUntap:
labels = ImmutableList.of("Tap", "Untap");
labels = ImmutableList.of(localizer.getMessage("lblTap"), localizer.getMessage("lblUntap"));
break;
case OddsOrEvens:
labels = ImmutableList.of("Odds", "Evens");
labels = ImmutableList.of(localizer.getMessage("lblOdds"), localizer.getMessage("lblEvens"));
break;
case UntapOrLeaveTapped:
labels = ImmutableList.of("Untap", "Leave tapped");
labels = ImmutableList.of(localizer.getMessage("lblUntap"), localizer.getMessage("lblLeaveTapped"));
break;
case UntapTimeVault:
labels = ImmutableList.of("Untap (and skip this turn)", "Leave tapped");
labels = ImmutableList.of(localizer.getMessage("lblUntapAndSkipThisTurn"), localizer.getMessage("lblLeaveTapped"));
break;
case PlayOrDraw:
labels = ImmutableList.of("Play", "Draw");
labels = ImmutableList.of(localizer.getMessage("lblPlay"), localizer.getMessage("lblDraw"));
break;
case LeftOrRight:
labels = ImmutableList.of("Left", "Right");
labels = ImmutableList.of(localizer.getMessage("lblLeft"), localizer.getMessage("lblRight"));
break;
case AddOrRemove:
labels = ImmutableList.of("Add Counter", "Remove Counter");
labels = ImmutableList.of(localizer.getMessage("lblAddCounter"), localizer.getMessage("lblRemoveCounter"));
break;
default:
labels = ImmutableList.copyOf(kindOfChoice.toString().split("Or"));
@@ -1407,8 +1407,8 @@ public class PlayerControllerHuman extends PlayerController implements IGameCont
@Override
public boolean chooseFlipResult(final SpellAbility sa, final Player flipper, final boolean[] results,
final boolean call) {
final String[] labelsSrc = call ? new String[] { "heads", "tails" }
: new String[] { "win the flip", "lose the flip" };
final String[] labelsSrc = call ? new String[] { localizer.getMessage("lblHeads"), localizer.getMessage("lblTails") }
: new String[] { localizer.getMessage("lblWinTheFlip"), localizer.getMessage("lblLoseTheFlip") };
final List<String> sortedResults = new ArrayList<String>();
for (boolean result : results) {
sortedResults.add(labelsSrc[result ? 0 : 1]);
@@ -1418,13 +1418,13 @@ public class PlayerControllerHuman extends PlayerController implements IGameCont
if (!call) {
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
public Card chooseProtectionShield(final GameEntity entityBeingDamaged, final List<String> options,
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));
}
@@ -1486,8 +1486,8 @@ public class PlayerControllerHuman extends PlayerController implements IGameCont
game.getTracker().freeze(); // refreeze if the tracker was frozen prior to this update
}
final List<SpellAbilityView> choices = new ArrayList<>(spellViewCache.keySet());
final String modeTitle = TextUtil.concatNoSpace(sa.getActivatingPlayer().toString(), " activated ",
sa.getHostCard().toString(), " - Choose a mode");
final String modeTitle = TextUtil.concatNoSpace(sa.getActivatingPlayer().toString(), " " + localizer.getMessage("lblActivated") + " ",
sa.getHostCard().toString(), " - " + localizer.getMessage("lblChooseAMode"));
final List<AbilitySub> chosen = Lists.newArrayListWithCapacity(num);
for (int i = 0; i < num; i++) {
SpellAbilityView a;
@@ -1770,7 +1770,7 @@ public class PlayerControllerHuman extends PlayerController implements IGameCont
@Override
public void revealAnte(final String message, final Multimap<Player, PaperCard> removedAnteCards) {
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)));
}
}
@@ -2008,7 +2008,7 @@ public class PlayerControllerHuman extends PlayerController implements IGameCont
public void generateMana() {
final Player pPriority = game.getPhaseHandler().getPriorityPlayer();
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;
}
@@ -2046,7 +2046,7 @@ public class PlayerControllerHuman extends PlayerController implements IGameCont
state.initFromGame(game);
final File f = GuiBase.getInterface().getSaveFile(new File(ForgeConstants.USER_GAMES_DIR, "state.txt"));
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))) {
bw.write(state.toString());
}
@@ -2074,7 +2074,7 @@ public class PlayerControllerHuman extends PlayerController implements IGameCont
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);
if (filename == null) {
return;
@@ -2086,7 +2086,7 @@ public class PlayerControllerHuman extends PlayerController implements IGameCont
state.parse(fstream);
fstream.close();
} catch (final FileNotFoundException fnfe) {
SOptionPane.showErrorDialog("File not found: " + filename);
SOptionPane.showErrorDialog(localizer.getMessage("lblFileNotFound") + ": " + filename);
return;
} catch (final Exception e) {
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) {
final ZoneType targetZone = repeatLast ? lastAddedZone : zone;
String zoneStr = targetZone != ZoneType.Battlefield ? "in " + targetZone.name().toLowerCase()
: noTriggers ? "on the battlefield" : "on the stack / in play";
String zoneStr = targetZone != ZoneType.Battlefield ? localizer.getMessage("lblIn") + " " + targetZone.name().toLowerCase()
: noTriggers ? localizer.getMessage("lblOnTheBattlefield") : localizer.getMessage("lblOnTheStackOrInPlay");
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())));
if (p == null) {
return;
@@ -2391,7 +2391,7 @@ public class PlayerControllerHuman extends PlayerController implements IGameCont
lastSummoningSickness = true;
} else {
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) {
sa = choices.iterator().next();
} else {
sa = repeatLast ? lastAddedSA : getGui().oneOrNone("Choose", (FCollection<SpellAbility>) choices);
sa = repeatLast ? lastAddedSA : getGui().oneOrNone(localizer.getMessage("lblChoose"), (FCollection<SpellAbility>) choices);
}
if (sa == null) {
return; // happens if cancelled
@@ -2441,7 +2441,7 @@ public class PlayerControllerHuman extends PlayerController implements IGameCont
} else if (targetZone == ZoneType.Library) {
if (!repeatLast) {
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) {
game.getAction().moveToLibrary(forgeCard, null);
@@ -2467,7 +2467,7 @@ public class PlayerControllerHuman extends PlayerController implements IGameCont
*/
@Override
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())));
if (p == null) {
return;
@@ -2476,7 +2476,7 @@ public class PlayerControllerHuman extends PlayerController implements IGameCont
final CardCollection selection;
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));
if (selection != null && selection.size() > 0) {
@@ -2502,7 +2502,7 @@ public class PlayerControllerHuman extends PlayerController implements IGameCont
*/
@Override
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())));
if (p == null) {
return;
@@ -2511,7 +2511,7 @@ public class PlayerControllerHuman extends PlayerController implements IGameCont
final CardCollection selection;
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));
if (selection != null && selection.size() > 0) {
@@ -2537,19 +2537,19 @@ public class PlayerControllerHuman extends PlayerController implements IGameCont
*/
@Override
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())));
if (p == null) {
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"));
final CardCollection selection;
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));
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
// to
// 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,
rememberedSequenceText);
if (textSequence == null || textSequence.trim().isEmpty()) {
rememberedActions.clear();
if (!rememberedSequenceText.isEmpty()) {
rememberedSequenceText = "";
getGui().message("Action sequence cleared.", dialogTitle);
getGui().message(localizer.getMessage("lblActionSequenceCleared"), dialogTitle);
}
return;
}
@@ -2703,7 +2703,7 @@ public class PlayerControllerHuman extends PlayerController implements IGameCont
// but don't change rememberedActions.
if (textSequence.equals(rememberedSequenceText)) {
if (currentIndex > 0 && currentIndex < rememberedActions.size()) {
getGui().message("Restarting action sequence.", dialogTitle);
getGui().message(localizer.getMessage("lblRestartingActionSequence"), dialogTitle);
}
return;
}
@@ -2731,7 +2731,7 @@ public class PlayerControllerHuman extends PlayerController implements IGameCont
}
}
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;
}
@@ -2762,7 +2762,7 @@ public class PlayerControllerHuman extends PlayerController implements IGameCont
}
}
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();
return;
}