From f4e98ca95a8813560089392ffbbf0895b4656292 Mon Sep 17 00:00:00 2001 From: yoyosource Date: Tue, 9 May 2023 18:28:53 +0200 Subject: [PATCH] Add all translations Signed-off-by: yoyosource --- BauSystem_Main/src/BauSystem.properties | 38 +++++++++++++++---- BauSystem_Main/src/BauSystem_de.properties | 30 +++++++++++++++ .../bausystem/features/loadern/Loader.java | 9 ++--- .../loadern/elements/ElementSettings.java | 4 +- .../elements/impl/LoaderDaylightDetector.java | 4 +- .../loadern/elements/impl/LoaderLectern.java | 12 +++--- .../loadern/elements/impl/LoaderLever.java | 10 ++--- .../loadern/elements/impl/LoaderMovement.java | 22 +++++------ .../elements/impl/LoaderNoteBlock.java | 8 ++-- .../loadern/elements/impl/LoaderOpenable.java | 10 ++--- .../loadern/elements/impl/LoaderRepeater.java | 10 ++--- .../loadern/elements/impl/LoaderTNT.java | 4 +- .../loadern/elements/impl/LoaderTicks.java | 10 ++--- .../loadern/elements/impl/LoaderWait.java | 8 ++-- 14 files changed, 107 insertions(+), 72 deletions(-) diff --git a/BauSystem_Main/src/BauSystem.properties b/BauSystem_Main/src/BauSystem.properties index 5dfba6ed..9f4b2edb 100644 --- a/BauSystem_Main/src/BauSystem.properties +++ b/BauSystem_Main/src/BauSystem.properties @@ -791,8 +791,8 @@ LOADER_RUNNING = §aRunning LOADER_PAUSE = §7Pause LOADER_END = §8Finished -LOADER_MESSAGE_INTERACT = §e{0} added {1} -LOADER_BUTTON_TNT = TNT +LOADER_MESSAGE_INTERACT=§e{0} added {1} +LOADER_BUTTON_TNT=TNT LOADER_BUTTON_SWITCH=Lever LOADER_BUTTON_WOOD_BUTTON=Wooden Button LOADER_BUTTON_STONE_BUTTON=Stone Button @@ -835,15 +835,37 @@ LOADER_GUI_SETTINGS_DELETE=§cDelete LOADER_GUI_WAIT_TITLE=Settings LOADER_GUI_WAIT_BACK=§8Back -LOADER_GUI_CLICK_TO_EDIT=§7Click to edit +LOADER_GUI_CLICK_TO_EDIT=§7Klicke zum editieren LOADER_GUI_ITEM_NAME=§7{0}§8: §e{1} LOADER_SETTING_NAME=§7{0} -LOADER_SETTING_MODES=§7Modes§8: §e{0} -LOADER_SETTING_POWER=§7Power§8: §e{0} +LOADER_SETTING_MODES=§7Modi§8: §e{0} +LOADER_SETTING_POWER=§7Redstone Stärke§8: §e{0} +LOADER_SETTING_TICKS=§7Ticks§8: §e{0} +LOADER_SETTING_REPEATER=§7Repeater§8: §e{0} +LOADER_SETTING_WAIT=§7Wartezeit§8: §e{0} Tick(s) +LOADER_SETTING_WAIT_NAME=Wartezeit +LOADER_SETTING_TICKS_NAME=Ticks +LOADER_SETTING_TICKS_REMOVE_ONE=§c-1 +LOADER_SETTING_TICKS_REMOVE_ONE_SHIFT=§7Shift§8: §c-5 +LOADER_SETTING_TICKS_ADD_ONE=§a+1 +LOADER_SETTING_TICKS_ADD_ONE_SHIFT=§7Shift§8: §a+5 +LOADER_SETTING_TNT_NAME=§cTNT +LOADER_SETTING_TNT_X=§7X§8: §e{0} +LOADER_SETTING_TNT_Y=§7Y§8: §e{0} +LOADER_SETTING_TNT_Z=§7Z§8: §e{0} LOADER_INTERACTION_NOOP=NOOP -LOADER_INTERACTION_INTERACT=Interact -LOADER_INTERACTION_POWERED=Powered -LOADER_INTERACTION_UNPOWERED=Unpowered +LOADER_INTERACTION_INTERACT=Interagiere +LOADER_INTERACTION_POWERED=Aktiviert +LOADER_INTERACTION_UNPOWERED=Deaktiviert +LOADER_INTERACTION_PAGE_PREV=Vorherige Seite +LOADER_INTERACTION_PAGE_NEXT=Nächste Seite +LOADER_INTERACTION_PAGE=Seite {0} +LOADER_INTERACTION_ACTIVE=Aktiviert +LOADER_INTERACTION_INACTIVE=Deaktiviert +LOADER_INTERACTION_WAIT_FOR=Darauf warten +LOADER_INTERACTION_NO_WAIT_FOR=Nicht darauf warten +LOADER_INTERACTION_OPEN=Geöffnet +LOADER_INTERACTION_CLOSED=Geschlossen # Loadtimer LOADTIMER_HELP_OVERVIEW=§7Compete with your friends loading your cannon and get information about the cannon diff --git a/BauSystem_Main/src/BauSystem_de.properties b/BauSystem_Main/src/BauSystem_de.properties index 5495c3be..97ba1f97 100644 --- a/BauSystem_Main/src/BauSystem_de.properties +++ b/BauSystem_Main/src/BauSystem_de.properties @@ -809,6 +809,36 @@ LOADER_GUI_WAIT_TITLE=Wartezeit LOADER_GUI_WAIT_BACK=§8Zurück LOADER_GUI_CLICK_TO_EDIT=§7Click to edit +LOADER_GUI_ITEM_NAME=§7{0}§8: §e{1} +LOADER_SETTING_NAME=§7{0} +LOADER_SETTING_MODES=§7Modes§8: §e{0} +LOADER_SETTING_POWER=§7Power§8: §e{0} +LOADER_SETTING_TICKS=§7Ticks§8: §e{0} +LOADER_SETTING_REPEATER=§7Repeater§8: §e{0} +LOADER_SETTING_WAIT=§7Wait§8: §e{0} Tick(s) +LOADER_SETTING_WAIT_NAME=Wait +LOADER_SETTING_TICKS_NAME=Ticks +LOADER_SETTING_TICKS_REMOVE_ONE=§c-1 +LOADER_SETTING_TICKS_REMOVE_ONE_SHIFT=§7Shift§8: §c-5 +LOADER_SETTING_TICKS_ADD_ONE=§a+1 +LOADER_SETTING_TICKS_ADD_ONE_SHIFT=§7Shift§8: §a+5 +LOADER_SETTING_TNT_NAME=§cTNT +LOADER_SETTING_TNT_X=§7X§8: §e{0} +LOADER_SETTING_TNT_Y=§7Y§8: §e{0} +LOADER_SETTING_TNT_Z=§7Z§8: §e{0} +LOADER_INTERACTION_NOOP=NOOP +LOADER_INTERACTION_INTERACT=Interact +LOADER_INTERACTION_POWERED=Powered +LOADER_INTERACTION_UNPOWERED=Unpowered +LOADER_INTERACTION_PAGE_PREV=Previous Page +LOADER_INTERACTION_PAGE_NEXT=Next Page +LOADER_INTERACTION_PAGE=Page {0} +LOADER_INTERACTION_ACTIVE=Active +LOADER_INTERACTION_INACTIVE=Inactive +LOADER_INTERACTION_WAIT_FOR=Wait for +LOADER_INTERACTION_NO_WAIT_FOR=No wait for +LOADER_INTERACTION_OPEN=Open +LOADER_INTERACTION_CLOSED=Closed # Loadtimer LOADTIMER_HELP_OVERVIEW=§7Messe dich und deine Freunde beim Beladen einer Kanone und bekomme informationen über die Kanone diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/loadern/Loader.java b/BauSystem_Main/src/de/steamwar/bausystem/features/loadern/Loader.java index a50ad0bc..612ebd28 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/loadern/Loader.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/loadern/Loader.java @@ -36,10 +36,7 @@ import org.bukkit.event.EventHandler; import org.bukkit.event.Listener; import org.bukkit.event.player.PlayerQuitEvent; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; +import java.util.*; public class Loader implements Listener { @@ -135,7 +132,9 @@ public class Loader implements Listener { continue; } } - list.add(new SWListInv.SWListEntry<>(element.menu(p), element)); + SWItem item = element.menu(p); + item.setLore(Arrays.asList(BauSystem.MESSAGE.parse("LOADER_SETTING_MODES", p, elements.size()), "§8", BauSystem.MESSAGE.parse("LOADER_GUI_CLICK_TO_EDIT", p))); + list.add(new SWListInv.SWListEntry<>(item, element)); } SWListInv swListInv = new SWListInv<>(p, BauSystem.MESSAGE.parse("LOADER_GUI_TITLE", p), false, list, (clickType, loaderElement) -> {}); swListInv.setCallback((clickType, entry) -> entry.click(p, swListInv::open)); diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/loadern/elements/ElementSettings.java b/BauSystem_Main/src/de/steamwar/bausystem/features/loadern/elements/ElementSettings.java index f2a63b69..be62173c 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/loadern/elements/ElementSettings.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/loadern/elements/ElementSettings.java @@ -30,7 +30,7 @@ public interface ElementSettings { default void playerInteract() {} - default String translateItemName(String name, String mode, Player player) { - return BauSystem.MESSAGE.parse("LOADER_GUI_ITEM_NAME", player, BauSystem.MESSAGE.parse(name, player), BauSystem.MESSAGE.parse(mode, player)); + default String translateItemName(String name, String mode, Player player, Object... args) { + return BauSystem.MESSAGE.parse("LOADER_GUI_ITEM_NAME", player, BauSystem.MESSAGE.parse(name, player), BauSystem.MESSAGE.parse(mode, player, args)); } } diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/loadern/elements/impl/LoaderDaylightDetector.java b/BauSystem_Main/src/de/steamwar/bausystem/features/loadern/elements/impl/LoaderDaylightDetector.java index f81236c7..42d1909f 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/loadern/elements/impl/LoaderDaylightDetector.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/loadern/elements/impl/LoaderDaylightDetector.java @@ -148,9 +148,7 @@ public class LoaderDaylightDetector extends LoaderInteractionElement {}).getItemStack(), clickType -> { + swInventory.setItem(12, new SWItem(SWItem.getDye(1), BauSystem.MESSAGE.parse("LOADER_SETTING_TICKS_REMOVE_ONE", player), Arrays.asList(BauSystem.MESSAGE.parse("LOADER_SETTING_TICKS_REMOVE_ONE_SHIFT", player)), false, clickType -> {}).getItemStack(), clickType -> { ticks -= clickType.isShiftClick() ? 5 : 1; if (ticks < 1) ticks = 1; swInventory.setItem(13, item(player)); }); swInventory.setItem(13, item(player).getItemStack(), clickType -> { - SWAnvilInv swAnvilInv = new SWAnvilInv(player, "Ticks", ticks + ""); + SWAnvilInv swAnvilInv = new SWAnvilInv(player, BauSystem.MESSAGE.parse("LOADER_SETTING_TICKS_NAME", player), ticks + ""); swAnvilInv.setCallback(s -> { try { ticks = Long.parseLong(s); @@ -175,7 +175,7 @@ public class LoaderMovement extends LoaderInteractionElement {}).getItemStack(), clickType -> { + swInventory.setItem(14, new SWItem(SWItem.getDye(10), BauSystem.MESSAGE.parse("LOADER_SETTING_TICKS_ADD_ONE", player), Arrays.asList(BauSystem.MESSAGE.parse("LOADER_SETTING_TICKS_ADD_ONE_SHIFT", player)), false, clickType -> {}).getItemStack(), clickType -> { ticks += clickType.isShiftClick() ? 5 : 1; swInventory.setItem(13, item(player)); }); @@ -205,25 +205,23 @@ public class LoaderMovement extends LoaderInteractionElement backAction.run()); - swInventory.setItem(3, new SWItem(SWItem.getDye(1), "§c-1", Arrays.asList("§7Shift: §c-5"), false, clickType -> {}).getItemStack(), clickType -> { + swInventory.setItem(3, new SWItem(SWItem.getDye(1), BauSystem.MESSAGE.parse("LOADER_SETTING_TICKS_REMOVE_ONE", player), Arrays.asList(BauSystem.MESSAGE.parse("LOADER_SETTING_TICKS_REMOVE_ONE_SHIFT", player)), false, clickType -> {}).getItemStack(), clickType -> { delay -= clickType.isShiftClick() ? 5 : 1; if (delay < 0) delay = 0; swInventory.setItem(4, menu(player)); }); swInventory.setItem(4, menu(player).getItemStack(), clickType -> { - SWAnvilInv swAnvilInv = new SWAnvilInv(player, "§7Wartezeit", delay + ""); + SWAnvilInv swAnvilInv = new SWAnvilInv(player, BauSystem.MESSAGE.parse("LOADER_SETTING_WAIT_NAME", player), delay + ""); swAnvilInv.setCallback(s -> { try { delay = Long.parseLong(s); @@ -84,7 +84,7 @@ public class LoaderWait implements LoaderElement, Listener { }); swAnvilInv.open(); }); - swInventory.setItem(5, new SWItem(SWItem.getDye(10), "§a+1", Arrays.asList("§7Shift: §a+5"), false, clickType -> {}).getItemStack(), clickType -> { + swInventory.setItem(5, new SWItem(SWItem.getDye(10), BauSystem.MESSAGE.parse("LOADER_SETTING_TICKS_ADD_ONE", player), Arrays.asList(BauSystem.MESSAGE.parse("LOADER_SETTING_TICKS_ADD_ONE_SHIFT", player)), false, clickType -> {}).getItemStack(), clickType -> { delay += clickType.isShiftClick() ? 5 : 1; swInventory.setItem(4, menu(player)); });