From c3701373f9f9b6b34bab5c45c1f8351b4c46b4ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs?= <111638424+xexuu@users.noreply.github.com> Date: Wed, 6 May 2026 18:50:40 +0200 Subject: [PATCH 1/7] feat: Spanish translation and native translatable items --- .../dynamicshop/util/ShopItemBuilder.java | 2 +- src/main/resources/messages.yml | 351 ++++++++---------- 2 files changed, 162 insertions(+), 191 deletions(-) diff --git a/src/main/java/org/minecraftsmp/dynamicshop/util/ShopItemBuilder.java b/src/main/java/org/minecraftsmp/dynamicshop/util/ShopItemBuilder.java index c5cb1c1..3f33db9 100644 --- a/src/main/java/org/minecraftsmp/dynamicshop/util/ShopItemBuilder.java +++ b/src/main/java/org/minecraftsmp/dynamicshop/util/ShopItemBuilder.java @@ -29,7 +29,7 @@ public static ItemStack buildShopDisplayItem(Material mat, String formattedBuyPr ItemMeta meta = item.getItemMeta(); if (meta != null) { - meta.displayName(component("§e§l" + prettify(mat.name()))); + meta.displayName(Component.translatable(mat.translationKey()).color(net.kyori.adventure.text.format.NamedTextColor.YELLOW).decorate(net.kyori.adventure.text.format.TextDecoration.BOLD)); List lore = new ArrayList<>(); lore.add(component("§7────────────────────")); diff --git a/src/main/resources/messages.yml b/src/main/resources/messages.yml index 38d1882..8b92665 100644 --- a/src/main/resources/messages.yml +++ b/src/main/resources/messages.yml @@ -1,201 +1,172 @@ -# DynamicShop Messages Configuration -# Supports color codes using & (e.g., &a = green, &c = red) -# Supports placeholders using {placeholder_name} +# Archivo de Mensajes de DynamicShop +# Soporta códigos de color con & (ej. &a = verde, &c = rojo) +# Soporta placeholders con {nombre_placeholder} messages: - # Prefix shown before most messages + # Prefijo mostrado antes de la mayoría de mensajes prefix: "&6&lDynamicShop &7» " - # General messages - no-permission: "&cYou don't have permission to do that." - reloaded: "&aPlugin configuration reloaded successfully!" - invalid-number: "&cInvalid number provided." - - # Purchase messages - purchase-success: "&aYou purchased &e{item} &afor &e{price}&a!" - purchase-failed: "&cPurchase failed. Please try again." - not-enough-money: "&cYou don't have enough money! Need: &e{price}" - cannot-purchase: "&cThis item cannot be purchased." - out-of-stock: "&cThis item is out of stock!" - - # Sell messages - sold-item: "&aYou sold &e{item} &afor &e{price}&a!" - cannot-sell: "&cThis item cannot be sold." - no-item-to-sell: "&cYou don't have any &e{item} &cto sell." - cannot-sell-damaged: "&cYou cannot sell damaged items." - - # Category messages - category-opened: "&aOpened category: &e{category}" - category-empty: "&cThis category has no items available for purchase." - unknown-category: "&cUnknown category: &e{category}" - list-categories: "&7Valid categories:" - cannot-access-special-category: "&cYou cannot access this category directly." - - # Category GUI lore - category-lore-items: "&7Items: &a{count}" - category-lore-click-to-browse: "&eClick to browse!" - category-lore-no-items: "&cNo items available" - - # GUI general messages - gui-category-title: "&8&lShop Categories" - gui-nav-previous: "&ePrevious Page" - gui-nav-previous-lore: "&7Click to go back" - gui-nav-previous-none: "&cNo previous page" - gui-nav-next: "&eNext Page" - gui-nav-next-lore: "&7Click to go forward" - gui-nav-next-none: "&cNo next page" - gui-nav-back: "&c&lBack to Categories" - gui-nav-back-lore: "&7Return to category selection" - gui-nav-search: "&b&lSearch Items" - gui-nav-search-lore: "&7Open search menu" - gui-nav-page: "&ePage &f{page} &7/ &f{max}" - gui-nav-page-lore: "&7Total items: &e{total}" - gui-nav-filter: "&6Filter Options" - gui-nav-filter-hidden: "&aCurrently: &fHiding Out of Stock" - gui-nav-filter-shown: "&cCurrently: &fShowing All" - gui-nav-filter-lore: "&7Click to toggle" - - # Search messages - search-no-results: "&cNo items found matching your search." - search-gui-title: "&8Search Results: &f{count}" - search-gui-back-name: "&c&lBack to Categories" - search-gui-back-lore: "&7Return to main menu" - search-lore-buy: "&aBuy: &f{price}" - search-lore-sell: "&cSell: &f{price}" + # Mensajes generales + no-permission: "&cNo tienes permiso para hacer eso." + reloaded: "&a¡Configuración del plugin recargada con éxito!" + invalid-number: "&cNúmero introducido inválido." + + # Mensajes de compra + purchase-success: "&a¡Has comprado &e{item} &apor &e{price}&a!" + purchase-failed: "&cLa compra ha fallado. Por favor, inténtalo de nuevo." + not-enough-money: "&c¡No tienes suficiente dinero! Necesitas: &e{price}" + cannot-purchase: "&cEste ítem no se puede comprar." + out-of-stock: "&c¡Este ítem está agotado!" + + # Mensajes de venta + sold-item: "&a¡Has vendido &e{item} &apor &e{price}&a!" + cannot-sell: "&cEste ítem no se puede vender." + no-item-to-sell: "&cNo tienes ningún &e{item} &cpara vender." + cannot-sell-damaged: "&cNo puedes vender ítems dañados." + + # Mensajes de categorías + category-opened: "&aCategoría abierta: &e{category}" + category-empty: "&cEsta categoría no tiene ítems disponibles para comprar." + unknown-category: "&cCategoría desconocida: &e{category}" + list-categories: "&7Categorías válidas:" + cannot-access-special-category: "&cNo puedes acceder directamente a esta categoría." + + # Lore de la GUI de categorías + category-lore-items: "&7Ítems: &a{count}" + category-lore-click-to-browse: "&e¡Haz clic para explorar!" + category-lore-no-items: "&cNo hay ítems disponibles" + + # Mensajes generales de GUI + gui-category-title: "&8&lCategorías de la Tienda" + gui-nav-previous: "&ePágina Anterior" + gui-nav-previous-lore: "&7Haz clic para retroceder" + gui-nav-previous-none: "&cNo hay página anterior" + gui-nav-next: "&ePágina Siguiente" + gui-nav-next-lore: "&7Haz clic para avanzar" + gui-nav-next-none: "&cNo hay página siguiente" + gui-nav-back: "&c&lVolver a Categorías" + gui-nav-back-lore: "&7Volver a la selección de categorías" + gui-nav-search: "&b&lBuscar Ítems" + gui-nav-search-lore: "&7Abrir menú de búsqueda" + gui-nav-page: "&ePágina &f{page} &7/ &f{max}" + gui-nav-page-lore: "&7Total de ítems: &e{total}" + gui-nav-filter: "&6Opciones de Filtro" + gui-nav-filter-hidden: "&aActualmente: &fOcultando Agotados" + gui-nav-filter-shown: "&cActualmente: &fMostrando Todos" + gui-nav-filter-lore: "&7Haz clic para alternar" + + # Mensajes de búsqueda + search-no-results: "&cNo se encontraron ítems que coincidan con tu búsqueda." + search-gui-title: "&8Resultados: &f{count}" + search-gui-back-name: "&c&lVolver a Categorías" + search-gui-back-lore: "&7Volver al menú principal" + search-lore-buy: "&aComprar: &f{price}" + search-lore-sell: "&cVender: &f{price}" search-lore-stock: "&7Stock: &f{stock}" - search-lore-stock-negative: "&cStock: {stock} (negative)" - search-lore-out-of-stock: "&eOut of stock" - search-lore-buy-1: "&eLeft-Click: &7Buy 1" - search-lore-buy-64: "&eShift+Left Click: &7Buy 64" - search-lore-sell-1: "&cRight-Click: &7Sell 1" - search-lore-sell-64: "&cShift+Right Click: &7Sell 64" - search-message-no-item-sell: "&cYou have no &f{item} &cto sell!" - - # Special shop messages (permissions & server-shop) - special-permission-success: "&aPermission granted: &e{permission}" - special-permission-failed: "&cFailed to grant permission. Please contact an administrator." - special-permission-already-owned: "&cYou already have this permission." - - special-server-item-success: "&aYou received: &e{identifier}" - special-server-item-failed: "&cFailed to give item. Please contact an administrator." - - unknown-special-item: "&cUnknown special shop item type." - cannot-sell-special-item: "&cYou cannot sell special items!" - - # Inventory messages - inventory-full: "&cYour inventory is full!" - item-added: "&aAdded &e{amount}x {item} &ato your inventory." - - # Shop transaction messages - bought-item: "&aBought &e{amount}x &a{item} &7for &e{price}&a!" - sold-item-success: "&aSold &e{amount}x &a{item} &7for &e{price}" - not-enough-items: "&cYou don't have any &e{item} &cto sell!" - not-enough-money-need: "&cNot enough money! Need &e{price}" - search-enter-term: "&cPlease enter a search term!" - transaction-cooldown: "&cPlease wait &e{time}s &cbefore your next transaction." - - # Inventory lore (shown on items in player inventory when shop is open) - lore-buy-price: "&7Buy: &e{price}" - lore-sell-price: "&7Sell: &e{price}" + search-lore-stock-negative: "&cStock: {stock} (negativo)" + search-lore-out-of-stock: "&eAgotado" + search-lore-buy-1: "&eClic Izquierdo: &7Comprar 1" + search-lore-buy-64: "&eShift+Clic Izquierdo: &7Comprar 64" + search-lore-sell-1: "&cClic Derecho: &7Vender 1" + search-lore-sell-64: "&cShift+Clic Derecho: &7Vender 64" + search-message-no-item-sell: "&c¡No tienes &f{item} &cpara vender!" + + # Mensajes de ítems especiales + special-permission-success: "&aPermiso concedido: &e{permission}" + special-permission-failed: "&cError al conceder permiso. Contacta con un administrador." + special-permission-already-owned: "&cYa tienes este permiso." + + special-server-item-success: "&aHas recibido: &e{identifier}" + special-server-item-failed: "&cError al entregar ítem. Contacta con un administrador." + + unknown-special-item: "&cTipo de ítem especial desconocido." + cannot-sell-special-item: "&c¡No puedes vender ítems especiales!" + + # Mensajes de inventario + inventory-full: "&c¡Tu inventario está lleno!" + item-added: "&aAñadido &e{amount}x {item} &aa tu inventario." + + # Transacciones + bought-item: "&a¡Compraste &e{amount}x &a{item} &7por &e{price}&a!" + sold-item-success: "&aVendiste &e{amount}x &a{item} &7por &e{price}" + not-enough-items: "&c¡No tienes ningún &e{item} &cpara vender!" + not-enough-money-need: "&c¡Dinero insuficiente! Necesitas &e{price}" + search-enter-term: "&c¡Por favor, introduce un término de búsqueda!" + transaction-cooldown: "&cPor favor, espera &e{time}s &cantes de tu próxima transacción." + + # Lore de inventario (cuando la tienda está abierta) + lore-buy-price: "&7Comprar: &e{price}" + lore-sell-price: "&7Vender: &e{price}" lore-stock: "&7Stock: &a{stock}" lore-stock-negative: "&7Stock: &c{stock}" - lore-out-of-stock: "&c&lOUT OF STOCK" - lore-click-to-sell-1: "&aRight-Click to SELL 1" - lore-shift-click-to-sell-64: "&aShift+Right-Click to SELL 64" - - # Shop GUI lore (shown on items in shop menus) - shop-lore-buy-price: "&7Buy Price: &e{price}" - shop-lore-sell-price: "&7Sell Price: &e{price}" - shop-lore-price-increase: "&7Price Increase: &c+{percent}% (&c2% per hour&7)" - shop-lore-low-stock: "&eLow Stock Warning!" - shop-lore-left-click-buy: "&bLeft Click: &7Buy 1" - shop-lore-shift-left-click-buy: "&bShift+Left Click: &7Buy 64" - shop-lore-right-click-sell: "&bRight Click: &7Sell 1" - shop-lore-shift-right-click-sell: "&bShift+Right Click: &7Sell 64" - shop-lore-left-click-buy-arrow: "&bLeft Click → Buy 1" - shop-lore-shift-left-click-buy-arrow: "&bShift+Left Click → Buy 64" - shop-lore-right-click-sell-arrow: "&bRight Click → Sell 1" - shop-lore-shift-right-click-sell-arrow: "&bShift+Right Click → Sell 64" - shop-lore-price-increase-note: "&7(2% per hour while out of stock)" - shop-lore-low-stock-emphasis: "&e&lLOW STOCK!" - - # Admin messages - admin-item-added: "&aAdded &e{item} &ato category &e{category} &awith price &e${price}" - admin-item-removed: "&aRemoved &e{item} &afrom shop." - admin-permission-added: "&aAdded permission shop item: &e{permission} &7(${price})" - admin-server-shop-added: "&aAdded server-shop item: &e{identifier} &7(${price})" - admin-must-hold-item: "&cYou must be holding an item." - admin-unknown-category: "&cUnknown category: &e{category}" - admin-list-categories: "&7Valid categories:" - admin-price-negative: "&cPrice must be greater than or equal to 0." - - # Admin command usage - admin-help-header: "&e&lDynamicShop Admin Commands:" + lore-out-of-stock: "&c&lAGOTADO" + lore-click-to-sell-1: "&aClic Derecho para VENDER 1" + lore-shift-click-to-sell-64: "&aShift+Clic Derecho para VENDER 64" + + # Lore de GUI de tienda + shop-lore-buy-price: "&7Precio de Compra: &e{price}" + shop-lore-sell-price: "&7Precio de Venta: &e{price}" + shop-lore-price-increase: "&7Incremento: &c+{percent}% (&c2% por hora&7)" + shop-lore-low-stock: "&e¡Aviso de Stock Bajo!" + shop-lore-left-click-buy: "&bClic Izquierdo: &7Comprar 1" + shop-lore-shift-left-click-buy: "&bShift+Clic Izq: &7Comprar 64" + shop-lore-right-click-sell: "&bClic Derecho: &7Vender 1" + shop-lore-shift-right-click-sell: "&bShift+Clic Der: &7Vender 64" + shop-lore-left-click-buy-arrow: "&bClic Izquierdo → Comprar 1" + shop-lore-shift-left-click-buy-arrow: "&bShift+Clic Izq → Comprar 64" + shop-lore-right-click-sell-arrow: "&bClic Derecho → Vender 1" + shop-lore-shift-right-click-sell-arrow: "&bShift+Clic Der → Vender 64" + shop-lore-price-increase-note: "&7(2% por hora mientras esté agotado)" + shop-lore-low-stock-emphasis: "&e&l¡STOCK BAJO!" + + # Mensajes de Admin + admin-item-added: "&aAñadido &e{item} &aa la categoría &e{category} &acon precio &e${price}" + admin-item-removed: "&aRemovido &e{item} &ade la tienda." + admin-permission-added: "&aAñadido permiso de tienda: &e{permission} &7(${price})" + admin-server-shop-added: "&aAñadido ítem de server-shop: &e{identifier} &7(${price})" + admin-must-hold-item: "&cDebes sostener un ítem en la mano." + admin-unknown-category: "&cCategoría desconocida: &e{category}" + admin-list-categories: "&7Categorías válidas:" + admin-price-negative: "&cEl precio debe ser mayor o igual a 0." + + # Uso de comandos Admin + admin-help-header: "&e&lComandos Admin de DynamicShop:" admin-help-reload: "&7/shopadmin reload" - admin-help-add-item: "&7/shopadmin add item " - admin-help-add-perm: "&7/shopadmin add perm " - admin-help-add-server-shop: "&7/shopadmin add server-shop " - - admin-add-usage-header: "&eUsage:" - admin-usage-add-item: "&cUsage: /shopadmin add item " - admin-usage-add-perm: "&cUsage: /shopadmin add perm " - admin-usage-add-server-shop: "&cUsage: /shopadmin add server-shop " - - # Player Shop messages - playershop-listed: "&a✓ &7Listed &f{item} &7x{amount} &7for &a${price}" - playershop-listed-success: "&7Players can now buy this from your shop!" - playershop-reclaimed: "&a✓ &7Reclaimed &f{item} &7x{amount}" - playershop-purchased: "&a✓ &7Purchased &f{item} &7x{amount} &7for &a${price}" - playershop-sold-notification: "&a✓ &7Your &f{item} &7x{amount} &7was purchased by &e{buyer} &7for &a${price}" - playershop-max-listings: "&c✗ &7You've reached the maximum of &c{max} &7listings!" - playershop-remove-items-first: "&7Remove some items from your shop first." - playershop-shop-empty: "&7Your shop is now empty." - playershop-other-shop-empty: "&7This shop is now empty." - playershop-hold-item: "&c✗ &7Hold an item in your hand to list it!" - playershop-invalid-price: "&c✗ &7Invalid price! Usage: &e/shop sell " - playershop-price-example: "&7Example: &e/shop sell 100" - playershop-price-must-be-positive: "&c✗ &7Price must be greater than 0!" - playershop-no-permission-sell: "&c✗ &7You don't have permission to sell items!" - playershop-listing-failed: "&c✗ &7Failed to list item!" - playershop-not-enough-money: "&c✗ &7You need &c${price} &7to buy this item!" - playershop-not-enough-space: "&c✗ &7Not enough inventory space!" + admin-help-add-item: "&7/shopadmin add item " + admin-help-add-perm: "&7/shopadmin add perm " + admin-help-add-server-shop: "&7/shopadmin add server-shop " + + admin-add-usage-header: "&eUso:" + admin-usage-add-item: "&cUso: /shopadmin add item " + admin-usage-add-perm: "&cUso: /shopadmin add perm " + admin-usage-add-server-shop: "&cUso: /shopadmin add server-shop " + + # Mensajes de Tienda de Jugadores (Player Shop) + playershop-listed: "&a✓ &7Listado &f{item} &7x{amount} &7por &a${price}" + playershop-listed-success: "&7¡Los jugadores ya pueden comprar esto en tu tienda!" + playershop-reclaimed: "&a✓ &7Reclamado &f{item} &7x{amount}" + playershop-purchased: "&a✓ &7Comprado &f{item} &7x{amount} &7por &a${price}" + playershop-sold-notification: "&a✓ &7Tu &f{item} &7x{amount} &7fue comprado por &e{buyer} &7por &a${price}" + playershop-max-listings: "&c✗ &7¡Has alcanzado el límite de &c{max} &7publicaciones!" + playershop-remove-items-first: "&7Primero quita algunos ítems de tu tienda." + playershop-shop-empty: "&7Tu tienda ahora está vacía." + playershop-other-shop-empty: "&7Esta tienda ahora está vacía." + playershop-hold-item: "&c✗ &7¡Sostén un ítem en la mano para publicarlo!" + playershop-invalid-price: "&c✗ &7¡Precio inválido! Uso: &e/shop sell " + playershop-price-example: "&7Ejemplo: &e/shop sell 100" + playershop-price-must-be-positive: "&c✗ &7¡El precio debe ser mayor a 0!" + playershop-no-permission-sell: "&c✗ &7¡No tienes permiso para vender ítems!" + playershop-listing-failed: "&c✗ &7¡Fallo al publicar el ítem!" + playershop-not-enough-money: "&c✗ &7¡Necesitas &c${price} &7para comprar este ítem!" + playershop-not-enough-space: "&c✗ &7¡No tienes espacio en el inventario!" - # Stock restriction message - shop-stock-limited: "&cStock is limited! You only bought &e{stock} &citems." + # Límite de stock + shop-stock-limited: "&c¡Stock limitado! Solo compraste &e{stock} &cítems." # Bedrock/Item Action GUI - item-action-title: "&8Buy / Sell" - item-action-buy-1: "&a&lBuy ×1" - item-action-buy-64: "&a&lBuy ×64" - item-action-sell-1: "&c&lSell ×1" - item-action-sell-64: "&c&lSell ×64" - item-action-back: "&7&l← Back" - -# ================================================================ -# Translation Guide -# ================================================================ -# To translate this file to another language: -# 1. Translate the text after the colons (keep {placeholders} as-is) -# 2. Keep the color codes (&a, &c, etc.) or change them as desired -# 3. DO NOT change the message keys (the text before the colon) -# -# Example Spanish translation: -# purchase-success: "&aCompraste &e{item} &apor &e{price}&a!" -# ================================================================ - -# ================================================================ -# Color Code Reference -# ================================================================ -# &0 = Black &8 = Dark Gray -# &1 = Dark Blue &9 = Blue -# &2 = Dark Green &a = Green -# &3 = Dark Aqua &b = Aqua -# &4 = Dark Red &c = Red -# &5 = Dark Purple &d = Light Purple -# &6 = Gold &e = Yellow -# &7 = Gray &f = White -# -# &l = Bold &o = Italic -# &n = Underline &m = Strikethrough -# &k = Magic &r = Reset -# ================================================================ \ No newline at end of file + item-action-title: "&8Comprar / Vender" + item-action-buy-1: "&a&lComprar ×1" + item-action-buy-64: "&a&lComprar ×64" + item-action-sell-1: "&c&lVender ×1" + item-action-sell-64: "&c&lVender ×64" + item-action-back: "&7&l← Volver" \ No newline at end of file From 1a5268898021f8052ad38200db1d50d3f02e44ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs?= <111638424+xexuu@users.noreply.github.com> Date: Wed, 6 May 2026 18:53:13 +0200 Subject: [PATCH 2/7] ci: enable workflow dispatch for manual builds --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index efe5018..26443bd 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -5,6 +5,7 @@ on: branches: [ main ] pull_request: branches: [ main ] + workflow_dispatch: jobs: build: From a146d6979e00e9ce7281a6560416a2a69dd7dc43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs?= <111638424+xexuu@users.noreply.github.com> Date: Wed, 6 May 2026 19:02:29 +0200 Subject: [PATCH 3/7] feat: add multi-language support (locale config option) with fallback to en --- .../dynamicshop/managers/MessageManager.java | 19 +- src/main/resources/config.yml | 5 + .../{messages.yml => messages_en.yml} | 0 src/main/resources/messages_es.yml | 172 ++++++++++++++++++ 4 files changed, 192 insertions(+), 4 deletions(-) rename src/main/resources/{messages.yml => messages_en.yml} (100%) create mode 100644 src/main/resources/messages_es.yml diff --git a/src/main/java/org/minecraftsmp/dynamicshop/managers/MessageManager.java b/src/main/java/org/minecraftsmp/dynamicshop/managers/MessageManager.java index 6b75a0e..980d53b 100644 --- a/src/main/java/org/minecraftsmp/dynamicshop/managers/MessageManager.java +++ b/src/main/java/org/minecraftsmp/dynamicshop/managers/MessageManager.java @@ -33,17 +33,28 @@ public void init() { } private void loadMessages() { - messagesFile = new File(plugin.getDataFolder(), "messages.yml"); + String lang = plugin.getConfig().getString("language", "en"); + String fileName = "messages_" + lang + ".yml"; + messagesFile = new File(plugin.getDataFolder(), fileName); - // Create messages.yml if it doesn't exist + // Create messages file if it doesn't exist if (!messagesFile.exists()) { - plugin.saveResource("messages.yml", false); + if (plugin.getResource(fileName) != null) { + plugin.saveResource(fileName, false); + } else { + plugin.getLogger().warning("[Messages] Language file " + fileName + " not found in jar. Falling back to messages_en.yml"); + fileName = "messages_en.yml"; + messagesFile = new File(plugin.getDataFolder(), fileName); + if (!messagesFile.exists()) { + plugin.saveResource(fileName, false); + } + } } messagesConfig = YamlConfiguration.loadConfiguration(messagesFile); // Load defaults from jar and merge missing keys - InputStream defaultStream = plugin.getResource("messages.yml"); + InputStream defaultStream = plugin.getResource(fileName); if (defaultStream != null) { YamlConfiguration defaultConfig = YamlConfiguration.loadConfiguration( new InputStreamReader(defaultStream)); diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml index 2153e65..75f02d4 100644 --- a/src/main/resources/config.yml +++ b/src/main/resources/config.yml @@ -1,6 +1,11 @@ # DynamicShop Configuration File # Created for Paper/Spigot servers with ProtocolLib +# Language / Localization +# Supported out of the box: en, es +# The plugin will look for messages_.yml +language: es + # ================================================================ # ECONOMY SETTINGS # ================================================================ diff --git a/src/main/resources/messages.yml b/src/main/resources/messages_en.yml similarity index 100% rename from src/main/resources/messages.yml rename to src/main/resources/messages_en.yml diff --git a/src/main/resources/messages_es.yml b/src/main/resources/messages_es.yml new file mode 100644 index 0000000..8b92665 --- /dev/null +++ b/src/main/resources/messages_es.yml @@ -0,0 +1,172 @@ +# Archivo de Mensajes de DynamicShop +# Soporta códigos de color con & (ej. &a = verde, &c = rojo) +# Soporta placeholders con {nombre_placeholder} + +messages: + # Prefijo mostrado antes de la mayoría de mensajes + prefix: "&6&lDynamicShop &7» " + + # Mensajes generales + no-permission: "&cNo tienes permiso para hacer eso." + reloaded: "&a¡Configuración del plugin recargada con éxito!" + invalid-number: "&cNúmero introducido inválido." + + # Mensajes de compra + purchase-success: "&a¡Has comprado &e{item} &apor &e{price}&a!" + purchase-failed: "&cLa compra ha fallado. Por favor, inténtalo de nuevo." + not-enough-money: "&c¡No tienes suficiente dinero! Necesitas: &e{price}" + cannot-purchase: "&cEste ítem no se puede comprar." + out-of-stock: "&c¡Este ítem está agotado!" + + # Mensajes de venta + sold-item: "&a¡Has vendido &e{item} &apor &e{price}&a!" + cannot-sell: "&cEste ítem no se puede vender." + no-item-to-sell: "&cNo tienes ningún &e{item} &cpara vender." + cannot-sell-damaged: "&cNo puedes vender ítems dañados." + + # Mensajes de categorías + category-opened: "&aCategoría abierta: &e{category}" + category-empty: "&cEsta categoría no tiene ítems disponibles para comprar." + unknown-category: "&cCategoría desconocida: &e{category}" + list-categories: "&7Categorías válidas:" + cannot-access-special-category: "&cNo puedes acceder directamente a esta categoría." + + # Lore de la GUI de categorías + category-lore-items: "&7Ítems: &a{count}" + category-lore-click-to-browse: "&e¡Haz clic para explorar!" + category-lore-no-items: "&cNo hay ítems disponibles" + + # Mensajes generales de GUI + gui-category-title: "&8&lCategorías de la Tienda" + gui-nav-previous: "&ePágina Anterior" + gui-nav-previous-lore: "&7Haz clic para retroceder" + gui-nav-previous-none: "&cNo hay página anterior" + gui-nav-next: "&ePágina Siguiente" + gui-nav-next-lore: "&7Haz clic para avanzar" + gui-nav-next-none: "&cNo hay página siguiente" + gui-nav-back: "&c&lVolver a Categorías" + gui-nav-back-lore: "&7Volver a la selección de categorías" + gui-nav-search: "&b&lBuscar Ítems" + gui-nav-search-lore: "&7Abrir menú de búsqueda" + gui-nav-page: "&ePágina &f{page} &7/ &f{max}" + gui-nav-page-lore: "&7Total de ítems: &e{total}" + gui-nav-filter: "&6Opciones de Filtro" + gui-nav-filter-hidden: "&aActualmente: &fOcultando Agotados" + gui-nav-filter-shown: "&cActualmente: &fMostrando Todos" + gui-nav-filter-lore: "&7Haz clic para alternar" + + # Mensajes de búsqueda + search-no-results: "&cNo se encontraron ítems que coincidan con tu búsqueda." + search-gui-title: "&8Resultados: &f{count}" + search-gui-back-name: "&c&lVolver a Categorías" + search-gui-back-lore: "&7Volver al menú principal" + search-lore-buy: "&aComprar: &f{price}" + search-lore-sell: "&cVender: &f{price}" + search-lore-stock: "&7Stock: &f{stock}" + search-lore-stock-negative: "&cStock: {stock} (negativo)" + search-lore-out-of-stock: "&eAgotado" + search-lore-buy-1: "&eClic Izquierdo: &7Comprar 1" + search-lore-buy-64: "&eShift+Clic Izquierdo: &7Comprar 64" + search-lore-sell-1: "&cClic Derecho: &7Vender 1" + search-lore-sell-64: "&cShift+Clic Derecho: &7Vender 64" + search-message-no-item-sell: "&c¡No tienes &f{item} &cpara vender!" + + # Mensajes de ítems especiales + special-permission-success: "&aPermiso concedido: &e{permission}" + special-permission-failed: "&cError al conceder permiso. Contacta con un administrador." + special-permission-already-owned: "&cYa tienes este permiso." + + special-server-item-success: "&aHas recibido: &e{identifier}" + special-server-item-failed: "&cError al entregar ítem. Contacta con un administrador." + + unknown-special-item: "&cTipo de ítem especial desconocido." + cannot-sell-special-item: "&c¡No puedes vender ítems especiales!" + + # Mensajes de inventario + inventory-full: "&c¡Tu inventario está lleno!" + item-added: "&aAñadido &e{amount}x {item} &aa tu inventario." + + # Transacciones + bought-item: "&a¡Compraste &e{amount}x &a{item} &7por &e{price}&a!" + sold-item-success: "&aVendiste &e{amount}x &a{item} &7por &e{price}" + not-enough-items: "&c¡No tienes ningún &e{item} &cpara vender!" + not-enough-money-need: "&c¡Dinero insuficiente! Necesitas &e{price}" + search-enter-term: "&c¡Por favor, introduce un término de búsqueda!" + transaction-cooldown: "&cPor favor, espera &e{time}s &cantes de tu próxima transacción." + + # Lore de inventario (cuando la tienda está abierta) + lore-buy-price: "&7Comprar: &e{price}" + lore-sell-price: "&7Vender: &e{price}" + lore-stock: "&7Stock: &a{stock}" + lore-stock-negative: "&7Stock: &c{stock}" + lore-out-of-stock: "&c&lAGOTADO" + lore-click-to-sell-1: "&aClic Derecho para VENDER 1" + lore-shift-click-to-sell-64: "&aShift+Clic Derecho para VENDER 64" + + # Lore de GUI de tienda + shop-lore-buy-price: "&7Precio de Compra: &e{price}" + shop-lore-sell-price: "&7Precio de Venta: &e{price}" + shop-lore-price-increase: "&7Incremento: &c+{percent}% (&c2% por hora&7)" + shop-lore-low-stock: "&e¡Aviso de Stock Bajo!" + shop-lore-left-click-buy: "&bClic Izquierdo: &7Comprar 1" + shop-lore-shift-left-click-buy: "&bShift+Clic Izq: &7Comprar 64" + shop-lore-right-click-sell: "&bClic Derecho: &7Vender 1" + shop-lore-shift-right-click-sell: "&bShift+Clic Der: &7Vender 64" + shop-lore-left-click-buy-arrow: "&bClic Izquierdo → Comprar 1" + shop-lore-shift-left-click-buy-arrow: "&bShift+Clic Izq → Comprar 64" + shop-lore-right-click-sell-arrow: "&bClic Derecho → Vender 1" + shop-lore-shift-right-click-sell-arrow: "&bShift+Clic Der → Vender 64" + shop-lore-price-increase-note: "&7(2% por hora mientras esté agotado)" + shop-lore-low-stock-emphasis: "&e&l¡STOCK BAJO!" + + # Mensajes de Admin + admin-item-added: "&aAñadido &e{item} &aa la categoría &e{category} &acon precio &e${price}" + admin-item-removed: "&aRemovido &e{item} &ade la tienda." + admin-permission-added: "&aAñadido permiso de tienda: &e{permission} &7(${price})" + admin-server-shop-added: "&aAñadido ítem de server-shop: &e{identifier} &7(${price})" + admin-must-hold-item: "&cDebes sostener un ítem en la mano." + admin-unknown-category: "&cCategoría desconocida: &e{category}" + admin-list-categories: "&7Categorías válidas:" + admin-price-negative: "&cEl precio debe ser mayor o igual a 0." + + # Uso de comandos Admin + admin-help-header: "&e&lComandos Admin de DynamicShop:" + admin-help-reload: "&7/shopadmin reload" + admin-help-add-item: "&7/shopadmin add item " + admin-help-add-perm: "&7/shopadmin add perm " + admin-help-add-server-shop: "&7/shopadmin add server-shop " + + admin-add-usage-header: "&eUso:" + admin-usage-add-item: "&cUso: /shopadmin add item " + admin-usage-add-perm: "&cUso: /shopadmin add perm " + admin-usage-add-server-shop: "&cUso: /shopadmin add server-shop " + + # Mensajes de Tienda de Jugadores (Player Shop) + playershop-listed: "&a✓ &7Listado &f{item} &7x{amount} &7por &a${price}" + playershop-listed-success: "&7¡Los jugadores ya pueden comprar esto en tu tienda!" + playershop-reclaimed: "&a✓ &7Reclamado &f{item} &7x{amount}" + playershop-purchased: "&a✓ &7Comprado &f{item} &7x{amount} &7por &a${price}" + playershop-sold-notification: "&a✓ &7Tu &f{item} &7x{amount} &7fue comprado por &e{buyer} &7por &a${price}" + playershop-max-listings: "&c✗ &7¡Has alcanzado el límite de &c{max} &7publicaciones!" + playershop-remove-items-first: "&7Primero quita algunos ítems de tu tienda." + playershop-shop-empty: "&7Tu tienda ahora está vacía." + playershop-other-shop-empty: "&7Esta tienda ahora está vacía." + playershop-hold-item: "&c✗ &7¡Sostén un ítem en la mano para publicarlo!" + playershop-invalid-price: "&c✗ &7¡Precio inválido! Uso: &e/shop sell " + playershop-price-example: "&7Ejemplo: &e/shop sell 100" + playershop-price-must-be-positive: "&c✗ &7¡El precio debe ser mayor a 0!" + playershop-no-permission-sell: "&c✗ &7¡No tienes permiso para vender ítems!" + playershop-listing-failed: "&c✗ &7¡Fallo al publicar el ítem!" + playershop-not-enough-money: "&c✗ &7¡Necesitas &c${price} &7para comprar este ítem!" + playershop-not-enough-space: "&c✗ &7¡No tienes espacio en el inventario!" + + # Límite de stock + shop-stock-limited: "&c¡Stock limitado! Solo compraste &e{stock} &cítems." + + # Bedrock/Item Action GUI + item-action-title: "&8Comprar / Vender" + item-action-buy-1: "&a&lComprar ×1" + item-action-buy-64: "&a&lComprar ×64" + item-action-sell-1: "&c&lVender ×1" + item-action-sell-64: "&c&lVender ×64" + item-action-back: "&7&l← Volver" \ No newline at end of file From d0d4c819f499ff5baa28139ab1ae1e5bc6e677c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs?= <111638424+xexuu@users.noreply.github.com> Date: Wed, 6 May 2026 19:38:51 +0200 Subject: [PATCH 4/7] chore: set default language to en --- src/main/resources/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml index 75f02d4..0acd83e 100644 --- a/src/main/resources/config.yml +++ b/src/main/resources/config.yml @@ -4,7 +4,7 @@ # Language / Localization # Supported out of the box: en, es # The plugin will look for messages_.yml -language: es +language: en # ================================================================ # ECONOMY SETTINGS From dfe2139ec040e794f3099a9e0102a70e6627c730 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs?= <111638424+xexuu@users.noreply.github.com> Date: Wed, 6 May 2026 19:45:18 +0200 Subject: [PATCH 5/7] fix: remove custom displayName to force native client-side translation --- .../java/org/minecraftsmp/dynamicshop/util/ShopItemBuilder.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/main/java/org/minecraftsmp/dynamicshop/util/ShopItemBuilder.java b/src/main/java/org/minecraftsmp/dynamicshop/util/ShopItemBuilder.java index 3f33db9..0c4bd3d 100644 --- a/src/main/java/org/minecraftsmp/dynamicshop/util/ShopItemBuilder.java +++ b/src/main/java/org/minecraftsmp/dynamicshop/util/ShopItemBuilder.java @@ -29,8 +29,6 @@ public static ItemStack buildShopDisplayItem(Material mat, String formattedBuyPr ItemMeta meta = item.getItemMeta(); if (meta != null) { - meta.displayName(Component.translatable(mat.translationKey()).color(net.kyori.adventure.text.format.NamedTextColor.YELLOW).decorate(net.kyori.adventure.text.format.TextDecoration.BOLD)); - List lore = new ArrayList<>(); lore.add(component("§7────────────────────")); lore.add(component("§a§lBUY: §f" + formattedBuyPrice)); From 8c29528902388098d7d88c456accf3761addf39a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs?= <111638424+xexuu@users.noreply.github.com> Date: Wed, 6 May 2026 19:59:31 +0200 Subject: [PATCH 6/7] fix: full translatable component coverage, /tienda alias, and translated category names --- .../dynamicshop/gui/AdminShopBrowseGUI.java | 10 +++++++--- .../dynamicshop/gui/PlayerShopViewGUI.java | 4 +--- .../dynamicshop/gui/SearchResultsGUI.java | 2 +- .../org/minecraftsmp/dynamicshop/gui/ShopGUI.java | 3 +-- .../dynamicshop/managers/CategoryConfigManager.java | 11 ++++++++++- src/main/resources/messages_en.yml | 13 ++++++++++++- src/main/resources/messages_es.yml | 13 ++++++++++++- src/main/resources/plugin.yml | 2 +- 8 files changed, 45 insertions(+), 13 deletions(-) diff --git a/src/main/java/org/minecraftsmp/dynamicshop/gui/AdminShopBrowseGUI.java b/src/main/java/org/minecraftsmp/dynamicshop/gui/AdminShopBrowseGUI.java index 3ba7c38..3f374ce 100644 --- a/src/main/java/org/minecraftsmp/dynamicshop/gui/AdminShopBrowseGUI.java +++ b/src/main/java/org/minecraftsmp/dynamicshop/gui/AdminShopBrowseGUI.java @@ -176,12 +176,16 @@ private ItemStack buildAdminItem(Material mat) { ItemMeta meta = item.getItemMeta(); if (meta != null) { // Show disabled status in name - String displayName = mat.name().replace("_", " "); if (disabled) { meta.displayName( - LegacyComponentSerializer.legacySection().deserialize("§c§m" + displayName + " §7(DISABLED)")); + net.kyori.adventure.text.Component.translatable(mat.translationKey()) + .color(net.kyori.adventure.text.format.NamedTextColor.RED) + .decorate(net.kyori.adventure.text.format.TextDecoration.STRIKETHROUGH) + .append(net.kyori.adventure.text.Component.text(" (DISABLED)").color(net.kyori.adventure.text.format.NamedTextColor.GRAY))); } else { - meta.displayName(LegacyComponentSerializer.legacySection().deserialize("§a§l" + displayName)); + meta.displayName(net.kyori.adventure.text.Component.translatable(mat.translationKey()) + .color(net.kyori.adventure.text.format.NamedTextColor.GREEN) + .decorate(net.kyori.adventure.text.format.TextDecoration.BOLD)); } List lore = new ArrayList<>(); diff --git a/src/main/java/org/minecraftsmp/dynamicshop/gui/PlayerShopViewGUI.java b/src/main/java/org/minecraftsmp/dynamicshop/gui/PlayerShopViewGUI.java index d323faa..fdf83d4 100644 --- a/src/main/java/org/minecraftsmp/dynamicshop/gui/PlayerShopViewGUI.java +++ b/src/main/java/org/minecraftsmp/dynamicshop/gui/PlayerShopViewGUI.java @@ -105,9 +105,7 @@ private ItemStack createDisplayItem(PlayerShopListing listing, boolean isOwnShop // Preserve original custom name if it exists // Otherwise use material name if (!meta.hasDisplayName()) { - String materialName = displayItem.getType().toString().replace("_", " "); - materialName = capitalizeWords(materialName); - meta.displayName(LegacyComponentSerializer.legacySection().deserialize("§f" + materialName)); + meta.displayName(net.kyori.adventure.text.Component.translatable(displayItem.getType().translationKey()).color(net.kyori.adventure.text.format.NamedTextColor.WHITE)); } // If it has a custom name, keep it exactly as-is! diff --git a/src/main/java/org/minecraftsmp/dynamicshop/gui/SearchResultsGUI.java b/src/main/java/org/minecraftsmp/dynamicshop/gui/SearchResultsGUI.java index 6063f06..b1ff624 100644 --- a/src/main/java/org/minecraftsmp/dynamicshop/gui/SearchResultsGUI.java +++ b/src/main/java/org/minecraftsmp/dynamicshop/gui/SearchResultsGUI.java @@ -114,7 +114,7 @@ private ItemStack buildResultItem(Material mat) { if (meta == null) return item; - meta.displayName(LegacyComponentSerializer.legacySection().deserialize("§e§l" + mat.name().replace("_", " "))); + meta.displayName(net.kyori.adventure.text.Component.translatable(mat.translationKey()).color(net.kyori.adventure.text.format.NamedTextColor.YELLOW).decorate(net.kyori.adventure.text.format.TextDecoration.BOLD)); double buy = ShopDataManager.getTotalBuyCost(mat, 1); double sell = ShopDataManager.getTotalSellValue(mat, 1); diff --git a/src/main/java/org/minecraftsmp/dynamicshop/gui/ShopGUI.java b/src/main/java/org/minecraftsmp/dynamicshop/gui/ShopGUI.java index f883b17..249af57 100644 --- a/src/main/java/org/minecraftsmp/dynamicshop/gui/ShopGUI.java +++ b/src/main/java/org/minecraftsmp/dynamicshop/gui/ShopGUI.java @@ -252,8 +252,7 @@ private ItemStack buildShopItem(Material mat) { } ItemMeta meta = item.getItemMeta(); if (meta != null) { - meta.displayName( - LegacyComponentSerializer.legacySection().deserialize("§e§l" + mat.name().replace("_", " "))); + meta.displayName(net.kyori.adventure.text.Component.translatable(mat.translationKey()).color(net.kyori.adventure.text.format.NamedTextColor.YELLOW).decorate(net.kyori.adventure.text.format.TextDecoration.BOLD)); List lore = new ArrayList<>(); diff --git a/src/main/java/org/minecraftsmp/dynamicshop/managers/CategoryConfigManager.java b/src/main/java/org/minecraftsmp/dynamicshop/managers/CategoryConfigManager.java index 515e411..85f5601 100644 --- a/src/main/java/org/minecraftsmp/dynamicshop/managers/CategoryConfigManager.java +++ b/src/main/java/org/minecraftsmp/dynamicshop/managers/CategoryConfigManager.java @@ -196,7 +196,16 @@ public static Material getIcon(ItemCategory category) { * Get the display name for a category (returns override or default from enum) */ public static String getDisplayName(ItemCategory category) { - return categoryNames.getOrDefault(category, category.getDisplayName()); + if (categoryNames.containsKey(category)) { + return categoryNames.get(category); + } + if (plugin != null) { + String langName = plugin.getMessageManager().getMessage("category-" + category.name().toLowerCase()); + if (langName != null && !langName.startsWith("&cMessage not found")) { + return langName; + } + } + return category.getDisplayName(); } /** diff --git a/src/main/resources/messages_en.yml b/src/main/resources/messages_en.yml index 8b92665..c5527f9 100644 --- a/src/main/resources/messages_en.yml +++ b/src/main/resources/messages_en.yml @@ -169,4 +169,15 @@ messages: item-action-buy-64: "&a&lComprar ×64" item-action-sell-1: "&c&lVender ×1" item-action-sell-64: "&c&lVender ×64" - item-action-back: "&7&l← Volver" \ No newline at end of file + item-action-back: "&7&l← Volver" + # Categories + category-blocks: "Blocks" + category-farming: "Farming" + category-minerals: "Minerals" + category-misc: "Misc" + category-redstone: "Redstone" + category-tools: "Tools" + category-armor: "Armor" + category-food: "Food" + category-wood: "Wood" + category-dyes: "Dyes" diff --git a/src/main/resources/messages_es.yml b/src/main/resources/messages_es.yml index 8b92665..7c1c478 100644 --- a/src/main/resources/messages_es.yml +++ b/src/main/resources/messages_es.yml @@ -169,4 +169,15 @@ messages: item-action-buy-64: "&a&lComprar ×64" item-action-sell-1: "&c&lVender ×1" item-action-sell-64: "&c&lVender ×64" - item-action-back: "&7&l← Volver" \ No newline at end of file + item-action-back: "&7&l← Volver" + # Categorías + category-blocks: "Bloques" + category-farming: "Agricultura" + category-minerals: "Minerales" + category-misc: "Miscelánea" + category-redstone: "Redstone" + category-tools: "Herramientas" + category-armor: "Armaduras" + category-food: "Comida" + category-wood: "Madera" + category-dyes: "Tintes" diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index df21af8..209f457 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -14,7 +14,7 @@ commands: shop: description: Open the dynamic shop GUI usage: /shop [|sell |sellhand|sellall] - aliases: [ dshop, market ] + aliases: [ dshop, market, tienda ] permission: dynamicshop.use shopadmin: description: Admin commands for managing the shop From 1ed7a6ddbd9d7593b8de6f37227285e9b70047dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs?= <111638424+xexuu@users.noreply.github.com> Date: Wed, 6 May 2026 20:08:39 +0200 Subject: [PATCH 7/7] fix: resolve message not found error for special categories and format translations --- .../managers/CategoryConfigManager.java | 2 +- src/main/resources/messages.yml | 201 ++++++++++ src/main/resources/messages_en.yml | 355 ++++++++++-------- src/main/resources/messages_es.yml | 6 + 4 files changed, 402 insertions(+), 162 deletions(-) create mode 100644 src/main/resources/messages.yml diff --git a/src/main/java/org/minecraftsmp/dynamicshop/managers/CategoryConfigManager.java b/src/main/java/org/minecraftsmp/dynamicshop/managers/CategoryConfigManager.java index 85f5601..d19ec3c 100644 --- a/src/main/java/org/minecraftsmp/dynamicshop/managers/CategoryConfigManager.java +++ b/src/main/java/org/minecraftsmp/dynamicshop/managers/CategoryConfigManager.java @@ -201,7 +201,7 @@ public static String getDisplayName(ItemCategory category) { } if (plugin != null) { String langName = plugin.getMessageManager().getMessage("category-" + category.name().toLowerCase()); - if (langName != null && !langName.startsWith("&cMessage not found")) { + if (langName != null && !langName.contains("Message not found")) { return langName; } } diff --git a/src/main/resources/messages.yml b/src/main/resources/messages.yml new file mode 100644 index 0000000..38d1882 --- /dev/null +++ b/src/main/resources/messages.yml @@ -0,0 +1,201 @@ +# DynamicShop Messages Configuration +# Supports color codes using & (e.g., &a = green, &c = red) +# Supports placeholders using {placeholder_name} + +messages: + # Prefix shown before most messages + prefix: "&6&lDynamicShop &7» " + + # General messages + no-permission: "&cYou don't have permission to do that." + reloaded: "&aPlugin configuration reloaded successfully!" + invalid-number: "&cInvalid number provided." + + # Purchase messages + purchase-success: "&aYou purchased &e{item} &afor &e{price}&a!" + purchase-failed: "&cPurchase failed. Please try again." + not-enough-money: "&cYou don't have enough money! Need: &e{price}" + cannot-purchase: "&cThis item cannot be purchased." + out-of-stock: "&cThis item is out of stock!" + + # Sell messages + sold-item: "&aYou sold &e{item} &afor &e{price}&a!" + cannot-sell: "&cThis item cannot be sold." + no-item-to-sell: "&cYou don't have any &e{item} &cto sell." + cannot-sell-damaged: "&cYou cannot sell damaged items." + + # Category messages + category-opened: "&aOpened category: &e{category}" + category-empty: "&cThis category has no items available for purchase." + unknown-category: "&cUnknown category: &e{category}" + list-categories: "&7Valid categories:" + cannot-access-special-category: "&cYou cannot access this category directly." + + # Category GUI lore + category-lore-items: "&7Items: &a{count}" + category-lore-click-to-browse: "&eClick to browse!" + category-lore-no-items: "&cNo items available" + + # GUI general messages + gui-category-title: "&8&lShop Categories" + gui-nav-previous: "&ePrevious Page" + gui-nav-previous-lore: "&7Click to go back" + gui-nav-previous-none: "&cNo previous page" + gui-nav-next: "&eNext Page" + gui-nav-next-lore: "&7Click to go forward" + gui-nav-next-none: "&cNo next page" + gui-nav-back: "&c&lBack to Categories" + gui-nav-back-lore: "&7Return to category selection" + gui-nav-search: "&b&lSearch Items" + gui-nav-search-lore: "&7Open search menu" + gui-nav-page: "&ePage &f{page} &7/ &f{max}" + gui-nav-page-lore: "&7Total items: &e{total}" + gui-nav-filter: "&6Filter Options" + gui-nav-filter-hidden: "&aCurrently: &fHiding Out of Stock" + gui-nav-filter-shown: "&cCurrently: &fShowing All" + gui-nav-filter-lore: "&7Click to toggle" + + # Search messages + search-no-results: "&cNo items found matching your search." + search-gui-title: "&8Search Results: &f{count}" + search-gui-back-name: "&c&lBack to Categories" + search-gui-back-lore: "&7Return to main menu" + search-lore-buy: "&aBuy: &f{price}" + search-lore-sell: "&cSell: &f{price}" + search-lore-stock: "&7Stock: &f{stock}" + search-lore-stock-negative: "&cStock: {stock} (negative)" + search-lore-out-of-stock: "&eOut of stock" + search-lore-buy-1: "&eLeft-Click: &7Buy 1" + search-lore-buy-64: "&eShift+Left Click: &7Buy 64" + search-lore-sell-1: "&cRight-Click: &7Sell 1" + search-lore-sell-64: "&cShift+Right Click: &7Sell 64" + search-message-no-item-sell: "&cYou have no &f{item} &cto sell!" + + # Special shop messages (permissions & server-shop) + special-permission-success: "&aPermission granted: &e{permission}" + special-permission-failed: "&cFailed to grant permission. Please contact an administrator." + special-permission-already-owned: "&cYou already have this permission." + + special-server-item-success: "&aYou received: &e{identifier}" + special-server-item-failed: "&cFailed to give item. Please contact an administrator." + + unknown-special-item: "&cUnknown special shop item type." + cannot-sell-special-item: "&cYou cannot sell special items!" + + # Inventory messages + inventory-full: "&cYour inventory is full!" + item-added: "&aAdded &e{amount}x {item} &ato your inventory." + + # Shop transaction messages + bought-item: "&aBought &e{amount}x &a{item} &7for &e{price}&a!" + sold-item-success: "&aSold &e{amount}x &a{item} &7for &e{price}" + not-enough-items: "&cYou don't have any &e{item} &cto sell!" + not-enough-money-need: "&cNot enough money! Need &e{price}" + search-enter-term: "&cPlease enter a search term!" + transaction-cooldown: "&cPlease wait &e{time}s &cbefore your next transaction." + + # Inventory lore (shown on items in player inventory when shop is open) + lore-buy-price: "&7Buy: &e{price}" + lore-sell-price: "&7Sell: &e{price}" + lore-stock: "&7Stock: &a{stock}" + lore-stock-negative: "&7Stock: &c{stock}" + lore-out-of-stock: "&c&lOUT OF STOCK" + lore-click-to-sell-1: "&aRight-Click to SELL 1" + lore-shift-click-to-sell-64: "&aShift+Right-Click to SELL 64" + + # Shop GUI lore (shown on items in shop menus) + shop-lore-buy-price: "&7Buy Price: &e{price}" + shop-lore-sell-price: "&7Sell Price: &e{price}" + shop-lore-price-increase: "&7Price Increase: &c+{percent}% (&c2% per hour&7)" + shop-lore-low-stock: "&eLow Stock Warning!" + shop-lore-left-click-buy: "&bLeft Click: &7Buy 1" + shop-lore-shift-left-click-buy: "&bShift+Left Click: &7Buy 64" + shop-lore-right-click-sell: "&bRight Click: &7Sell 1" + shop-lore-shift-right-click-sell: "&bShift+Right Click: &7Sell 64" + shop-lore-left-click-buy-arrow: "&bLeft Click → Buy 1" + shop-lore-shift-left-click-buy-arrow: "&bShift+Left Click → Buy 64" + shop-lore-right-click-sell-arrow: "&bRight Click → Sell 1" + shop-lore-shift-right-click-sell-arrow: "&bShift+Right Click → Sell 64" + shop-lore-price-increase-note: "&7(2% per hour while out of stock)" + shop-lore-low-stock-emphasis: "&e&lLOW STOCK!" + + # Admin messages + admin-item-added: "&aAdded &e{item} &ato category &e{category} &awith price &e${price}" + admin-item-removed: "&aRemoved &e{item} &afrom shop." + admin-permission-added: "&aAdded permission shop item: &e{permission} &7(${price})" + admin-server-shop-added: "&aAdded server-shop item: &e{identifier} &7(${price})" + admin-must-hold-item: "&cYou must be holding an item." + admin-unknown-category: "&cUnknown category: &e{category}" + admin-list-categories: "&7Valid categories:" + admin-price-negative: "&cPrice must be greater than or equal to 0." + + # Admin command usage + admin-help-header: "&e&lDynamicShop Admin Commands:" + admin-help-reload: "&7/shopadmin reload" + admin-help-add-item: "&7/shopadmin add item " + admin-help-add-perm: "&7/shopadmin add perm " + admin-help-add-server-shop: "&7/shopadmin add server-shop " + + admin-add-usage-header: "&eUsage:" + admin-usage-add-item: "&cUsage: /shopadmin add item " + admin-usage-add-perm: "&cUsage: /shopadmin add perm " + admin-usage-add-server-shop: "&cUsage: /shopadmin add server-shop " + + # Player Shop messages + playershop-listed: "&a✓ &7Listed &f{item} &7x{amount} &7for &a${price}" + playershop-listed-success: "&7Players can now buy this from your shop!" + playershop-reclaimed: "&a✓ &7Reclaimed &f{item} &7x{amount}" + playershop-purchased: "&a✓ &7Purchased &f{item} &7x{amount} &7for &a${price}" + playershop-sold-notification: "&a✓ &7Your &f{item} &7x{amount} &7was purchased by &e{buyer} &7for &a${price}" + playershop-max-listings: "&c✗ &7You've reached the maximum of &c{max} &7listings!" + playershop-remove-items-first: "&7Remove some items from your shop first." + playershop-shop-empty: "&7Your shop is now empty." + playershop-other-shop-empty: "&7This shop is now empty." + playershop-hold-item: "&c✗ &7Hold an item in your hand to list it!" + playershop-invalid-price: "&c✗ &7Invalid price! Usage: &e/shop sell " + playershop-price-example: "&7Example: &e/shop sell 100" + playershop-price-must-be-positive: "&c✗ &7Price must be greater than 0!" + playershop-no-permission-sell: "&c✗ &7You don't have permission to sell items!" + playershop-listing-failed: "&c✗ &7Failed to list item!" + playershop-not-enough-money: "&c✗ &7You need &c${price} &7to buy this item!" + playershop-not-enough-space: "&c✗ &7Not enough inventory space!" + + # Stock restriction message + shop-stock-limited: "&cStock is limited! You only bought &e{stock} &citems." + + # Bedrock/Item Action GUI + item-action-title: "&8Buy / Sell" + item-action-buy-1: "&a&lBuy ×1" + item-action-buy-64: "&a&lBuy ×64" + item-action-sell-1: "&c&lSell ×1" + item-action-sell-64: "&c&lSell ×64" + item-action-back: "&7&l← Back" + +# ================================================================ +# Translation Guide +# ================================================================ +# To translate this file to another language: +# 1. Translate the text after the colons (keep {placeholders} as-is) +# 2. Keep the color codes (&a, &c, etc.) or change them as desired +# 3. DO NOT change the message keys (the text before the colon) +# +# Example Spanish translation: +# purchase-success: "&aCompraste &e{item} &apor &e{price}&a!" +# ================================================================ + +# ================================================================ +# Color Code Reference +# ================================================================ +# &0 = Black &8 = Dark Gray +# &1 = Dark Blue &9 = Blue +# &2 = Dark Green &a = Green +# &3 = Dark Aqua &b = Aqua +# &4 = Dark Red &c = Red +# &5 = Dark Purple &d = Light Purple +# &6 = Gold &e = Yellow +# &7 = Gray &f = White +# +# &l = Bold &o = Italic +# &n = Underline &m = Strikethrough +# &k = Magic &r = Reset +# ================================================================ \ No newline at end of file diff --git a/src/main/resources/messages_en.yml b/src/main/resources/messages_en.yml index c5527f9..08df240 100644 --- a/src/main/resources/messages_en.yml +++ b/src/main/resources/messages_en.yml @@ -1,175 +1,176 @@ -# Archivo de Mensajes de DynamicShop -# Soporta códigos de color con & (ej. &a = verde, &c = rojo) -# Soporta placeholders con {nombre_placeholder} +# DynamicShop Messages Configuration +# Supports color codes using & (e.g., &a = green, &c = red) +# Supports placeholders using {placeholder_name} messages: - # Prefijo mostrado antes de la mayoría de mensajes + # Prefix shown before most messages prefix: "&6&lDynamicShop &7» " - # Mensajes generales - no-permission: "&cNo tienes permiso para hacer eso." - reloaded: "&a¡Configuración del plugin recargada con éxito!" - invalid-number: "&cNúmero introducido inválido." - - # Mensajes de compra - purchase-success: "&a¡Has comprado &e{item} &apor &e{price}&a!" - purchase-failed: "&cLa compra ha fallado. Por favor, inténtalo de nuevo." - not-enough-money: "&c¡No tienes suficiente dinero! Necesitas: &e{price}" - cannot-purchase: "&cEste ítem no se puede comprar." - out-of-stock: "&c¡Este ítem está agotado!" - - # Mensajes de venta - sold-item: "&a¡Has vendido &e{item} &apor &e{price}&a!" - cannot-sell: "&cEste ítem no se puede vender." - no-item-to-sell: "&cNo tienes ningún &e{item} &cpara vender." - cannot-sell-damaged: "&cNo puedes vender ítems dañados." - - # Mensajes de categorías - category-opened: "&aCategoría abierta: &e{category}" - category-empty: "&cEsta categoría no tiene ítems disponibles para comprar." - unknown-category: "&cCategoría desconocida: &e{category}" - list-categories: "&7Categorías válidas:" - cannot-access-special-category: "&cNo puedes acceder directamente a esta categoría." - - # Lore de la GUI de categorías - category-lore-items: "&7Ítems: &a{count}" - category-lore-click-to-browse: "&e¡Haz clic para explorar!" - category-lore-no-items: "&cNo hay ítems disponibles" - - # Mensajes generales de GUI - gui-category-title: "&8&lCategorías de la Tienda" - gui-nav-previous: "&ePágina Anterior" - gui-nav-previous-lore: "&7Haz clic para retroceder" - gui-nav-previous-none: "&cNo hay página anterior" - gui-nav-next: "&ePágina Siguiente" - gui-nav-next-lore: "&7Haz clic para avanzar" - gui-nav-next-none: "&cNo hay página siguiente" - gui-nav-back: "&c&lVolver a Categorías" - gui-nav-back-lore: "&7Volver a la selección de categorías" - gui-nav-search: "&b&lBuscar Ítems" - gui-nav-search-lore: "&7Abrir menú de búsqueda" - gui-nav-page: "&ePágina &f{page} &7/ &f{max}" - gui-nav-page-lore: "&7Total de ítems: &e{total}" - gui-nav-filter: "&6Opciones de Filtro" - gui-nav-filter-hidden: "&aActualmente: &fOcultando Agotados" - gui-nav-filter-shown: "&cActualmente: &fMostrando Todos" - gui-nav-filter-lore: "&7Haz clic para alternar" - - # Mensajes de búsqueda - search-no-results: "&cNo se encontraron ítems que coincidan con tu búsqueda." - search-gui-title: "&8Resultados: &f{count}" - search-gui-back-name: "&c&lVolver a Categorías" - search-gui-back-lore: "&7Volver al menú principal" - search-lore-buy: "&aComprar: &f{price}" - search-lore-sell: "&cVender: &f{price}" + # General messages + no-permission: "&cYou don't have permission to do that." + reloaded: "&aPlugin configuration reloaded successfully!" + invalid-number: "&cInvalid number provided." + + # Purchase messages + purchase-success: "&aYou purchased &e{item} &afor &e{price}&a!" + purchase-failed: "&cPurchase failed. Please try again." + not-enough-money: "&cYou don't have enough money! Need: &e{price}" + cannot-purchase: "&cThis item cannot be purchased." + out-of-stock: "&cThis item is out of stock!" + + # Sell messages + sold-item: "&aYou sold &e{item} &afor &e{price}&a!" + cannot-sell: "&cThis item cannot be sold." + no-item-to-sell: "&cYou don't have any &e{item} &cto sell." + cannot-sell-damaged: "&cYou cannot sell damaged items." + + # Category messages + category-opened: "&aOpened category: &e{category}" + category-empty: "&cThis category has no items available for purchase." + unknown-category: "&cUnknown category: &e{category}" + list-categories: "&7Valid categories:" + cannot-access-special-category: "&cYou cannot access this category directly." + + # Category GUI lore + category-lore-items: "&7Items: &a{count}" + category-lore-click-to-browse: "&eClick to browse!" + category-lore-no-items: "&cNo items available" + + # GUI general messages + gui-category-title: "&8&lShop Categories" + gui-nav-previous: "&ePrevious Page" + gui-nav-previous-lore: "&7Click to go back" + gui-nav-previous-none: "&cNo previous page" + gui-nav-next: "&eNext Page" + gui-nav-next-lore: "&7Click to go forward" + gui-nav-next-none: "&cNo next page" + gui-nav-back: "&c&lBack to Categories" + gui-nav-back-lore: "&7Return to category selection" + gui-nav-search: "&b&lSearch Items" + gui-nav-search-lore: "&7Open search menu" + gui-nav-page: "&ePage &f{page} &7/ &f{max}" + gui-nav-page-lore: "&7Total items: &e{total}" + gui-nav-filter: "&6Filter Options" + gui-nav-filter-hidden: "&aCurrently: &fHiding Out of Stock" + gui-nav-filter-shown: "&cCurrently: &fShowing All" + gui-nav-filter-lore: "&7Click to toggle" + + # Search messages + search-no-results: "&cNo items found matching your search." + search-gui-title: "&8Search Results: &f{count}" + search-gui-back-name: "&c&lBack to Categories" + search-gui-back-lore: "&7Return to main menu" + search-lore-buy: "&aBuy: &f{price}" + search-lore-sell: "&cSell: &f{price}" search-lore-stock: "&7Stock: &f{stock}" - search-lore-stock-negative: "&cStock: {stock} (negativo)" - search-lore-out-of-stock: "&eAgotado" - search-lore-buy-1: "&eClic Izquierdo: &7Comprar 1" - search-lore-buy-64: "&eShift+Clic Izquierdo: &7Comprar 64" - search-lore-sell-1: "&cClic Derecho: &7Vender 1" - search-lore-sell-64: "&cShift+Clic Derecho: &7Vender 64" - search-message-no-item-sell: "&c¡No tienes &f{item} &cpara vender!" - - # Mensajes de ítems especiales - special-permission-success: "&aPermiso concedido: &e{permission}" - special-permission-failed: "&cError al conceder permiso. Contacta con un administrador." - special-permission-already-owned: "&cYa tienes este permiso." - - special-server-item-success: "&aHas recibido: &e{identifier}" - special-server-item-failed: "&cError al entregar ítem. Contacta con un administrador." - - unknown-special-item: "&cTipo de ítem especial desconocido." - cannot-sell-special-item: "&c¡No puedes vender ítems especiales!" - - # Mensajes de inventario - inventory-full: "&c¡Tu inventario está lleno!" - item-added: "&aAñadido &e{amount}x {item} &aa tu inventario." - - # Transacciones - bought-item: "&a¡Compraste &e{amount}x &a{item} &7por &e{price}&a!" - sold-item-success: "&aVendiste &e{amount}x &a{item} &7por &e{price}" - not-enough-items: "&c¡No tienes ningún &e{item} &cpara vender!" - not-enough-money-need: "&c¡Dinero insuficiente! Necesitas &e{price}" - search-enter-term: "&c¡Por favor, introduce un término de búsqueda!" - transaction-cooldown: "&cPor favor, espera &e{time}s &cantes de tu próxima transacción." - - # Lore de inventario (cuando la tienda está abierta) - lore-buy-price: "&7Comprar: &e{price}" - lore-sell-price: "&7Vender: &e{price}" + search-lore-stock-negative: "&cStock: {stock} (negative)" + search-lore-out-of-stock: "&eOut of stock" + search-lore-buy-1: "&eLeft-Click: &7Buy 1" + search-lore-buy-64: "&eShift+Left Click: &7Buy 64" + search-lore-sell-1: "&cRight-Click: &7Sell 1" + search-lore-sell-64: "&cShift+Right Click: &7Sell 64" + search-message-no-item-sell: "&cYou have no &f{item} &cto sell!" + + # Special shop messages (permissions & server-shop) + special-permission-success: "&aPermission granted: &e{permission}" + special-permission-failed: "&cFailed to grant permission. Please contact an administrator." + special-permission-already-owned: "&cYou already have this permission." + + special-server-item-success: "&aYou received: &e{identifier}" + special-server-item-failed: "&cFailed to give item. Please contact an administrator." + + unknown-special-item: "&cUnknown special shop item type." + cannot-sell-special-item: "&cYou cannot sell special items!" + + # Inventory messages + inventory-full: "&cYour inventory is full!" + item-added: "&aAdded &e{amount}x {item} &ato your inventory." + + # Shop transaction messages + bought-item: "&aBought &e{amount}x &a{item} &7for &e{price}&a!" + sold-item-success: "&aSold &e{amount}x &a{item} &7for &e{price}" + not-enough-items: "&cYou don't have any &e{item} &cto sell!" + not-enough-money-need: "&cNot enough money! Need &e{price}" + search-enter-term: "&cPlease enter a search term!" + transaction-cooldown: "&cPlease wait &e{time}s &cbefore your next transaction." + + # Inventory lore (shown on items in player inventory when shop is open) + lore-buy-price: "&7Buy: &e{price}" + lore-sell-price: "&7Sell: &e{price}" lore-stock: "&7Stock: &a{stock}" lore-stock-negative: "&7Stock: &c{stock}" - lore-out-of-stock: "&c&lAGOTADO" - lore-click-to-sell-1: "&aClic Derecho para VENDER 1" - lore-shift-click-to-sell-64: "&aShift+Clic Derecho para VENDER 64" - - # Lore de GUI de tienda - shop-lore-buy-price: "&7Precio de Compra: &e{price}" - shop-lore-sell-price: "&7Precio de Venta: &e{price}" - shop-lore-price-increase: "&7Incremento: &c+{percent}% (&c2% por hora&7)" - shop-lore-low-stock: "&e¡Aviso de Stock Bajo!" - shop-lore-left-click-buy: "&bClic Izquierdo: &7Comprar 1" - shop-lore-shift-left-click-buy: "&bShift+Clic Izq: &7Comprar 64" - shop-lore-right-click-sell: "&bClic Derecho: &7Vender 1" - shop-lore-shift-right-click-sell: "&bShift+Clic Der: &7Vender 64" - shop-lore-left-click-buy-arrow: "&bClic Izquierdo → Comprar 1" - shop-lore-shift-left-click-buy-arrow: "&bShift+Clic Izq → Comprar 64" - shop-lore-right-click-sell-arrow: "&bClic Derecho → Vender 1" - shop-lore-shift-right-click-sell-arrow: "&bShift+Clic Der → Vender 64" - shop-lore-price-increase-note: "&7(2% por hora mientras esté agotado)" - shop-lore-low-stock-emphasis: "&e&l¡STOCK BAJO!" - - # Mensajes de Admin - admin-item-added: "&aAñadido &e{item} &aa la categoría &e{category} &acon precio &e${price}" - admin-item-removed: "&aRemovido &e{item} &ade la tienda." - admin-permission-added: "&aAñadido permiso de tienda: &e{permission} &7(${price})" - admin-server-shop-added: "&aAñadido ítem de server-shop: &e{identifier} &7(${price})" - admin-must-hold-item: "&cDebes sostener un ítem en la mano." - admin-unknown-category: "&cCategoría desconocida: &e{category}" - admin-list-categories: "&7Categorías válidas:" - admin-price-negative: "&cEl precio debe ser mayor o igual a 0." - - # Uso de comandos Admin - admin-help-header: "&e&lComandos Admin de DynamicShop:" + lore-out-of-stock: "&c&lOUT OF STOCK" + lore-click-to-sell-1: "&aRight-Click to SELL 1" + lore-shift-click-to-sell-64: "&aShift+Right-Click to SELL 64" + + # Shop GUI lore (shown on items in shop menus) + shop-lore-buy-price: "&7Buy Price: &e{price}" + shop-lore-sell-price: "&7Sell Price: &e{price}" + shop-lore-price-increase: "&7Price Increase: &c+{percent}% (&c2% per hour&7)" + shop-lore-low-stock: "&eLow Stock Warning!" + shop-lore-left-click-buy: "&bLeft Click: &7Buy 1" + shop-lore-shift-left-click-buy: "&bShift+Left Click: &7Buy 64" + shop-lore-right-click-sell: "&bRight Click: &7Sell 1" + shop-lore-shift-right-click-sell: "&bShift+Right Click: &7Sell 64" + shop-lore-left-click-buy-arrow: "&bLeft Click → Buy 1" + shop-lore-shift-left-click-buy-arrow: "&bShift+Left Click → Buy 64" + shop-lore-right-click-sell-arrow: "&bRight Click → Sell 1" + shop-lore-shift-right-click-sell-arrow: "&bShift+Right Click → Sell 64" + shop-lore-price-increase-note: "&7(2% per hour while out of stock)" + shop-lore-low-stock-emphasis: "&e&lLOW STOCK!" + + # Admin messages + admin-item-added: "&aAdded &e{item} &ato category &e{category} &awith price &e${price}" + admin-item-removed: "&aRemoved &e{item} &afrom shop." + admin-permission-added: "&aAdded permission shop item: &e{permission} &7(${price})" + admin-server-shop-added: "&aAdded server-shop item: &e{identifier} &7(${price})" + admin-must-hold-item: "&cYou must be holding an item." + admin-unknown-category: "&cUnknown category: &e{category}" + admin-list-categories: "&7Valid categories:" + admin-price-negative: "&cPrice must be greater than or equal to 0." + + # Admin command usage + admin-help-header: "&e&lDynamicShop Admin Commands:" admin-help-reload: "&7/shopadmin reload" - admin-help-add-item: "&7/shopadmin add item " - admin-help-add-perm: "&7/shopadmin add perm " - admin-help-add-server-shop: "&7/shopadmin add server-shop " - - admin-add-usage-header: "&eUso:" - admin-usage-add-item: "&cUso: /shopadmin add item " - admin-usage-add-perm: "&cUso: /shopadmin add perm " - admin-usage-add-server-shop: "&cUso: /shopadmin add server-shop " - - # Mensajes de Tienda de Jugadores (Player Shop) - playershop-listed: "&a✓ &7Listado &f{item} &7x{amount} &7por &a${price}" - playershop-listed-success: "&7¡Los jugadores ya pueden comprar esto en tu tienda!" - playershop-reclaimed: "&a✓ &7Reclamado &f{item} &7x{amount}" - playershop-purchased: "&a✓ &7Comprado &f{item} &7x{amount} &7por &a${price}" - playershop-sold-notification: "&a✓ &7Tu &f{item} &7x{amount} &7fue comprado por &e{buyer} &7por &a${price}" - playershop-max-listings: "&c✗ &7¡Has alcanzado el límite de &c{max} &7publicaciones!" - playershop-remove-items-first: "&7Primero quita algunos ítems de tu tienda." - playershop-shop-empty: "&7Tu tienda ahora está vacía." - playershop-other-shop-empty: "&7Esta tienda ahora está vacía." - playershop-hold-item: "&c✗ &7¡Sostén un ítem en la mano para publicarlo!" - playershop-invalid-price: "&c✗ &7¡Precio inválido! Uso: &e/shop sell " - playershop-price-example: "&7Ejemplo: &e/shop sell 100" - playershop-price-must-be-positive: "&c✗ &7¡El precio debe ser mayor a 0!" - playershop-no-permission-sell: "&c✗ &7¡No tienes permiso para vender ítems!" - playershop-listing-failed: "&c✗ &7¡Fallo al publicar el ítem!" - playershop-not-enough-money: "&c✗ &7¡Necesitas &c${price} &7para comprar este ítem!" - playershop-not-enough-space: "&c✗ &7¡No tienes espacio en el inventario!" + admin-help-add-item: "&7/shopadmin add item " + admin-help-add-perm: "&7/shopadmin add perm " + admin-help-add-server-shop: "&7/shopadmin add server-shop " + + admin-add-usage-header: "&eUsage:" + admin-usage-add-item: "&cUsage: /shopadmin add item " + admin-usage-add-perm: "&cUsage: /shopadmin add perm " + admin-usage-add-server-shop: "&cUsage: /shopadmin add server-shop " + + # Player Shop messages + playershop-listed: "&a✓ &7Listed &f{item} &7x{amount} &7for &a${price}" + playershop-listed-success: "&7Players can now buy this from your shop!" + playershop-reclaimed: "&a✓ &7Reclaimed &f{item} &7x{amount}" + playershop-purchased: "&a✓ &7Purchased &f{item} &7x{amount} &7for &a${price}" + playershop-sold-notification: "&a✓ &7Your &f{item} &7x{amount} &7was purchased by &e{buyer} &7for &a${price}" + playershop-max-listings: "&c✗ &7You've reached the maximum of &c{max} &7listings!" + playershop-remove-items-first: "&7Remove some items from your shop first." + playershop-shop-empty: "&7Your shop is now empty." + playershop-other-shop-empty: "&7This shop is now empty." + playershop-hold-item: "&c✗ &7Hold an item in your hand to list it!" + playershop-invalid-price: "&c✗ &7Invalid price! Usage: &e/shop sell " + playershop-price-example: "&7Example: &e/shop sell 100" + playershop-price-must-be-positive: "&c✗ &7Price must be greater than 0!" + playershop-no-permission-sell: "&c✗ &7You don't have permission to sell items!" + playershop-listing-failed: "&c✗ &7Failed to list item!" + playershop-not-enough-money: "&c✗ &7You need &c${price} &7to buy this item!" + playershop-not-enough-space: "&c✗ &7Not enough inventory space!" - # Límite de stock - shop-stock-limited: "&c¡Stock limitado! Solo compraste &e{stock} &cítems." + # Stock restriction message + shop-stock-limited: "&cStock is limited! You only bought &e{stock} &citems." # Bedrock/Item Action GUI - item-action-title: "&8Comprar / Vender" - item-action-buy-1: "&a&lComprar ×1" - item-action-buy-64: "&a&lComprar ×64" - item-action-sell-1: "&c&lVender ×1" - item-action-sell-64: "&c&lVender ×64" - item-action-back: "&7&l← Volver" + item-action-title: "&8Buy / Sell" + item-action-buy-1: "&a&lBuy ×1" + item-action-buy-64: "&a&lBuy ×64" + item-action-sell-1: "&c&lSell ×1" + item-action-sell-64: "&c&lSell ×64" + item-action-back: "&7&l← Back" + # Categories category-blocks: "Blocks" category-farming: "Farming" @@ -181,3 +182,35 @@ messages: category-food: "Food" category-wood: "Wood" category-dyes: "Dyes" + category-permissions: "Permissions" + category-server_shop: "Server Shop" + category-player_shops: "Player Shops" + +# ================================================================ +# Translation Guide +# ================================================================ +# To translate this file to another language: +# 1. Translate the text after the colons (keep {placeholders} as-is) +# 2. Keep the color codes (&a, &c, etc.) or change them as desired +# 3. DO NOT change the message keys (the text before the colon) +# +# Example Spanish translation: +# purchase-success: "&aCompraste &e{item} &apor &e{price}&a!" +# ================================================================ + +# ================================================================ +# Color Code Reference +# ================================================================ +# &0 = Black &8 = Dark Gray +# &1 = Dark Blue &9 = Blue +# &2 = Dark Green &a = Green +# &3 = Dark Aqua &b = Aqua +# &4 = Dark Red &c = Red +# &5 = Dark Purple &d = Light Purple +# &6 = Gold &e = Yellow +# &7 = Gray &f = White +# +# &l = Bold &o = Italic +# &n = Underline &m = Strikethrough +# &k = Magic &r = Reset +# ================================================================ \ No newline at end of file diff --git a/src/main/resources/messages_es.yml b/src/main/resources/messages_es.yml index 7c1c478..f77d8f9 100644 --- a/src/main/resources/messages_es.yml +++ b/src/main/resources/messages_es.yml @@ -170,6 +170,7 @@ messages: item-action-sell-1: "&c&lVender ×1" item-action-sell-64: "&c&lVender ×64" item-action-back: "&7&l← Volver" + # Categorías category-blocks: "Bloques" category-farming: "Agricultura" @@ -181,3 +182,8 @@ messages: category-food: "Comida" category-wood: "Madera" category-dyes: "Tintes" + category-permissions: "Permisos" + category-server_shop: "Tienda del Servidor" + category-player_shops: "Tiendas de Jugadores" + +# ================================================================