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:
@@ -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
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user