Skip to content

Commit

Permalink
chore: improve language provider error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
Elenterius committed Jul 16, 2024
1 parent 929b4ee commit eee7c57
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ public abstract class AbstractLangProvider implements DataProvider, LangProvider

private final Map<String, String> 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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit eee7c57

Please sign in to comment.