v2.5.4: adjusted language loading slightly, english now has 'en' code
This commit is contained in:
@@ -24,7 +24,7 @@ package com.shatteredpixel.shatteredpixeldungeon.messages;
|
||||
import java.util.Locale;
|
||||
|
||||
public enum Languages {
|
||||
ENGLISH("english", "", Status.O_COMPLETE, null, null),
|
||||
ENGLISH("english", "en", Status.O_COMPLETE, null, null),
|
||||
CHINESE("中文", "zh", Status.__UNREVIEW, new String[]{"Chronie_Lynn_Iwa", "Jinkeloid(zdx00793)", "endlesssolitude"}, new String[]{"931451545", "Budding", "Fatir", "Fishbone", "Hcat", "HoofBumpBlurryface", "Horr_lski", "Lery", "Lyn_0401", "Lyx0527", "Ooooscar", "Oxide111", "RainSlide", "ShatteredFlameBlast", "SpaceAnchor", "SunsetGlowTheDOGE", "Teller", "hmdzl001", "leo", "tempest102", "户方狸奴"}),
|
||||
KOREAN("한국어", "ko", Status.__UNREVIEW, new String[]{"Cocoa", "Flameblast12", "GameConqueror", "Korean2017"}, new String[]{"AFS", "N8fall", "WondarRabb1t", "chlrhwnstkd", "ddojin0115", "eeeei", "enjuxx", "hancyel", "linterpreteur", "lemonam", "lsiebnie", "sora0430"}),
|
||||
RUSSIAN("русский", "ru", Status.__UNREVIEW, new String[]{"AprilRain(Vadzim Navumaû)", "ConsideredHamster", "Dominowood371", "Inevielle", "apxwn", "yarikonline"}, new String[]{"AngryPotato", "AttHawk46", "BlueberryShortcake", "CatGirlSasha", "Enwviun", "HerrGotlieb", "HoloTheWise", "Ilbko", "JleHuBbluKoT", "KirStaLong", "MrXantar", "Nikets", "OneDuo", "Originalej0name", "Raymundo", "Shamahan", "Thomasg63", "XAutumn", "Ya6lo4ko", "dasfan123", "ifritdiezel", "kirusyaga", "long_live_the_9", "pancreper1", "perefrazz", "roman.yagodin", "tibby", "un_logic", "vivatimperia", "Вoвa"}),
|
||||
|
||||
@@ -86,16 +86,18 @@ public class Messages {
|
||||
|
||||
//store language and locale info for various string logic
|
||||
Messages.lang = lang;
|
||||
Locale bundleLocal;
|
||||
if (lang == Languages.ENGLISH){
|
||||
locale = Locale.ENGLISH;
|
||||
bundleLocal = Locale.ROOT; //english is source, uses root locale for fetching bundle
|
||||
} else {
|
||||
locale = new Locale(lang.code());
|
||||
bundleLocal = new Locale(lang.code());
|
||||
}
|
||||
formatters.clear();
|
||||
|
||||
//strictly match the language code when fetching bundles however
|
||||
bundles = new ArrayList<>();
|
||||
Locale bundleLocal = new Locale(lang.code());
|
||||
for (String file : prop_files) {
|
||||
bundles.add(I18NBundle.createBundle(Gdx.files.internal(file), bundleLocal));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user