Commit 1b9bce51 authored by CCTV-1's avatar CCTV-1

translation Forge.java

parent dd55b731
......@@ -28,6 +28,7 @@ import forge.sound.SoundSystem;
import forge.toolbox.*;
import forge.util.Callback;
import forge.util.FileUtil;
import forge.util.Localizer;
import forge.util.Utils;
import java.util.ArrayList;
......@@ -96,6 +97,8 @@ public class Forge implements ApplicationListener {
textureFiltering = prefs.getPrefBoolean(FPref.UI_LIBGDX_TEXTURE_FILTERING);
final Localizer localizer = Localizer.getInstance();
//load model on background thread (using progress bar to report progress)
FThreads.invokeInBackgroundThread(new Runnable() {
@Override
......@@ -106,13 +109,13 @@ public class Forge implements ApplicationListener {
FModel.initialize(splashScreen.getProgressBar(), null);
splashScreen.getProgressBar().setDescription("Loading fonts...");
splashScreen.getProgressBar().setDescription(localizer.getMessage("lblLoadingFonts"));
FSkinFont.preloadAll();
splashScreen.getProgressBar().setDescription("Loading card translations...");
splashScreen.getProgressBar().setDescription(localizer.getMessage("lblLoadingCardTranslations"));
CardTranslation.preloadTranslation(prefs.getPref(FPref.UI_LANGUAGE));
splashScreen.getProgressBar().setDescription("Finishing startup...");
splashScreen.getProgressBar().setDescription(localizer.getMessage("lblFinishingStartup"));
Gdx.app.postRunnable(new Runnable() {
@Override
......@@ -248,11 +251,16 @@ public class Forge implements ApplicationListener {
}
}
};
final Localizer localizer = Localizer.getInstance();
if (silent) {
callback.run(true);
}
else {
FOptionPane.showConfirmDialog("Are you sure you wish to restart Forge?", "Restart Forge", "Restart", "Cancel", callback);
FOptionPane.showConfirmDialog(
localizer.getMessage("lblAreYouSureYouWishRestartForge"), localizer.getMessage("lblRestartForge"),
localizer.getMessage("lblRestart"), localizer.getMessage("lblCancel"), callback);
}
}
......@@ -268,11 +276,16 @@ public class Forge implements ApplicationListener {
}
}
};
final Localizer localizer = Localizer.getInstance();
if (silent) {
callback.run(true);
}
else {
FOptionPane.showConfirmDialog("Are you sure you wish to exit Forge?", "Exit Forge", "Exit", "Cancel", callback);
FOptionPane.showConfirmDialog(
localizer.getMessage("lblAreYouSureYouWishExitForge"), localizer.getMessage("lblExitForge"),
localizer.getMessage("lblExit"), localizer.getMessage("lblCancel"), callback);
}
}
......
......@@ -970,3 +970,7 @@ lblCollection=Sammlung
lblCatalog=Katalog
lblCommanders=Komandeure
lblOathbreakers=Eidbrecher
#Forge.java
lblLoadingFonts=Loading fonts...
lblLoadingCardTranslations=Loading card translations...
lblFinishingStartup=Finishing startup...
\ No newline at end of file
......@@ -969,4 +969,8 @@ lblInventory=Inventory
lblCollection=Collection
lblCatalog=Catalog
lblCommanders=Commanders
lblOathbreakers=Oathbreakers
\ No newline at end of file
lblOathbreakers=Oathbreakers
#Forge.java
lblLoadingFonts=Loading fonts...
lblLoadingCardTranslations=Loading card translations...
lblFinishingStartup=Finishing startup...
\ No newline at end of file
......@@ -969,4 +969,8 @@ lblInventory=Inventario
lblCollection=Colección
lblCatalog=Catálogo
lblCommanders=Commanders
lblOathbreakers=Oathbreakers
\ No newline at end of file
lblOathbreakers=Oathbreakers
#Forge.java
lblLoadingFonts=Loading fonts...
lblLoadingCardTranslations=Loading card translations...
lblFinishingStartup=Finishing startup...
\ No newline at end of file
......@@ -969,4 +969,8 @@ lblInventory=库存
lblCollection=珍藏
lblCatalog=目录
lblCommanders=指挥官
lblOathbreakers=破誓者
\ No newline at end of file
lblOathbreakers=破誓者
#Forge.java
lblLoadingFonts=加载字体中
lblLoadingCardTranslations=加载卡牌翻译中
lblFinishingStartup=完成启动
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment