diff --git a/res/lang/de.properties b/res/lang/de.properties index 04904080d1f..fb241fef371 100644 --- a/res/lang/de.properties +++ b/res/lang/de.properties @@ -1,4 +1,4 @@ -program/name=MTG Forge - 10/2009 - http://mtgrares.blogspot.com +program/name=MTG Forge - http://mtgrares.blogspot.com @@ -79,6 +79,8 @@ ErrorViewer/message=Ein Fehler ist aufgetreten. Du kannst diese Nachricht kopier Falls du keine Konto anlegen willst, schreibe eine Mail an\n\ \t%s\n\n\ %s\n\n\ + Version:\n\ + %s\n\ Detaillierter Stapelverlauf:\n ErrorViewer/button/save=Speichern... ErrorViewer/button/close=Schließen diff --git a/res/lang/en.properties b/res/lang/en.properties index 539ece7b931..f03b423abc3 100644 --- a/res/lang/en.properties +++ b/res/lang/en.properties @@ -1,4 +1,4 @@ -program/name=MTG Forge - 10/2009 - http://mtgrares.blogspot.com +program/name=MTG Forge - http://mtgrares.blogspot.com @@ -79,6 +79,8 @@ ErrorViewer/message=An error has occured. You can copy/paste this message or sav If you don't want to register an account, you can mail it directly to\n\ \t%s\n\n\ %s\n\n\ + Version:\n\ + %s\n\ Detailed error trace:\n ErrorViewer/button/save=Save... ErrorViewer/button/close=Close diff --git a/res/main.properties b/res/main.properties index 263187a2a15..ea8e5f1e705 100644 --- a/res/main.properties +++ b/res/main.properties @@ -1,5 +1,6 @@ program/mail=mtgrares@yahoo.com program/forum=http://www.slightlymagic.net/forum/viewforum.php?f=26 +program/version=MTG Forge 09/11/02 tokens--file=AllTokens.txt diff --git a/src/forge/error/ErrorViewer.java b/src/forge/error/ErrorViewer.java index 17b53990a9a..12b68812e82 100644 --- a/src/forge/error/ErrorViewer.java +++ b/src/forge/error/ErrorViewer.java @@ -2,6 +2,7 @@ package forge.error; +import static forge.properties.ForgeProps.*; import static java.awt.event.InputEvent.*; import static java.awt.event.KeyEvent.*; import static javax.swing.JOptionPane.*; @@ -27,7 +28,6 @@ import javax.swing.JScrollPane; import javax.swing.JTextArea; import javax.swing.KeyStroke; -import forge.properties.ForgeProps; import forge.properties.NewConstants; @@ -109,11 +109,10 @@ public class ErrorViewer implements NewConstants, NewConstants.LANG.ErrorViewer //Button is not modified, String gets the automatic listener to hide the dialog Object[] options = { - new JButton(new SaveAction(area)), ForgeProps.getLocalized(BUTTON_CLOSE), - new JButton(new ExitAction())}; + new JButton(new SaveAction(area)), getLocalized(BUTTON_CLOSE), new JButton(new ExitAction())}; JOptionPane pane = new JOptionPane(new JScrollPane(area), ERROR_MESSAGE, DEFAULT_OPTION, null, options, options[1]); - JDialog dlg = pane.createDialog(null, ForgeProps.getLocalized(TITLE)); + JDialog dlg = pane.createDialog(null, getLocalized(TITLE)); dlg.setResizable(true); dlg.setVisible(true); dlg.dispose(); @@ -126,7 +125,7 @@ public class ErrorViewer implements NewConstants, NewConstants.LANG.ErrorViewer if(message != null) System.err.println(message); ex.printStackTrace(); - pw.printf(ForgeProps.getLocalized(MESSAGE), ForgeProps.getProperty(FORUM), ForgeProps.getProperty(MAIL), + pw.printf(getLocalized(MESSAGE), getProperty(FORUM), getProperty(MAIL), getProperty(VERSION), message != null? message:ex.getMessage()); ex.printStackTrace(pw); } @@ -137,8 +136,7 @@ public class ErrorViewer implements NewConstants, NewConstants.LANG.ErrorViewer private static void printError(PrintWriter pw, String message) { System.err.println(message); - pw.printf(ForgeProps.getLocalized(MESSAGE), ForgeProps.getProperty(FORUM), ForgeProps.getProperty(MAIL), - message); + pw.printf(getLocalized(MESSAGE), getProperty(FORUM), getProperty(MAIL), getProperty(VERSION), message); Map traces = Thread.getAllStackTraces(); for(Entry e:traces.entrySet()) { pw.println(); @@ -158,7 +156,7 @@ public class ErrorViewer implements NewConstants, NewConstants.LANG.ErrorViewer private JTextArea area; public SaveAction(JTextArea area) { - super(ForgeProps.getLocalized(BUTTON_SAVE)); + super(getLocalized(BUTTON_SAVE)); putValue(ACCELERATOR_KEY, KeyStroke.getKeyStroke(VK_S, CTRL_DOWN_MASK)); this.area = area; } @@ -181,7 +179,7 @@ public class ErrorViewer implements NewConstants, NewConstants.LANG.ErrorViewer bw.write(area.getText()); bw.close(); } catch(IOException ex) { - showError(ex, ForgeProps.getLocalized(ERRORS.SAVE_MESSAGE)); + showError(ex, getLocalized(ERRORS.SAVE_MESSAGE)); } } } @@ -191,7 +189,7 @@ public class ErrorViewer implements NewConstants, NewConstants.LANG.ErrorViewer private static final long serialVersionUID = 276202595758381626L; public ExitAction() { - super(ForgeProps.getLocalized(BUTTON_EXIT)); + super(getLocalized(BUTTON_EXIT)); } @@ -205,11 +203,11 @@ public class ErrorViewer implements NewConstants, NewConstants.LANG.ErrorViewer private static final long serialVersionUID = 5638147106706803363L; public ShowAllThreadsAction() { - super(ForgeProps.getLocalized(SHOW_ERROR)); + super(getLocalized(SHOW_ERROR)); } public void actionPerformed(ActionEvent e) { - showErrorAllThreads(ForgeProps.getLocalized(ERRORS.SHOW_MESSAGE)); + showErrorAllThreads(getLocalized(ERRORS.SHOW_MESSAGE)); } } } diff --git a/src/forge/properties/NewConstants.java b/src/forge/properties/NewConstants.java index e6106d3e240..e2d77dc772c 100644 --- a/src/forge/properties/NewConstants.java +++ b/src/forge/properties/NewConstants.java @@ -19,6 +19,7 @@ public interface NewConstants { //General properties public static final String MAIL = "program/mail"; public static final String FORUM = "program/forum"; + public static final String VERSION = "program/version"; public static final String DECKS = "decks"; public static final String BOOSTER_DECKS = "booster-decks";