v0.3.4: only reviewed languages can be default languages now

This commit is contained in:
Evan Debenham 2016-02-04 19:47:26 -05:00 committed by Evan Debenham
parent 55ee9091ab
commit fff60a7c1d

View File

@ -346,7 +346,13 @@ public class ShatteredPixelDungeon extends Game {
public static Messages.Languages language() {
String code = Preferences.INSTANCE.getString(Preferences.KEY_LANG, null);
if (code == null) return Messages.Languages.matchLocale(Locale.getDefault());
if (code == null){
Messages.Languages lang = Messages.Languages.matchLocale(Locale.getDefault());
if (lang.status() == Messages.Languages.Status.REVIEWED)
return lang;
else
return Messages.Languages.ENGLISH;
}
else return Messages.Languages.matchCode(code);
}