From 9067a63af2e63ac9838cf1f23c8c1b798d5e52ac Mon Sep 17 00:00:00 2001 From: Emmanuel Lampe Date: Sat, 9 Nov 2024 11:23:38 +0100 Subject: [PATCH] fix: ignore extra json file that break parsing --- src/main/java/me/pikamug/localelib/LocaleKeys.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/main/java/me/pikamug/localelib/LocaleKeys.java b/src/main/java/me/pikamug/localelib/LocaleKeys.java index 3580a5f..4f62e37 100644 --- a/src/main/java/me/pikamug/localelib/LocaleKeys.java +++ b/src/main/java/me/pikamug/localelib/LocaleKeys.java @@ -1019,6 +1019,13 @@ public static Map loadTranslations() throws IOException { Map dictionary = new HashMap<>(); while (matchingResources.hasNext()) { String resource = matchingResources.next(); + + if (resource.endsWith("_all.json") + || resource.endsWith("_list.json") + || resource.endsWith("deprecated.json")) { + continue; + } + try (InputStream inputStream = classLoader.getResourceAsStream(resource)) { if (resource.endsWith(".json")) { dictionary = loadJsonFile(inputStream);