From eee7c57876a06522f2c512c65a08eb708237234a Mon Sep 17 00:00:00 2001 From: Elenterius Date: Wed, 17 Jul 2024 00:39:32 +0200 Subject: [PATCH] chore: improve language provider error messages --- .../biomancy/datagen/lang/AbstractLangProvider.java | 4 ++-- .../biomancy/datagen/lang/EnglishLangProvider.java | 6 +++--- .../biomancy/datagen/lang/PirateLangProvider.java | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/datagen/java/com/github/elenterius/biomancy/datagen/lang/AbstractLangProvider.java b/src/datagen/java/com/github/elenterius/biomancy/datagen/lang/AbstractLangProvider.java index 206593888..d3ad73350 100644 --- a/src/datagen/java/com/github/elenterius/biomancy/datagen/lang/AbstractLangProvider.java +++ b/src/datagen/java/com/github/elenterius/biomancy/datagen/lang/AbstractLangProvider.java @@ -44,8 +44,8 @@ public abstract class AbstractLangProvider implements DataProvider, LangProvider private final Map translations = new LinkedHashMap<>(); private final PackOutput packOutput; - private final String modId; - private final String languageLocale; + protected final String modId; + protected final String languageLocale; protected AbstractLangProvider(PackOutput packOutput, String modId, String languageLocale) { this.packOutput = packOutput; diff --git a/src/datagen/java/com/github/elenterius/biomancy/datagen/lang/EnglishLangProvider.java b/src/datagen/java/com/github/elenterius/biomancy/datagen/lang/EnglishLangProvider.java index 03b049fde..e3611f79f 100644 --- a/src/datagen/java/com/github/elenterius/biomancy/datagen/lang/EnglishLangProvider.java +++ b/src/datagen/java/com/github/elenterius/biomancy/datagen/lang/EnglishLangProvider.java @@ -55,21 +55,21 @@ public boolean hasMissingTranslations() { if (!itemsToTranslate.isEmpty()) { for (Item item : itemsToTranslate) { - LOGGER.error(LOG_MARKER, "Missing translation for item '{}'", item); + LOGGER.error(LOG_MARKER, "Missing {} translation for item '{}'", languageLocale, item); } isAnyMissing = true; } if (!blocksToTranslate.isEmpty()) { for (Block block : blocksToTranslate) { - LOGGER.error(LOG_MARKER, "Missing translation for block '{}'", block); + LOGGER.error(LOG_MARKER, "Missing {} translation for block '{}'", languageLocale, block); } isAnyMissing = true; } if (!serumsToTranslate.isEmpty()) { for (Serum serum : serumsToTranslate) { - LOGGER.error(LOG_MARKER, "Missing translation for serum '{}'", serum); + LOGGER.error(LOG_MARKER, "Missing {} translation for serum '{}'", languageLocale, serum); } isAnyMissing = true; } diff --git a/src/datagen/java/com/github/elenterius/biomancy/datagen/lang/PirateLangProvider.java b/src/datagen/java/com/github/elenterius/biomancy/datagen/lang/PirateLangProvider.java index df79578b3..f7976a62f 100644 --- a/src/datagen/java/com/github/elenterius/biomancy/datagen/lang/PirateLangProvider.java +++ b/src/datagen/java/com/github/elenterius/biomancy/datagen/lang/PirateLangProvider.java @@ -54,21 +54,21 @@ public boolean hasMissingTranslations() { if (!itemsToTranslate.isEmpty()) { for (Item item : itemsToTranslate) { - LOGGER.error(LOG_MARKER, "Missing translation for item '{}'", item); + LOGGER.error(LOG_MARKER, "Missing {} translation for item '{}'", languageLocale, item); } isAnyMissing = true; } if (!blocksToTranslate.isEmpty()) { for (Block block : blocksToTranslate) { - LOGGER.error(LOG_MARKER, "Missing translation for block '{}'", block); + LOGGER.error(LOG_MARKER, "Missing {} translation for block '{}'", languageLocale, block); } isAnyMissing = true; } if (!serumsToTranslate.isEmpty()) { for (Serum serum : serumsToTranslate) { - LOGGER.error(LOG_MARKER, "Missing translation for serum '{}'", serum); + LOGGER.error(LOG_MARKER, "Missing {} translation for serum '{}'", languageLocale, serum); } isAnyMissing = true; }