feat(C-01): i18n main commands — 148 translatable keys
Phase 3: Migrate Component.literal() in all remaining command files. - NPCCommand (34), CellCommand (33), SocialCommand (16), CollarCommand (25), KeyCommand (18), BountyCommand (6), KidnapSetCommand (2), CaptivityDebugCommand (7), InventorySubCommand (3), TestAnimSubCommand (2), MasterTestSubCommand (7), DebtSubCommand (8) - Strip all section sign color codes, use .withStyle(ChatFormatting) - 148 new keys in en_us.json (command.tiedup.*) - Debug/dynamic strings intentionally kept as literal
This commit is contained in:
@@ -77,7 +77,7 @@ public class MasterTestSubCommand {
|
||||
context
|
||||
.getSource()
|
||||
.sendFailure(
|
||||
Component.literal("Failed to create Master entity")
|
||||
Component.translatable("command.tiedup.master.spawn_failed")
|
||||
);
|
||||
return 0;
|
||||
}
|
||||
@@ -108,10 +108,8 @@ public class MasterTestSubCommand {
|
||||
.getSource()
|
||||
.sendSuccess(
|
||||
() ->
|
||||
Component.literal(
|
||||
"Spawned Master '" +
|
||||
finalName +
|
||||
"' \u2014 you are now their pet."
|
||||
Component.translatable(
|
||||
"command.tiedup.master.spawned", finalName
|
||||
),
|
||||
true
|
||||
);
|
||||
@@ -133,7 +131,7 @@ public class MasterTestSubCommand {
|
||||
context
|
||||
.getSource()
|
||||
.sendFailure(
|
||||
Component.literal("No Master NPC found within 20 blocks")
|
||||
Component.translatable("command.tiedup.master.no_master_nearby")
|
||||
);
|
||||
return 0;
|
||||
}
|
||||
@@ -157,8 +155,8 @@ public class MasterTestSubCommand {
|
||||
.getSource()
|
||||
.sendSuccess(
|
||||
() ->
|
||||
Component.literal(
|
||||
"Forced " + finalName + " into HUMAN_CHAIR state"
|
||||
Component.translatable(
|
||||
"command.tiedup.master.forced_state", finalName, "HUMAN_CHAIR"
|
||||
),
|
||||
true
|
||||
);
|
||||
@@ -183,7 +181,7 @@ public class MasterTestSubCommand {
|
||||
context
|
||||
.getSource()
|
||||
.sendFailure(
|
||||
Component.literal("Unknown MasterState: " + taskName)
|
||||
Component.translatable("command.tiedup.master.unknown_state", taskName)
|
||||
);
|
||||
return 0;
|
||||
}
|
||||
@@ -193,7 +191,7 @@ public class MasterTestSubCommand {
|
||||
context
|
||||
.getSource()
|
||||
.sendFailure(
|
||||
Component.literal("No Master NPC found within 20 blocks")
|
||||
Component.translatable("command.tiedup.master.no_master_nearby")
|
||||
);
|
||||
return 0;
|
||||
}
|
||||
@@ -217,12 +215,8 @@ public class MasterTestSubCommand {
|
||||
.getSource()
|
||||
.sendSuccess(
|
||||
() ->
|
||||
Component.literal(
|
||||
"Forced " +
|
||||
finalName +
|
||||
" into " +
|
||||
targetState.name() +
|
||||
" state"
|
||||
Component.translatable(
|
||||
"command.tiedup.master.forced_state", finalName, targetState.name()
|
||||
),
|
||||
true
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user