mirror of
https://github.com/HMCL-dev/HMCL.git
synced 2025-09-22 10:43:57 -04:00
update
This commit is contained in:
parent
7ed3462e92
commit
8c2b65c876
@ -42,12 +42,12 @@ public final class Locales {
|
||||
public static final SupportedLocale DEFAULT = new SupportedLocale();
|
||||
|
||||
public static List<SupportedLocale> getSupportedLocales() {
|
||||
InputStream locales = Locales.class.getResourceAsStream("/assets/lang/locales.json");
|
||||
InputStream locales = Locales.class.getResourceAsStream("/assets/lang/languages.json");
|
||||
if (locales != null) {
|
||||
try (locales) {
|
||||
return JsonUtils.fromNonNullJsonFully(locales, JsonUtils.listTypeOf(SupportedLocale.class));
|
||||
} catch (Throwable e) {
|
||||
LOG.warning("Failed to load locales.json", e);
|
||||
LOG.warning("Failed to load languages.json", e);
|
||||
}
|
||||
}
|
||||
return List.of(DEFAULT);
|
||||
|
@ -31,6 +31,7 @@ import java.nio.file.Path;
|
||||
import java.nio.file.SimpleFileVisitor;
|
||||
import java.nio.file.attribute.BasicFileAttributes;
|
||||
|
||||
/// @author Glavo
|
||||
public abstract class CreateLocaleNames extends DefaultTask {
|
||||
|
||||
@OutputDirectory
|
||||
|
Loading…
x
Reference in New Issue
Block a user