mirror of
https://github.com/DiscordSRV/Ascension.git
synced 2025-01-05 18:58:34 +01:00
Use DiscordSRV default locale for translation lookup
This commit is contained in:
parent
90a88d5cfa
commit
19c387ea61
@ -39,8 +39,6 @@ import net.kyori.adventure.text.serializer.plain.PlainTextComponentSerializer;
|
|||||||
import net.kyori.ansi.ColorLevel;
|
import net.kyori.ansi.ColorLevel;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
import java.util.Locale;
|
|
||||||
|
|
||||||
public class ComponentFactory implements MinecraftComponentFactory {
|
public class ComponentFactory implements MinecraftComponentFactory {
|
||||||
|
|
||||||
public static final Class<?> UNRELOCATED_ADVENTURE_COMPONENT;
|
public static final Class<?> UNRELOCATED_ADVENTURE_COMPONENT;
|
||||||
@ -86,7 +84,7 @@ public class ComponentFactory implements MinecraftComponentFactory {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private String provideTranslation(TranslatableComponent component) {
|
private String provideTranslation(TranslatableComponent component) {
|
||||||
Translation translation = translationRegistry.lookup(Locale.US, component.key());
|
Translation translation = translationRegistry.lookup(discordSRV.defaultLocale(), component.key());
|
||||||
if (translation == null) {
|
if (translation == null) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user