From f9271c5c4657a39714b422706e4a250011607e20 Mon Sep 17 00:00:00 2001 From: Ghost_chu <2908803755@qq.com> Date: Tue, 25 Feb 2020 18:11:17 +0800 Subject: [PATCH] Fix bug on Message system Former-commit-id: ac85bb5176197a2db12d1b9b093c599a954b469f --- .../org/maxgamer/quickshop/Util/MsgUtil.java | 2 +- src/main/resources/messages/en.json | 234 ++++++++++++++++++ 2 files changed, 235 insertions(+), 1 deletion(-) create mode 100644 src/main/resources/messages/en.json diff --git a/src/main/java/org/maxgamer/quickshop/Util/MsgUtil.java b/src/main/java/org/maxgamer/quickshop/Util/MsgUtil.java index 06ca5366b2..e34c7dc2f7 100644 --- a/src/main/java/org/maxgamer/quickshop/Util/MsgUtil.java +++ b/src/main/java/org/maxgamer/quickshop/Util/MsgUtil.java @@ -279,7 +279,7 @@ public static void loadGameLanguage(@NotNull String languageCode) { public static void loadCfgMessages() throws InvalidConfigurationException { /* Check & Load & Create default messages.yml */ // Use try block to hook any possible exception, make sure not effect our cfgMessnages code. - String languageCode = plugin.getConfig().getString("language", "en"); + String languageCode = plugin.getConfig().getString("language", "en-US"); //noinspection ConstantConditions loadGameLanguage(plugin.getConfig().getString("game-language", "default")); diff --git a/src/main/resources/messages/en.json b/src/main/resources/messages/en.json new file mode 100644 index 0000000000..560d6ed032 --- /dev/null +++ b/src/main/resources/messages/en.json @@ -0,0 +1,234 @@ +{ + "translation-author": "Translator: Ghost_chu", + "translation-version": "Support Version: Reremake", + "translation-contributors": "Contributors: Timtower, Netherfoam, KaiNoMood and Mgazul", + "translation-country": "Language Zone: English (en_US)", + "language-version": "27", + "not-looking-at-shop": "&cNo QuickShop was found, you must be looking at one.", + "no-anythings-in-your-hand": "&cThere is nothing in your hand.", + "no-permission": "&cYou do not have permission to do that.", + "no-creative-break": "&cYou cannot break other players shops in creative mode. Use survival instead.", + "no-double-chests": "&cYou cannot create the DoubleChest shop.", + "shop-already-owned": "&cThat is already a shop.", + "chest-was-removed": "&cThe chest was removed.", + "price-too-cheap": "&cPrice must be greater than &e${0}", + "no-price-change": "&cThat wouldn't result in a price change!", + "you-cant-afford-a-new-shop": "&cIt costs {0} to create a new shop.", + "player-bought-from-your-store-tax": "&c{0} purchased {1} {2} from your store, and you paid {3} in taxes.", + "you-cant-afford-to-change-price": "&cIt costs {0} to change the price in your shop.", + "success-created-shop": "&aCreated shop.", + "success-removed-shop": "&aShop removed.", + "shops-arent-locked": "&cRemember, shops are NOT protected from theft! If you want to stop thieves, lock it with LWC, Lockette, etc!", + "shop-creation-cancelled": "&cCancelled Shop Creation.", + "shop-purchase-cancelled": "&cCancelled Shop Purchase.", + "shop-stock-too-low": "&cThe shop only has {0} {1} left", + "you-cant-afford-to-buy": "&cThat costs {0}, but you only have {1}", + "negative-amount": "&cDerp, can't trade negative amounts", + "not-a-number": "&cThere can only be number, but you input {0}", + "not-a-integer": "&cThere can only be integer, but you input {0}", + "player-bought-from-your-store": "&c{0} purchased {1} {2} from your store.", + "shop-out-of-stock": "&5Your shop at {0}, {1}, {2}, has run out of {3}", + "shop-has-no-space": "&cThe shop only has room for {0} more {1}.", + "you-dont-have-that-many-items": "&cYou only have {0} {1}.", + "the-owner-cant-afford-to-buy-from-you": "&cThat costs {0} but the owner only has {1}", + "player-sold-to-your-store": "&a{0} sold {1} {2} to your store.", + "shop-out-of-space": "&5Your shop at {0}, {1}, {2}, is now full.", + "fee-charged-for-price-change": "&aYou pay &c{0}&a to change the price.", + "price-is-now": "&aThe shops new price is &e{0}", + "thats-not-a-number": "&cInvalid number", + "no-price-given": "&cPlease give a valid price.", + "average-price-nearby": "&aAverage Price Nearby: &e{0}", + "shop-has-changed": "&cThe shop you tried to use has changed since you clicked it!", + "shop-not-exist": "&cThere had no shop.", + "nearby-shop-this-way": "&aShop is {0} blocks away from you.", + "no-nearby-shop": "&cNo shops matching {0} nearby.", + "buying-more-than-selling": "&cWARNING: You are buying items for more than you are selling them!", + "not-enough-space": "&cYou only have room for {0} more of that!", + "refill-success": "&aRefill success", + "empty-success": "&aEmpty success", + "admin-shop": "AdminShop", + "unknown-owner": "Unknown", + "owner-bypass-check": "&eBypassed all checks, Trade successful! (You are shop owner)", + "reached-maximum-can-create": "&cYou have already created a maximum of {0}\/{1} shops!", + "restricted-prices": "&cRestricted prices for {0}: min {1} , max {2}", + "no-enough-money-to-keep-shops": "&cYou didn't have enough money to keep your shops! All shops have now been removed...", + "nothing-to-flush": "&aYou had no new shop message.", + "break-shop-use-supertool": "&eYou can break the shop by using the SuperTool.", + "failed-to-put-sign": "&cNot enough space around the shop to place the information sign.", + "failed-to-paste": "&cFailed to upload the data to Pastebin, Check your internet and try again. (See console for details)", + "warn-to-paste": "&eCollecting data and uploading it to Pastebin, this may take a while. &c&lWarning&c, The data is kept public for one week, it may leak your server configuration and other sensitive information, make sure you only send it to your <rusted staff\/developer.", + "price-too-high": "&c The shop price too high! You can't create one that is priced higher than {0}.", + "you-cant-create-shop-in-there": "&cYou don't have permission to create a shop at this location.", + "unknown-player": "&cTarget player doesn't exist, please check the username you typed.", + "shop-staff-cleared": "&aSuccessfully removed all staff for your shop.", + "shop-staff-added": "&aSuccessfully added {0} to your shop staffs.", + "shop-staff-deleted": "&aSuccessfully removed {0} from your shop staffs.", + "no-permission-build": "&cYou can't build a shop here.", + "success-change-owner-to-server": "&aSuccessfully set the shop owner to Server.", + "flush-finished": "&aSuccessfully flushed the messages.", + "purchase-failed": "&cPurchase failed: Internal Error, please contact the server administrator.", + "no-pending-action": "&cYou do not have any pending action", + "permission-denied-3rd-party": "&cPermission denied: 3rd party plugin [{0}].", + "menu": { + "successful-purchase": "&aSuccessfully Purchased:", + "successfully-sold": "&aSuccessfully Sold:", + "item-name-and-price": "&e{0} {1} &afor &e{2}", + "sell-tax": "&aYou paid &e{0} &ain taxes.", + "sell-tax-self": "&aYou own this shop so you don't pay taxes.", + "enchants": "&5Enchants", + "stored-enchants": "&5Stored Enchants", + "shop-information": "&aShop Information:", + "owner": "&aOwner: {0}", + "item": "&aItem: &e{0}", + "preview": "&b[Preview Item]", + "space": "&aSpace: &e{0}", + "stock": "&aStock &e{0}", + "price-per": "&aPrice per &e{0} &a- &e{1}", + "total-value-of-chest": "&aTotal value of Chest: &e{0}", + "damage-percent-remaining": "&e{0}% &aRemaining.", + "this-shop-is-buying": "&aThis shop is &dBUYING&a items.", + "this-shop-is-selling": "&aThis shop is &bSELLING&a items.", + "effects": "&aEffects", + "commands": { + "preview": "\/qs silentpreview {0} {1} {2} {3}" + } + }, + "bypassing-lock": "&cBypassing a QuickShop lock!", + "that-is-locked": "&cThat shop is locked.", + "how-many-buy": "&aEnter how many you wish to &bBUY&a in chat. You can buy &e{0}&a. Enter &ball&a to buy them all.", + "how-many-sell": "&aEnter how many you wish to &dSELL&a in chat. You have &e{0}&a available. Enter &ball&a to sell them all.", + "not-allowed-to-create": "&cYou may not create a shop here.", + "blacklisted-item": "&cThat item is blacklisted. You may not sell it", + "how-much-to-trade-for": "&aEnter how much you wish to trade one &e{0}&a for in chat.", + "command": { + "toggle-unlimited": { + "unlimited": "&aShop is now unlimited", + "limited": "&aShop is now limited" + }, + "no-owner-given": "&cNo owner given. Use &a\/qs setowner &c", + "new-owner": "&aNew owner: &e{0}", + "now-buying": "&aNow &dBUYING&a &e{0}", + "now-selling": "&aNow &bSELLING &e{0}", + "cleaning": "&aCleaning up shops with 0 stock...", + "reloading": "&aReloading...", + "cleaned": "&aCleaned &e{0}&a shops", + "no-type-given": "&cUsage: \/qs find ", + "no-amount-given": "&cNo amount given. Use &a\/qs refill &c", + "now-debuging": "&aSuccessfully switched to developer mode, Reloading QuickShop...", + "now-nolonger-debuging": "&aSuccessfully switched to production mode, Reloading QuickShop...", + "wrong-args": "&cParameters don't match, use \/qs help to check help", + "description": { + "title": "&aQuickShop Help", + "unlimited": "&eMakes a shop unlimited", + "setowner": "&eChanges who owns a shop", + "owner": "&eChanges who owns a shop", + "buy": "&eConverts a shop to &dBUY&e mode", + "sell": "&eConverts a shop to &bSELL&e mode", + "price": "&eChanges the buy\/selling price of one of your shops", + "clean": "&eRemoves all (loaded) shops with 0 stock", + "find": "&eLocates the nearest shop of a specific type.", + "reload": "&eReloads the config.yml for QuickShop", + "refill": "&eAdds a given number of items to a shop", + "empty": "&eRemoves all stock from a shop", + "debug": "&eSwitch to developer mode", + "create": "&eCreates a new shop at the target chest", + "fetchmessage": "&eFetch unread shop message", + "info": "&eShow QuickShop Statistics", + "paste": "&eAuto upload server data to Pastebin", + "staff": "&eManage your shop staffs", + "remove": "&eRemove your looking the shop", + "amount": "&eExecute for your actions with amount(For chat plugin issue)", + "about": "&eShow QuickShop abouts", + "help": "&eShow QuickShop helps", + "supercreate": "&eCreate a shop bypass all protection checks" + } + }, + "signs": { + "selling": "Selling {0}", + "header": "&c{0}", + "buying": "Buying {0}", + "item": "{0}", + "price": "{0} each", + "unlimited": "Unlimited" + }, + "controlpanel": { + "setowner": "&aOwner: &b{0} &e[&d&lChange&e]", + "infomation": "&aShop Control Panel:", + "setowner-hover": "&eClick to switch owner.", + "unlimited": "&aUnlimited: {0} &e[&d&lSwitch&e]", + "unlimited-hover": "&eClick to toggle if the shop is unlimited.", + "mode-selling": "&aShop mode: &bSelling &e[&d&lSwitch&e]", + "mode-selling-hover": "&eClick to convert the shop to be in the buying mode.", + "mode-buying": "&aShop mode: &bBuying &e[&d&lSwitch&e]", + "mode-buying-hover": "&eClick to convert the shop to be in the selling mode.", + "price": "&aPrice: &b{0} &e[&d&lSet&e]", + "price-hover": "&eClick to set a new price for the shop.", + "refill": "&aRefill: Refill the shop items &e[&d&lOK&e]", + "refill-hover": "&eClick to refill the shop.", + "empty": "&aEmpty: Remove shop all items &e[&d&lOK&e]", + "empty-hover": "&eClick to clear the inventory of the shop.", + "remove": "&c&l[Remove Shop]", + "remove-hover": "&eClick to remove this shop.", + "commands": { + "setowner": "\/qs setowner [Player]", + "unlimited": "\/qs silentunlimited {0} {1} {2} {3}", + "buy": "\/qs silentbuy {0} {1} {2} {3}", + "sell": "\/qs silentsell {0} {1} {2} {3}", + "price": "\/qs price [New Price]", + "refill": "\/qs refill [Amount]", + "empty": "\/qs silentempty {0} {1} {2} {3}", + "remove": "\/qs silentremove {0} {1} {2} {3}" + } + }, + "tableformat": { + "full_line": "+---------------------------------------------------+", + "left_half_line": "+--------------------", + "right_half_line": "--------------------+", + "left_begin": "| " + }, + "booleanformat": { + "success": "&a\u2714", + "failed": "&c\u2718" + }, + "tabcomplete": { + "price": "[price]", + "range": "[range]", + "amount": "[amount]" + }, + "updatenotify": { + "buttontitle": "[Update Now]", + "onekeybuttontitle": "[OneKey Update]", + "list": [ + "{0} is released, You are still using {1}!", + "Boom! New update {0} incoming, Update!", + "Surprise! {0} came out, you are on {1}", + "Looks like you need to update, {0} is released!", + "Ooops! {0} is now released, you are on {1}!", + "I promise, QS has been updated to {0}, why have you not updated?", + "Fixing and re... Sorry {0} is released!", + "Err! Nope, this is not an error, {0} has just been released!", + "OMG! {0} came out! Why are you still using {1}?", + "Todays News: QuickShop has been updated to {0}!", + "Plugin K.I.A, You should update to {0}!", + "Fuze is fuzeing update {0}, save update!", + "There is an update commander, {0} has just come out!", + "Look me style---{0} updated, your still using {1}", + "Ahhhhhhh! New update {0}! Update!", + "What U thinking? {0} has been released! Update!" + ], + "remote-disable-warning": "&cThis version of QuickShop is marked disabled by remote server, that mean this version may have serious problem, get details from our SpigotMC page: {0}. This warning will appear and spam your console until you use other not disabled version to replace this one, doesn't effect your server running.", + "label": { + "unstable": "[Unstable]", + "stable": "[Stable]", + "lts": "[LTS]", + "qualityverifyed": "[Quality]", + "github": "[Github]", + "spigotmc": "[SpigotMC]", + "bukkitdev": "[BukkitDev]", + "master": "[Master]" + } + }, + "shop-removed-cause-ongoing-fee": "&cYou shop at {0} was removed cause you had no enough money to keep it!", + "digits-reach-the-limit": "&cYou have reach the limit of the digits after the dot in price.", + "complete": "&aComplete!" +} \ No newline at end of file