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:
NotEvil
2026-04-15 13:54:26 +02:00
parent 70965c2dda
commit fa5cfb913c
14 changed files with 478 additions and 445 deletions

View File

@@ -8,6 +8,7 @@ import com.tiedup.remake.items.base.KnifeVariant;
import com.tiedup.remake.v2.bondage.datadriven.DataDrivenBondageItem;
import java.util.Optional;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.ChatFormatting;
import net.minecraft.commands.CommandSourceStack;
import net.minecraft.commands.Commands;
import net.minecraft.network.chat.Component;
@@ -147,9 +148,9 @@ public class KidnapSetCommand {
int finalGiven = given;
source.sendSuccess(
() ->
Component.literal(
"§aGave kidnap set (" + finalGiven + " item stacks)"
),
Component.translatable(
"command.tiedup.kidnapset.gave", finalGiven
).withStyle(ChatFormatting.GREEN),
true
);
@@ -205,13 +206,11 @@ public class KidnapSetCommand {
int finalReloaded = reloaded;
source.sendSuccess(
() ->
Component.literal(
"§aReloaded " +
(type.equals("all") ? "all data files" : type) +
" (" +
finalReloaded +
" files)"
),
Component.translatable(
"command.tiedup.kidnapreload.reloaded",
type.equals("all") ? "all data files" : type,
finalReloaded
).withStyle(ChatFormatting.GREEN),
true
);