mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18:00 +00:00
translate some text
This commit is contained in:
@@ -30,7 +30,7 @@ public class MessageUtil {
|
|||||||
// These are not much related to PlayerController
|
// These are not much related to PlayerController
|
||||||
public static String formatNotificationMessage(SpellAbility sa, Player player, GameObject target, String value) {
|
public static String formatNotificationMessage(SpellAbility sa, Player player, GameObject target, String value) {
|
||||||
if (sa == null || sa.getApi() == null || sa.getHostCard() == null) {
|
if (sa == null || sa.getApi() == null || sa.getHostCard() == null) {
|
||||||
return ("Result: " + value);
|
return Localizer.getInstance().getMessage("lblResultIs", value);
|
||||||
}
|
}
|
||||||
String choser = StringUtils.capitalize(mayBeYou(player, target));
|
String choser = StringUtils.capitalize(mayBeYou(player, target));
|
||||||
switch(sa.getApi()) {
|
switch(sa.getApi()) {
|
||||||
@@ -41,26 +41,26 @@ public class MessageUtil {
|
|||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
return sa.hasParam("Random")
|
return sa.hasParam("Random")
|
||||||
? TextUtil.concatWithSpace("Randomly chosen number for", mayBeYou(player, target),"is", value)
|
? Localizer.getInstance().getMessage("lblPlayerRandomChosenNumberIs", mayBeYou(player, target), value)
|
||||||
: TextUtil.concatWithSpace( mayBeYou(player, target),"chooses number:", value);
|
: Localizer.getInstance().getMessage("lblPlayerChoosesNumberIs", mayBeYou(player, target), value);
|
||||||
case ChooseType:
|
case ChooseType:
|
||||||
return TextUtil.concatWithSpace(choser, Lang.joinVerb(choser, "choose"), value, "for effect of", sa.getHostCard().getName());
|
return Localizer.getInstance().getMessage("lblPlayerChooseValueOfEffectOfCard", choser, value, CardTranslation.getTranslatedName(sa.getHostCard().getName()));
|
||||||
case FlipACoin:
|
case FlipACoin:
|
||||||
String flipper = StringUtils.capitalize(mayBeYou(player, target));
|
String flipper = StringUtils.capitalize(mayBeYou(player, target));
|
||||||
return sa.hasParam("NoCall")
|
return sa.hasParam("NoCall")
|
||||||
? TextUtil.concatWithSpace(Lang.getPossesive(flipper),"flip comes up", value)
|
? Localizer.getInstance().getMessage("lblPlayerFlipComesUpValue", Lang.getPossesive(flipper), value)
|
||||||
: TextUtil.concatWithSpace(flipper, Lang.joinVerb(flipper, value), "the flip");
|
: Localizer.getInstance().getMessage("lblPlayerActionFlip", flipper, Lang.joinVerb(flipper, value));
|
||||||
case Protection:
|
case Protection:
|
||||||
return TextUtil.concatWithSpace(choser, Lang.joinVerb(choser, "choose"), value);
|
return Localizer.getInstance().getMessage("lblPlayerChooseValue", choser, value);
|
||||||
case Vote:
|
case Vote:
|
||||||
String chooser = StringUtils.capitalize(mayBeYou(player, target));
|
String chooser = StringUtils.capitalize(mayBeYou(player, target));
|
||||||
return TextUtil.concatWithSpace(chooser, Lang.joinVerb(chooser,"vote"), value);
|
return Localizer.getInstance().getMessage("lblPlayerVoteValue", chooser, value);
|
||||||
default:
|
default:
|
||||||
String tgt = mayBeYou(player, target);
|
String tgt = mayBeYou(player, target);
|
||||||
if (tgt.equals("(null)")) {
|
if (tgt.equals("(null)")) {
|
||||||
return TextUtil.concatWithSpace(sa.getHostCard().getName(),"effect's value is", value);
|
return Localizer.getInstance().getMessage("lblCardEffectValueIs", CardTranslation.getTranslatedName(sa.getHostCard().getName()), value);
|
||||||
} else {
|
} else {
|
||||||
return TextUtil.concatWithSpace(sa.getHostCard().getName(),"effect's value for", tgt,"is", value);
|
return Localizer.getInstance().getMessage("lblCardEffectToTargetValueIs", CardTranslation.getTranslatedName(sa.getHostCard().getName()), tgt, value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -530,7 +530,7 @@ public class MatchController extends AbstractGuiGame {
|
|||||||
public boolean confirm(final CardView c, final String question, final boolean defaultIsYes, final List<String> options) {
|
public boolean confirm(final CardView c, final String question, final boolean defaultIsYes, final List<String> options) {
|
||||||
final List<String> optionsToUse;
|
final List<String> optionsToUse;
|
||||||
if (options == null) {
|
if (options == null) {
|
||||||
optionsToUse = ImmutableList.of("Yes", "No");
|
optionsToUse = ImmutableList.of(Localizer.getInstance().getMessage("lblYes"), Localizer.getInstance().getMessage("lblNo"));
|
||||||
} else {
|
} else {
|
||||||
optionsToUse = options;
|
optionsToUse = options;
|
||||||
}
|
}
|
||||||
@@ -568,7 +568,7 @@ public class MatchController extends AbstractGuiGame {
|
|||||||
}
|
}
|
||||||
|
|
||||||
final Collection<CardView> revealList = delayedReveal.getCards();
|
final Collection<CardView> revealList = delayedReveal.getCards();
|
||||||
final String revealListCaption = StringUtils.capitalize(MessageUtil.formatMessage("{player's} " + delayedReveal.getZone().name(), delayedReveal.getOwner(), delayedReveal.getOwner()));
|
final String revealListCaption = StringUtils.capitalize(MessageUtil.formatMessage("{player's} " + delayedReveal.getZone().getTranslatedName(), delayedReveal.getOwner(), delayedReveal.getOwner()));
|
||||||
final InfoTab revealListTab = MatchController.getView().getPlayerPanels().values().iterator().next().getZoneTab(delayedReveal.getZone());
|
final InfoTab revealListTab = MatchController.getView().getPlayerPanels().values().iterator().next().getZoneTab(delayedReveal.getZone());
|
||||||
final FImage revealListImage = revealListTab != null ? revealListTab.getIcon() : null;
|
final FImage revealListImage = revealListTab != null ? revealListTab.getIcon() : null;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user