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:
@@ -117,9 +117,9 @@ public class CaptivityDebugCommand {
|
||||
.getSource()
|
||||
.sendSuccess(
|
||||
() ->
|
||||
Component.literal(
|
||||
"=== Captivity Debug Info ===\n" + debugInfo
|
||||
).withStyle(ChatFormatting.YELLOW),
|
||||
Component.translatable(
|
||||
"command.tiedup.debug.prisoner_header"
|
||||
).append(Component.literal("\n" + debugInfo)).withStyle(ChatFormatting.YELLOW),
|
||||
false
|
||||
);
|
||||
|
||||
@@ -128,7 +128,7 @@ public class CaptivityDebugCommand {
|
||||
ctx
|
||||
.getSource()
|
||||
.sendFailure(
|
||||
Component.literal("Error: " + e.getMessage()).withStyle(
|
||||
Component.translatable("command.tiedup.debug.error", e.getMessage()).withStyle(
|
||||
ChatFormatting.RED
|
||||
)
|
||||
);
|
||||
@@ -149,8 +149,8 @@ public class CaptivityDebugCommand {
|
||||
.getSource()
|
||||
.sendSuccess(
|
||||
() ->
|
||||
Component.literal(
|
||||
"Checking captivity system..."
|
||||
Component.translatable(
|
||||
"command.tiedup.debug.validate_checking"
|
||||
).withStyle(ChatFormatting.YELLOW),
|
||||
true
|
||||
);
|
||||
@@ -163,9 +163,7 @@ public class CaptivityDebugCommand {
|
||||
.getSource()
|
||||
.sendSuccess(
|
||||
() ->
|
||||
Component.literal(debugInfo).withStyle(
|
||||
ChatFormatting.GREEN
|
||||
),
|
||||
Component.literal(debugInfo).withStyle(ChatFormatting.GREEN),
|
||||
true
|
||||
);
|
||||
|
||||
@@ -174,8 +172,8 @@ public class CaptivityDebugCommand {
|
||||
ctx
|
||||
.getSource()
|
||||
.sendFailure(
|
||||
Component.literal(
|
||||
"Error during validation: " + e.getMessage()
|
||||
Component.translatable(
|
||||
"command.tiedup.debug.error", e.getMessage()
|
||||
).withStyle(ChatFormatting.RED)
|
||||
);
|
||||
return 0; // Failure
|
||||
@@ -193,8 +191,8 @@ public class CaptivityDebugCommand {
|
||||
.getSource()
|
||||
.sendSuccess(
|
||||
() ->
|
||||
Component.literal(
|
||||
"Repair functionality has been simplified with the new PrisonerManager system."
|
||||
Component.translatable(
|
||||
"command.tiedup.debug.repair_simplified"
|
||||
).withStyle(ChatFormatting.YELLOW),
|
||||
true
|
||||
);
|
||||
@@ -203,8 +201,8 @@ public class CaptivityDebugCommand {
|
||||
.getSource()
|
||||
.sendSuccess(
|
||||
() ->
|
||||
Component.literal(
|
||||
"The new system maintains consistency automatically."
|
||||
Component.translatable(
|
||||
"command.tiedup.debug.repair_auto"
|
||||
).withStyle(ChatFormatting.GREEN),
|
||||
true
|
||||
);
|
||||
@@ -214,7 +212,7 @@ public class CaptivityDebugCommand {
|
||||
ctx
|
||||
.getSource()
|
||||
.sendFailure(
|
||||
Component.literal("Error: " + e.getMessage()).withStyle(
|
||||
Component.translatable("command.tiedup.debug.error", e.getMessage()).withStyle(
|
||||
ChatFormatting.RED
|
||||
)
|
||||
);
|
||||
@@ -251,8 +249,8 @@ public class CaptivityDebugCommand {
|
||||
ctx
|
||||
.getSource()
|
||||
.sendFailure(
|
||||
Component.literal(
|
||||
"No camp found with ID prefix: " + campIdPrefix
|
||||
Component.translatable(
|
||||
"command.tiedup.debug.camp_not_found", campIdPrefix
|
||||
).withStyle(ChatFormatting.RED)
|
||||
);
|
||||
return 0;
|
||||
@@ -322,7 +320,7 @@ public class CaptivityDebugCommand {
|
||||
ctx
|
||||
.getSource()
|
||||
.sendFailure(
|
||||
Component.literal("Error: " + e.getMessage()).withStyle(
|
||||
Component.translatable("command.tiedup.debug.error", e.getMessage()).withStyle(
|
||||
ChatFormatting.RED
|
||||
)
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user