Mirror von
https://github.com/GeyserMC/Geyser.git
synchronisiert 2024-11-20 06:50:09 +01:00
Fix message translation regression
Dieser Commit ist enthalten in:
Ursprung
321f98c75d
Commit
545087fba4
@ -53,12 +53,14 @@ public class MinecraftTranslationRegistry extends TranslatableComponentRenderer<
|
|||||||
// Get the locale string
|
// Get the locale string
|
||||||
String localeString = MinecraftLocale.getLocaleStringIfPresent(key, locale);
|
String localeString = MinecraftLocale.getLocaleStringIfPresent(key, locale);
|
||||||
if (localeString == null) {
|
if (localeString == null) {
|
||||||
if (fallback == null) {
|
if (fallback != null) {
|
||||||
// No fallback and no match for string; nothing will be translated/inserted
|
// Fallback strings will still have their params inserted
|
||||||
return null;
|
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}`
|
// Replace the `%s` with numbered inserts `{0}`
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren