Fixed language not switching to english
This commit is contained in:
@@ -17,6 +17,8 @@ import io.anuke.ucore.entities.Entities;
|
||||
import io.anuke.ucore.entities.EntityGroup;
|
||||
import io.anuke.ucore.scene.ui.layout.Unit;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
public class Vars{
|
||||
public static final boolean testAndroid = false;
|
||||
//shorthand for whether or not this is running on android
|
||||
@@ -83,6 +85,9 @@ public class Vars{
|
||||
|
||||
public static final int tilesize = 8;
|
||||
|
||||
public static final Locale[] locales = {new Locale("en"), new Locale("fr", "FR"), new Locale("ru"), new Locale("pl", "PL"),
|
||||
new Locale("es", "LA"), new Locale("pt", "BR"), new Locale("ko"), new Locale("in", "ID")};
|
||||
|
||||
public static final Color[] playerColors = {
|
||||
Color.valueOf("82759a"),
|
||||
Color.valueOf("c0c1c5"),
|
||||
|
||||
@@ -56,6 +56,7 @@ public class BundleLoader {
|
||||
FileHandle handle = Gdx.files.internal("bundles/bundle");
|
||||
|
||||
Locale locale = getLocale();
|
||||
Locale.setDefault(locale);
|
||||
if(!headless) Log.info("Got locale: {0}", locale);
|
||||
Core.bundle = I18NBundle.createBundle(handle, locale);
|
||||
}
|
||||
|
||||
@@ -10,11 +10,10 @@ import io.anuke.ucore.util.Log;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
import static io.anuke.mindustry.Vars.locales;
|
||||
import static io.anuke.mindustry.Vars.ui;
|
||||
|
||||
public class LanguageDialog extends FloatingDialog{
|
||||
private Locale[] locales = {new Locale("en"), new Locale("fr", "FR"), new Locale("ru"), new Locale("pl", "PL"),
|
||||
new Locale("es", "LA"), new Locale("pt", "BR"), new Locale("ko"), new Locale("in", "ID")};
|
||||
|
||||
public LanguageDialog(){
|
||||
super("$text.settings.language");
|
||||
|
||||
@@ -39,10 +39,10 @@ public class Smelter extends Block{
|
||||
|
||||
@Override
|
||||
public void init(){
|
||||
for(int i = 0; i < inputs.length; i ++){
|
||||
final Item item = inputs[i];
|
||||
for(Item item : inputs){
|
||||
bars.add(new BlockBar(Color.GREEN, true, tile -> (float)tile.entity.getItem(item)/capacity));
|
||||
}
|
||||
//fuel and output bars, respectively: should these be added, or is it too cluttery?
|
||||
//bars.add(new BlockBar(Color.ORANGE, true, tile -> (float)tile.entity.getItem(fuel)/capacity));
|
||||
//bars.add(new BlockBar(Color.LIGHT_GRAY, true, tile -> (float)tile.entity.getItem(result)/capacity));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user