Skip to content

Commit f5efd86

Browse files
committed
Add language entries
1 parent a7c5984 commit f5efd86

6 files changed

Lines changed: 25 additions & 10 deletions

File tree

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
// 1.19.2 2025-01-16T15:59:34.693839 Languages: en_us
2-
d0fe3ab5a88d6b925369860038c76f23d9910143 assets/advancedperipherals/lang/en_us.json
1+
// 1.19.2 2025-01-18T00:08:46.0946621 Languages: en_us
2+
d4cb5d2a7d78fc44e503663eb08d67a0fb981deb assets/advancedperipherals/lang/en_us.json

src/generated/resources/assets/advancedperipherals/lang/en_us.json

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
"item.advancedperipherals.end_automata_core": "End Automata Core",
4040
"item.advancedperipherals.hotkey_module": "Hotkey Module",
4141
"item.advancedperipherals.husbandry_automata_core": "Husbandry Automata Core",
42+
"item.advancedperipherals.keyboard": "Wireless Keyboard",
4243
"item.advancedperipherals.memory_card": "Memory Card",
4344
"item.advancedperipherals.nightvision_module": "Night Vision Module",
4445
"item.advancedperipherals.overlay_module": "Overlay Module",
@@ -48,6 +49,8 @@
4849
"item.advancedperipherals.smart_glasses": "Smart Glasses",
4950
"item.advancedperipherals.smart_glasses_interface": "Smart Glasses Interface",
5051
"item.advancedperipherals.smart_glasses_netherite": "Netherite reinforced Smart Glasses",
52+
"item.advancedperipherals.tooltip.binding.bound_to": "&7Bound to &b%s&7.",
53+
"item.advancedperipherals.tooltip.binding.bound_to_glasses": "&7Bound to Glasses with id &b%s&7.",
5154
"item.advancedperipherals.tooltip.block_reader": "&7Reads nbt data of blocks to interact with blocks which do not have computer support.",
5255
"item.advancedperipherals.tooltip.chat_box": "&7Interacts with the ingame chat, can read and write messages.",
5356
"item.advancedperipherals.tooltip.chunk_controller": "&7A crafting ingredient for the Chunky Turtle.",
@@ -62,7 +65,6 @@
6265
"item.advancedperipherals.tooltip.inventory_manager": "&7This block is able to send or receive specific items from a player inventory.",
6366
"item.advancedperipherals.tooltip.me_bridge": "&7The ME Bridge interacts with Applied Energistics to manage your items.",
6467
"item.advancedperipherals.tooltip.memory_card": "&7Can save the rights of a player to use it in an inventory manager.",
65-
"item.advancedperipherals.tooltip.memory_card.bound": "&7Bound to &b%s&7.",
6668
"item.advancedperipherals.tooltip.nbt_storage": "&7Acts like a storage disk. Can store nbt based data.",
6769
"item.advancedperipherals.tooltip.overpowered_end_automata_core": "&7Improved version of the end automata core, that provides some overpowered uses! Be careful, the upgrade is very fragile.",
6870
"item.advancedperipherals.tooltip.overpowered_husbandry_automata_core": "&7Improved version of the husbandry automata core, that provides some overpowered uses! Be careful, the upgrade is very fragile.",
@@ -82,9 +84,13 @@
8284
"pocket.advancedperipherals.environment_pocket": "Environment",
8385
"pocket.advancedperipherals.geoscanner_pocket": "Geo",
8486
"pocket.advancedperipherals.player_pocket": "Player Detector",
85-
"text.advancedperipherals.added_player": "Added you to the memory card",
8687
"text.advancedperipherals.automata_core.feed_by_player": "You're trying to feed an entity to a soul, but your own body refuses to do this. Maybe something more mechanical can do this?",
87-
"text.advancedperipherals.removed_player": "Cleared the memory card",
88+
"text.advancedperipherals.bind_keyboard": "Bounded the keyboard to %s",
89+
"text.advancedperipherals.bind_memorycard": "Bounded the memory card to you",
90+
"text.advancedperipherals.cleared_keyboard": "Cleared the keyboard",
91+
"text.advancedperipherals.cleared_memorycard": "Cleared the memory card",
92+
"text.advancedperipherals.keyboard.close": "Press ESC to close the Keyboard Screen",
93+
"text.advancedperipherals.keyboard_notbound": "The keyboard it not bound",
8894
"text.advancedperipherals.saddle_turtle.dismount_hint": "Controlling %1$s. Press %2$s and %3$s to dismount.",
8995
"text.advancedperipherals.smart_glasses.modules": "Modules",
9096
"text.advancedperipherals.smart_glasses.peripherals": "Peripherals",

src/main/java/de/srendi/advancedperipherals/client/screens/KeyboardScreen.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public void render(@NotNull PoseStack poseStack, int x, int y, float partialTick
4343
scale = 1f;
4444

4545
poseStack.scale(scale, scale, 1);
46-
String text = "Press ESC to close the Keyboard Screen.";
46+
Component text = Component.translatable("text.advancedperipherals.keyboard.close");
4747
float textX = (screenWidth / 2f - minecraft.font.width(text) * scale / 2f) / scale;
4848
minecraft.font.drawShadow(poseStack, text, textX, 1, 0xFFFFFF);
4949
}

