3
0
Mirror von https://github.com/GeyserMC/Geyser.git synchronisiert 2024-10-03 08:21:06 +02:00

Fix message translation regression

Dieser Commit ist enthalten in:
Camotoy 2023-04-26 15:33:36 -04:00
Ursprung 321f98c75d
Commit 545087fba4
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 7EEFB66FE798081F

Datei anzeigen

@ -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}`