From 43bc79c8996476b47c0e00dd7e09a9e2e027c6ae Mon Sep 17 00:00:00 2001 From: Sampo Niskanen Date: Thu, 20 Jan 2011 06:28:33 +0000 Subject: [PATCH] l10n updates --- doc/properties.txt | 8 ++++++++ .../openrocket/gui/dialogs/BugReportDialog.java | 2 ++ src/net/sf/openrocket/startup/Startup.java | 16 +++++++++++----- 3 files changed, 21 insertions(+), 5 deletions(-) diff --git a/doc/properties.txt b/doc/properties.txt index 77c0501e6..db4a52faf 100644 --- a/doc/properties.txt +++ b/doc/properties.txt @@ -2,6 +2,14 @@ System properties used by OpenRocket: ===================================== +General options +--------------- + +openrocket.locale + Select the default locale to be used, for example "en_US". + If set to "xx", the logical keys will be displayed instead of the translated strings. + + Logging options --------------- diff --git a/src/net/sf/openrocket/gui/dialogs/BugReportDialog.java b/src/net/sf/openrocket/gui/dialogs/BugReportDialog.java index d87b6896a..cb51317fc 100644 --- a/src/net/sf/openrocket/gui/dialogs/BugReportDialog.java +++ b/src/net/sf/openrocket/gui/dialogs/BugReportDialog.java @@ -14,6 +14,7 @@ import java.net.URI; import java.net.URISyntaxException; import java.net.URLEncoder; import java.util.List; +import java.util.Locale; import java.util.SortedSet; import java.util.TreeSet; @@ -257,6 +258,7 @@ public class BugReportDialog extends JDialog { sb.append("OpenRocket version: " + Prefs.getVersion() + "\n"); sb.append("OpenRocket source: " + Prefs.getBuildSource() + "\n"); sb.append("OpenRocket location: " + JarUtil.getCurrentJarFile() + "\n"); + sb.append("Current default locale: " + Locale.getDefault() + "\n"); sb.append("System properties:\n"); // Sort the keys diff --git a/src/net/sf/openrocket/startup/Startup.java b/src/net/sf/openrocket/startup/Startup.java index a9bcbcecf..802bdcc73 100644 --- a/src/net/sf/openrocket/startup/Startup.java +++ b/src/net/sf/openrocket/startup/Startup.java @@ -104,11 +104,17 @@ public class Startup { private static void checkDebugStatus() { if (System.getProperty("openrocket.debug") != null) { - System.setProperty("openrocket.log.stdout", "VBOSE"); - System.setProperty("openrocket.log.tracelevel", "VBOSE"); - System.setProperty("openrocket.debug.menu", "true"); - System.setProperty("openrocket.debug.mutexlocation", "true"); - System.setProperty("openrocket.debug.motordigest", "true"); + setPropertyIfNotSet("openrocket.log.stdout", "VBOSE"); + setPropertyIfNotSet("openrocket.log.tracelevel", "VBOSE"); + setPropertyIfNotSet("openrocket.debug.menu", "true"); + setPropertyIfNotSet("openrocket.debug.mutexlocation", "true"); + setPropertyIfNotSet("openrocket.debug.motordigest", "true"); + } + } + + private static void setPropertyIfNotSet(String key, String value) { + if (System.getProperty(key) == null) { + System.setProperty(key, value); } }