From 2016011efc6798c77b85de3cb3b3bc6b24c7f8bb Mon Sep 17 00:00:00 2001 From: Ghost_chu <2908803755@qq.com> Date: Wed, 29 Sep 2021 20:09:20 +0800 Subject: [PATCH] fix translation file --- pom.xml | 7 +++++++ .../maxgamer/quickshop/util/language/text/TextManager.java | 3 ++- src/main/resources/lang-original/messages.json | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index c2cfdb3b0..2390b394b 100644 --- a/pom.xml +++ b/pom.xml @@ -212,6 +212,11 @@ net.kyori. org.maxgamer.quickshop.shade.org.net.kyori. + + com.squareup. + org.maxgamer.quickshop.shade.org.com.squareup. + + @@ -883,12 +888,14 @@ commons-codec commons-codec 1.15 + compile org.slf4j slf4j-nop 1.7.32 + compile diff --git a/src/main/java/org/maxgamer/quickshop/util/language/text/TextManager.java b/src/main/java/org/maxgamer/quickshop/util/language/text/TextManager.java index 25125b0f7..6a5e89ad2 100644 --- a/src/main/java/org/maxgamer/quickshop/util/language/text/TextManager.java +++ b/src/main/java/org/maxgamer/quickshop/util/language/text/TextManager.java @@ -52,8 +52,9 @@ public class TextManager { try (InputStream stream = plugin.getResource("lang-original/messages.json")) { if (stream != null) bundledLang.loadFromString(new String(Util.inputStream2ByteArray(stream), StandardCharsets.UTF_8)); - } catch (IOException | InvalidConfigurationException ignored) { + } catch (IOException | InvalidConfigurationException ex) { bundledLang = new JsonConfiguration(); + plugin.getLogger().log(Level.SEVERE,"Cannot load bundled language file from Jar, some strings may missing!",ex); } distribution.getAvailableLanguages().parallelStream().forEach(availableLanguage -> { try { diff --git a/src/main/resources/lang-original/messages.json b/src/main/resources/lang-original/messages.json index f01149c7a..c2fb137d8 100644 --- a/src/main/resources/lang-original/messages.json +++ b/src/main/resources/lang-original/messages.json @@ -325,7 +325,7 @@ "command-type-mismatch": "&cThis command only can executed by &b{0}.", "unlimited-shop-owner-changed": "&eThis unlimited shop owner has been changed to {0}.", "unlimited-shop-owner-keeped": "&eAttention: The shop owner still is unlimited shop owner, you need re-set new shop owner by yourself.", - "server-crash-warning": "&cServer may crash after execute /qs reload command if you replace/delete QuickShop plugin Jar file while server running." + "server-crash-warning": "&cServer may crash after execute /qs reload command if you replace/delete QuickShop plugin Jar file while server running.", "reloading-status": { "success": "&aReload completed without any errors.", "require-restart": "&aReload completed. &e(Some changes require server restart to affect)",