mirror of
https://github.com/GeyserMC/Geyser.git
synced 2024-08-14 23:57:35 +00:00
Fix message translation regression
This commit is contained in:
parent
321f98c75d
commit
545087fba4
1 changed files with 7 additions and 5 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
// Replace the `%s` with numbered inserts `{0}`
|
||||
|
|
Loading…
Reference in a new issue