Use DiscordSRV default locale for translation lookup

This commit is contained in:
Vankka 2023-11-17 00:04:28 +02:00
parent 90a88d5cfa
commit 19c387ea61
No known key found for this signature in database
GPG Key ID: 6E50CB7A29B96AD0

View File

@ -39,8 +39,6 @@ import net.kyori.adventure.text.serializer.plain.PlainTextComponentSerializer;
import net.kyori.ansi.ColorLevel;
import org.jetbrains.annotations.NotNull;
import java.util.Locale;
public class ComponentFactory implements MinecraftComponentFactory {
public static final Class<?> UNRELOCATED_ADVENTURE_COMPONENT;
@ -86,7 +84,7 @@ public class ComponentFactory implements MinecraftComponentFactory {
}
private String provideTranslation(TranslatableComponent component) {
Translation translation = translationRegistry.lookup(Locale.US, component.key());
Translation translation = translationRegistry.lookup(discordSRV.defaultLocale(), component.key());
if (translation == null) {
return null;
}