mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 04:38:00 +00:00
Translating hard-coded text to res en-US.properties
This commit is contained in:
@@ -18,6 +18,7 @@ import forge.toolbox.FComboBox;
|
|||||||
import forge.toolbox.FComboBoxPanel;
|
import forge.toolbox.FComboBoxPanel;
|
||||||
import forge.toolbox.FLabel;
|
import forge.toolbox.FLabel;
|
||||||
import forge.toolbox.FOptionPane;
|
import forge.toolbox.FOptionPane;
|
||||||
|
import forge.util.Localizer;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.apache.commons.lang3.tuple.Pair;
|
import org.apache.commons.lang3.tuple.Pair;
|
||||||
|
|
||||||
@@ -38,6 +39,8 @@ import java.util.List;
|
|||||||
public enum CSubmenuPreferences implements ICDoc {
|
public enum CSubmenuPreferences implements ICDoc {
|
||||||
/** */
|
/** */
|
||||||
SINGLETON_INSTANCE;
|
SINGLETON_INSTANCE;
|
||||||
|
final Localizer localizer = Localizer.getInstance();
|
||||||
|
|
||||||
|
|
||||||
private VSubmenuPreferences view;
|
private VSubmenuPreferences view;
|
||||||
private ForgePreferences prefs;
|
private ForgePreferences prefs;
|
||||||
@@ -66,7 +69,7 @@ public enum CSubmenuPreferences implements ICDoc {
|
|||||||
if (updating) { return; }
|
if (updating) { return; }
|
||||||
// prevent changing DEV_MODE while network game running
|
// prevent changing DEV_MODE while network game running
|
||||||
if (FServerManager.getInstance().isMatchActive()) {
|
if (FServerManager.getInstance().isMatchActive()) {
|
||||||
System.out.println("Can't change DEV_MODE while a network match is in progress!");
|
System.out.println(localizer.getMessage("CantChangeDevModeWhileNetworkMath"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -192,7 +195,7 @@ public enum CSubmenuPreferences implements ICDoc {
|
|||||||
public void run() {
|
public void run() {
|
||||||
prefs.setPref(FPref.DISABLE_DISPLAY_JAVA_8_UPDATE_WARNING, false);
|
prefs.setPref(FPref.DISABLE_DISPLAY_JAVA_8_UPDATE_WARNING, false);
|
||||||
prefs.save();
|
prefs.save();
|
||||||
FOptionPane.showMessageDialog("Compatibility warnings re-enabled!");
|
FOptionPane.showMessageDialog(localizer.getMessage("CompatibilityWarningsReEnabled"));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -242,10 +245,8 @@ public enum CSubmenuPreferences implements ICDoc {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void resetForgeSettingsToDefault() {
|
private void resetForgeSettingsToDefault() {
|
||||||
final String userPrompt =
|
final String userPrompt =localizer.getMessage("AresetForgeSettingsToDefault");
|
||||||
"This will reset all preferences to their defaults and restart Forge.\n\n" +
|
if (FOptionPane.showConfirmDialog(userPrompt, localizer.getMessage("TresetForgeSettingsToDefault"))) {
|
||||||
"Reset and restart Forge?";
|
|
||||||
if (FOptionPane.showConfirmDialog(userPrompt, "Reset Settings")) {
|
|
||||||
final ForgePreferences prefs = FModel.getPreferences();
|
final ForgePreferences prefs = FModel.getPreferences();
|
||||||
prefs.reset();
|
prefs.reset();
|
||||||
prefs.save();
|
prefs.save();
|
||||||
@@ -255,38 +256,28 @@ public enum CSubmenuPreferences implements ICDoc {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void resetDeckEditorLayout() {
|
private void resetDeckEditorLayout() {
|
||||||
final String userPrompt =
|
final String userPrompt =localizer.getMessage("AresetDeckEditorLayout");
|
||||||
"This will reset the Deck Editor screen layout.\n" +
|
if (FOptionPane.showConfirmDialog(userPrompt, localizer.getMessage("TresetDeckEditorLayout"))) {
|
||||||
"All tabbed views will be restored to their default positions.\n\n" +
|
|
||||||
"Reset layout?";
|
|
||||||
if (FOptionPane.showConfirmDialog(userPrompt, "Reset Deck Editor Layout")) {
|
|
||||||
if (FScreen.DECK_EDITOR_CONSTRUCTED.deleteLayoutFile()) {
|
if (FScreen.DECK_EDITOR_CONSTRUCTED.deleteLayoutFile()) {
|
||||||
FOptionPane.showMessageDialog("Deck Editor layout has been reset.");
|
FOptionPane.showMessageDialog(localizer.getMessage("OKresetDeckEditorLayout"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void resetWorkshopLayout() {
|
private void resetWorkshopLayout() {
|
||||||
final String userPrompt =
|
final String userPrompt =localizer.getMessage("AresetWorkshopLayout");
|
||||||
"This will reset the Workshop screen layout.\n" +
|
if (FOptionPane.showConfirmDialog(userPrompt, localizer.getMessage("TresetWorkshopLayout"))) {
|
||||||
"All tabbed views will be restored to their default positions.\n\n" +
|
|
||||||
"Reset layout?";
|
|
||||||
if (FOptionPane.showConfirmDialog(userPrompt, "Reset Workshop Layout")) {
|
|
||||||
if (FScreen.WORKSHOP_SCREEN.deleteLayoutFile()) {
|
if (FScreen.WORKSHOP_SCREEN.deleteLayoutFile()) {
|
||||||
FOptionPane.showMessageDialog("Workshop layout has been reset.");
|
FOptionPane.showMessageDialog(localizer.getMessage("OKresetWorkshopLayout"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void resetMatchScreenLayout() {
|
private void resetMatchScreenLayout() {
|
||||||
final String userPrompt =
|
final String userPrompt =localizer.getMessage("AresetMatchScreenLayout");
|
||||||
"This will reset the layout of the Match screen.\n" +
|
if (FOptionPane.showConfirmDialog(userPrompt, localizer.getMessage("TresetMatchScreenLayout"))) {
|
||||||
"If you want to save the current layout first, please use " +
|
|
||||||
"the Dock tab -> Save Layout option in the Match screen.\n\n" +
|
|
||||||
"Reset layout?";
|
|
||||||
if (FOptionPane.showConfirmDialog(userPrompt, "Reset Match Screen Layout")) {
|
|
||||||
if (FScreen.deleteMatchLayoutFile()) {
|
if (FScreen.deleteMatchLayoutFile()) {
|
||||||
FOptionPane.showMessageDialog("Match Screen layout has been reset.");
|
FOptionPane.showMessageDialog(localizer.getMessage("OKresetMatchScreenLayout"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -163,4 +163,19 @@ lblReportBug = Something broken?
|
|||||||
lblHowToPlay = Rules of the Game.
|
lblHowToPlay = Rules of the Game.
|
||||||
lblLicensing = Forge legal.
|
lblLicensing = Forge legal.
|
||||||
ContentDownloaders = Content Downloaders
|
ContentDownloaders = Content Downloaders
|
||||||
ReleaseNotes = Release Notes
|
ReleaseNotes = Release Notes
|
||||||
|
|
||||||
|
# CSubmenuPreferences.java
|
||||||
|
CantChangeDevModeWhileNetworkMath = Can't change DEV_MODE while a network match is in progress!
|
||||||
|
CompatibilityWarningsReEnabled = Compatibility warnings re-enabled!
|
||||||
|
AresetForgeSettingsToDefault = This will reset all preferences to their defaults and restart Forge.\n\n Reset and restart Forge?
|
||||||
|
TresetForgeSettingsToDefault =Reset Settings
|
||||||
|
AresetDeckEditorLayout =This will reset the Deck Editor screen layout.\n All tabbed views will be restored to their default positions.\n\n Reset layout?
|
||||||
|
TresetDeckEditorLayout =Reset Deck Editor Layout
|
||||||
|
OKresetDeckEditorLayout=Deck Editor layout has been reset.
|
||||||
|
AresetWorkshopLayout = This will reset the Workshop screen layout.\n All tabbed views will be restored to their default positions.\n\n Reset layout?
|
||||||
|
TresetWorkshopLayout = Reset Workshop Layout
|
||||||
|
OKresetWorkshopLayout = Workshop layout has been reset.
|
||||||
|
AresetMatchScreenLayout = This will reset the layout of the Match screen.\n If you want to save the current layout first, please use the Dock tab -> Save Layout option in the Match screen.\n\n Reset layout?
|
||||||
|
TresetMatchScreenLayout = Reset Match Screen Layout
|
||||||
|
OKresetMatchScreenLayout = Match Screen layout has been reset.
|
||||||
|
|||||||
Reference in New Issue
Block a user