From ea7ee968d4e9e95d78dac6181bb0e9a15c30b7ab Mon Sep 17 00:00:00 2001
From: modmuss <modmuss50@gmail.com>
Date: Thu, 30 May 2024 09:22:22 +0100
Subject: [PATCH] Suppress translated tag warnings in prod (#3791)

---
 .../tag/convention/v2/TranslationConventionLogWarnings.java   | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/fabric-convention-tags-v2/src/main/java/net/fabricmc/fabric/impl/tag/convention/v2/TranslationConventionLogWarnings.java b/fabric-convention-tags-v2/src/main/java/net/fabricmc/fabric/impl/tag/convention/v2/TranslationConventionLogWarnings.java
index 34daced51..b75f8a950 100644
--- a/fabric-convention-tags-v2/src/main/java/net/fabricmc/fabric/impl/tag/convention/v2/TranslationConventionLogWarnings.java
+++ b/fabric-convention-tags-v2/src/main/java/net/fabricmc/fabric/impl/tag/convention/v2/TranslationConventionLogWarnings.java
@@ -32,6 +32,7 @@ import net.minecraft.util.Language;
 
 import net.fabricmc.api.ModInitializer;
 import net.fabricmc.fabric.api.event.lifecycle.v1.ServerLifecycleEvents;
+import net.fabricmc.loader.api.FabricLoader;
 
 public class TranslationConventionLogWarnings implements ModInitializer {
 	private static final Logger LOGGER = LoggerFactory.getLogger(TranslationConventionLogWarnings.class);
@@ -44,7 +45,8 @@ public class TranslationConventionLogWarnings implements ModInitializer {
 	private static final LogWarningMode LOG_UNTRANSLATED_WARNING_MODE = setupLogWarningModeProperty();
 
 	private static LogWarningMode setupLogWarningModeProperty() {
-		String property = System.getProperty("fabric-tag-conventions-v2.missingTagTranslationWarning", LogWarningMode.SHORT.name()).toUpperCase(Locale.ROOT);
+		final LogWarningMode defaultMode = FabricLoader.getInstance().isDevelopmentEnvironment() ? LogWarningMode.SHORT : LogWarningMode.SILENCED;
+		String property = System.getProperty("fabric-tag-conventions-v2.missingTagTranslationWarning", defaultMode.name()).toUpperCase(Locale.ROOT);
 
 		try {
 			return LogWarningMode.valueOf(property);