Skip to content

Commit

Permalink
Merge pull request #35 from rexlManu/main
Browse files Browse the repository at this point in the history
fix: ignore extra json file that break parsing
  • Loading branch information
PikaMug authored Nov 15, 2024
2 parents 16afdc8 + 9067a63 commit e07a1b0
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/main/java/me/pikamug/localelib/LocaleKeys.java
Original file line number Diff line number Diff line change
Expand Up @@ -1019,6 +1019,13 @@ public static Map<String, String> loadTranslations() throws IOException {
Map<String, String> 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);
Expand Down

0 comments on commit e07a1b0

Please sign in to comment.