From 545087fba47b28ee791a478777266c45658b1a41 Mon Sep 17 00:00:00 2001 From: Camotoy <20743703+Camotoy@users.noreply.github.com> Date: Wed, 26 Apr 2023 15:33:36 -0400 Subject: [PATCH] Fix message translation regression --- .../geyser/text/MinecraftTranslationRegistry.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/core/src/main/java/org/geysermc/geyser/text/MinecraftTranslationRegistry.java b/core/src/main/java/org/geysermc/geyser/text/MinecraftTranslationRegistry.java index aaab65c9f..3310859d0 100644 --- a/core/src/main/java/org/geysermc/geyser/text/MinecraftTranslationRegistry.java +++ b/core/src/main/java/org/geysermc/geyser/text/MinecraftTranslationRegistry.java @@ -53,12 +53,14 @@ public class MinecraftTranslationRegistry extends TranslatableComponentRenderer< // Get the locale string String localeString = MinecraftLocale.getLocaleStringIfPresent(key, locale); if (localeString == null) { - if (fallback == null) { - // No fallback and no match for string; nothing will be translated/inserted - return null; + if (fallback != null) { + // Fallback strings will still have their params inserted + localeString = fallback; + } else { + // The original translation will be translated + // Can be tested with 1.19.4: {"translate":"%s","with":[{"text":"weeeeeee"}]} + localeString = key; } - // Fallback strings will still have their params inserted - localeString = fallback; } // Replace the `%s` with numbered inserts `{0}`