src/main/java/de/srendi/advancedperipherals/common/data/EnUsLanguageProvider.java

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ private void addItems() {
4444
addItem(APItems.CHUNK_CONTROLLER, "Chunk Controller");
4545
addItem(APItems.COMPUTER_TOOL, "Computer Tool");
4646
addItem(APItems.HOTKEY_MODULE, "Hotkey Module");
47+
addItem(APItems.KEYBOARD, "Wireless Keyboard");
4748
addItem(APItems.MEMORY_CARD, "Memory Card");
4849
addItem(APItems.NIGHT_VISION_MODULE, "Night Vision Module");
4950
addItem(APItems.OVERLAY_MODULE, "Overlay Module");
@@ -144,13 +145,19 @@ private void addTooltips() {
144145

145146
addTooltip(APItems.COMPUTER_TOOL.get(), "&7This tool was made to tune our blocks. But for now, it's just a blue useless wrench.");
146147
addTooltip(APItems.MEMORY_CARD.get(), "&7Can save the rights of a player to use it in an inventory manager.");
147-
addTooltip("memory_card.bound", "&7Bound to &b%s&7.");
148+
addTooltip("binding.bound_to", "&7Bound to &b%s&7.");
149+
addTooltip("binding.bound_to_glasses", "&7Bound to Glasses with id &b%s&7.");
150+
148151
}
149152

150153
private void addTexts() {
151-
addText("removed_player", "Cleared the memory card");
152-
addText("added_player", "Added you to the memory card");
153154
addText("automata_core.feed_by_player", "You're trying to feed an entity to a soul, but your own body refuses to do this. Maybe something more mechanical can do this?");
155+
addText("keyboard.close", "Press ESC to close the Keyboard Screen");
156+
addText("cleared_memorycard", "Cleared the memory card");
157+
addText("bind_memorycard", "Bounded the memory card to you");
158+
addText("keyboard_notbound", "The keyboard it not bound");
159+
addText("bind_keyboard", "Bounded the keyboard to %s");
160+
addText("cleared_keyboard", "Cleared the keyboard");
154161
addText("smart_glasses.peripherals", "Peripherals");
155162
addText("smart_glasses.modules", "Modules");
156163
addText("saddle_turtle.dismount_hint", "Controlling %1$s. Press %2$s and %3$s to dismount.");

src/main/java/de/srendi/advancedperipherals/common/items/MemoryCardItem.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public void appendHoverText(ItemStack stack, @Nullable Level levelIn, List<Compo
3131
super.appendHoverText(stack, levelIn, tooltip, flagIn);
3232
CompoundTag data = stack.getOrCreateTag();
3333
if (data.contains("ownerId")) {
34-
tooltip.add(EnumColor.buildTextComponent(Component.translatable("item.advancedperipherals.tooltip.binding.boundto", data.getString("ownerId"))));
34+
tooltip.add(EnumColor.buildTextComponent(Component.translatable("item.advancedperipherals.tooltip.binding.bound_to", data.getString("ownerId"))));
3535
}
3636
}
3737

src/main/java/de/srendi/advancedperipherals/common/setup/APItems.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import de.srendi.advancedperipherals.common.configuration.APConfig;
44
import de.srendi.advancedperipherals.common.items.APItem;
5+
import de.srendi.advancedperipherals.common.items.KeyboardItem;
56
import de.srendi.advancedperipherals.common.items.MemoryCardItem;
67
import de.srendi.advancedperipherals.common.items.SmartGlassesInterfaceItem;
78
import de.srendi.advancedperipherals.common.items.SmartGlassesItem;
@@ -20,6 +21,7 @@ public class APItems {
2021
public static final RegistryObject<Item> END_AUTOMATA_CORE = APRegistration.ITEMS.register("end_automata_core", () -> new APItem(new Item.Properties().stacksTo(1), APConfig.METAPHYSICS_CONFIG.enableEndAutomataCore));
2122
public static final RegistryObject<HotkeyModuleItem> HOTKEY_MODULE = APRegistration.ITEMS.register("hotkey_module", HotkeyModuleItem::new);
2223
public static final RegistryObject<Item> HUSBANDRY_AUTOMATA_CORE = APRegistration.ITEMS.register("husbandry_automata_core", () -> new APItem(new Item.Properties().stacksTo(1), APConfig.METAPHYSICS_CONFIG.enableHusbandryAutomataCore));
24+
public static final RegistryObject<KeyboardItem> KEYBOARD = APRegistration.ITEMS.register("keyboard", KeyboardItem::new);
2325
public static final RegistryObject<Item> MEMORY_CARD = APRegistration.ITEMS.register("memory_card", MemoryCardItem::new);
2426
public static final RegistryObject<NightVisionModuleItem> NIGHT_VISION_MODULE = APRegistration.ITEMS.register("nightvision_module", NightVisionModuleItem::new);
2527
public static final RegistryObject<OverlayGlassesItem> OVERLAY_MODULE = APRegistration.ITEMS.register("overlay_module", OverlayGlassesItem::new);

0 commit comments

Comments
 (0)