mirror of
https://github.com/Melledy/Grasscutter.git
synced 2024-11-27 10:55:56 +00:00
Update translation keys to fix issues 648 677
fix issues 648 677
This commit is contained in:
parent
e6cf27056f
commit
a63d87b0bc
@ -150,7 +150,7 @@ public final class CommandMap {
|
|||||||
int uid = Integer.parseInt(targetUidStr);
|
int uid = Integer.parseInt(targetUidStr);
|
||||||
targetPlayer = Grasscutter.getGameServer().getPlayerByUid(uid);
|
targetPlayer = Grasscutter.getGameServer().getPlayerByUid(uid);
|
||||||
if (targetPlayer == null) {
|
if (targetPlayer == null) {
|
||||||
CommandHandler.sendMessage(player, translate("commands.generic.execution.player_exist_offline_error"));
|
CommandHandler.sendMessage(player, translate("commands.execution.player_exist_offline_error"));
|
||||||
} else {
|
} else {
|
||||||
targetPlayerIds.put(playerId, uid);
|
targetPlayerIds.put(playerId, uid);
|
||||||
CommandHandler.sendMessage(player, translate("commands.execution.set_target", targetUidStr));
|
CommandHandler.sendMessage(player, translate("commands.execution.set_target", targetUidStr));
|
||||||
@ -178,7 +178,7 @@ public final class CommandMap {
|
|||||||
int uid = Integer.parseInt(arg);
|
int uid = Integer.parseInt(arg);
|
||||||
targetPlayer = Grasscutter.getGameServer().getPlayerByUid(uid);
|
targetPlayer = Grasscutter.getGameServer().getPlayerByUid(uid);
|
||||||
if (targetPlayer == null) {
|
if (targetPlayer == null) {
|
||||||
CommandHandler.sendMessage(player, translate("commands.generic.execution.player_exist_offline_error"));
|
CommandHandler.sendMessage(player, translate("commands.execution.player_exist_offline_error"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -194,7 +194,7 @@ public final class CommandMap {
|
|||||||
if (targetPlayerIds.containsKey(playerId)) {
|
if (targetPlayerIds.containsKey(playerId)) {
|
||||||
targetPlayer = Grasscutter.getGameServer().getPlayerByUid(targetPlayerIds.get(playerId)); // We check every time in case the target goes offline after being targeted
|
targetPlayer = Grasscutter.getGameServer().getPlayerByUid(targetPlayerIds.get(playerId)); // We check every time in case the target goes offline after being targeted
|
||||||
if (targetPlayer == null) {
|
if (targetPlayer == null) {
|
||||||
CommandHandler.sendMessage(player, translate("commands.generic.execution.player_exist_offline_error"));
|
CommandHandler.sendMessage(player, translate("commands.execution.player_exist_offline_error"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -31,11 +31,12 @@ public final class ChangeSceneCommand implements CommandHandler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
boolean result = targetPlayer.getWorld().transferPlayerToScene(targetPlayer, sceneId, targetPlayer.getPos());
|
boolean result = targetPlayer.getWorld().transferPlayerToScene(targetPlayer, sceneId, targetPlayer.getPos());
|
||||||
CommandHandler.sendMessage(sender, translate("commands.changescene.result", Integer.toString(sceneId)));
|
|
||||||
|
|
||||||
if (!result) {
|
if (!result) {
|
||||||
CommandHandler.sendMessage(sender, translate("commands.changescene.exists_error"));
|
CommandHandler.sendMessage(sender, translate("commands.changescene.exists_error"));
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CommandHandler.sendMessage(sender, translate("commands.changescene.success", Integer.toString(sceneId)));
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
CommandHandler.sendMessage(sender, translate("commands.execution.argument_error"));
|
CommandHandler.sendMessage(sender, translate("commands.execution.argument_error"));
|
||||||
}
|
}
|
||||||
|
@ -9,7 +9,7 @@ import java.util.List;
|
|||||||
|
|
||||||
import static emu.grasscutter.utils.Language.translate;
|
import static emu.grasscutter.utils.Language.translate;
|
||||||
|
|
||||||
@Command(label = "resetshop", usage = "resetshop", permission = "server.resetshop", permissionTargeted = "server.resetshop.others", description = "commands.status.description")
|
@Command(label = "resetshop", usage = "resetshop", permission = "server.resetshop", permissionTargeted = "server.resetshop.others", description = "commands.resetshop.description")
|
||||||
public final class ResetShopLimitCommand implements CommandHandler {
|
public final class ResetShopLimitCommand implements CommandHandler {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -175,7 +175,7 @@ public final class SetStatsCommand implements CommandHandler {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void execute(Player sender, Player targetPlayer, List<String> args) {
|
public void execute(Player sender, Player targetPlayer, List<String> args) {
|
||||||
String syntax = sender == null ? translate("commands.setStats.usage_console") : translate("commands.setStats.ingame");
|
String syntax = sender == null ? translate("commands.setStats.usage_console") : translate("commands.setStats.usage_ingame");
|
||||||
String usage = syntax + translate("commands.setStats.help_message");
|
String usage = syntax + translate("commands.setStats.help_message");
|
||||||
String statStr;
|
String statStr;
|
||||||
String valueStr;
|
String valueStr;
|
||||||
|
@ -46,13 +46,13 @@ public final class SpawnCommand implements CommandHandler {
|
|||||||
try {
|
try {
|
||||||
amount = Integer.parseInt(args.get(1));
|
amount = Integer.parseInt(args.get(1));
|
||||||
} catch (NumberFormatException ignored) {
|
} catch (NumberFormatException ignored) {
|
||||||
CommandHandler.sendMessage(sender, translate("commands.generic.error.amount"));
|
CommandHandler.sendMessage(sender, translate("commands.generic.invalid.amount"));
|
||||||
} // Fallthrough
|
} // Fallthrough
|
||||||
case 1:
|
case 1:
|
||||||
try {
|
try {
|
||||||
id = Integer.parseInt(args.get(0));
|
id = Integer.parseInt(args.get(0));
|
||||||
} catch (NumberFormatException ignored) {
|
} catch (NumberFormatException ignored) {
|
||||||
CommandHandler.sendMessage(sender, translate("commands.generic.error.entityId"));
|
CommandHandler.sendMessage(sender, translate("commands.generic.invalid.entityId"));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@ -64,7 +64,7 @@ public final class SpawnCommand implements CommandHandler {
|
|||||||
GadgetData gadgetData = GameData.getGadgetDataMap().get(id);
|
GadgetData gadgetData = GameData.getGadgetDataMap().get(id);
|
||||||
ItemData itemData = GameData.getItemDataMap().get(id);
|
ItemData itemData = GameData.getItemDataMap().get(id);
|
||||||
if (monsterData == null && gadgetData == null && itemData == null) {
|
if (monsterData == null && gadgetData == null && itemData == null) {
|
||||||
CommandHandler.sendMessage(sender, translate("commands.generic.error.entityId"));
|
CommandHandler.sendMessage(sender, translate("commands.generic.invalid.entityId"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Scene scene = targetPlayer.getScene();
|
Scene scene = targetPlayer.getScene();
|
||||||
|
@ -10,7 +10,7 @@ import java.util.List;
|
|||||||
import static emu.grasscutter.utils.Language.translate;
|
import static emu.grasscutter.utils.Language.translate;
|
||||||
|
|
||||||
@Command(label = "unlocktower", usage = "unlocktower", aliases = {"ut"},
|
@Command(label = "unlocktower", usage = "unlocktower", aliases = {"ut"},
|
||||||
description = "Unlock all levels of tower", permission = "player.tower")
|
description = "commands.unlocktower.description", permission = "player.tower")
|
||||||
public class UnlockTowerCommand implements CommandHandler {
|
public class UnlockTowerCommand implements CommandHandler {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -21,7 +21,7 @@ public class UnlockTowerCommand implements CommandHandler {
|
|||||||
unlockFloor(sender, sender.getServer().getTowerScheduleManager()
|
unlockFloor(sender, sender.getServer().getTowerScheduleManager()
|
||||||
.getScheduleFloors());
|
.getScheduleFloors());
|
||||||
|
|
||||||
CommandHandler.sendMessage(sender, translate("commands.tower.unlock_done"));
|
CommandHandler.sendMessage(sender, translate("commands.unlocktower.success"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void unlockFloor(Player player, List<Integer> floors){
|
public void unlockFloor(Player player, List<Integer> floors){
|
||||||
|
Loading…
Reference in New Issue
Block a user