+2011-01-20 Sampo Niskanen
+
+ * Initial i18n support
+
+2011-01-18 Sampo Niskanen
+
+ * [BUG] Simulation warnings were not being stored
+ * [BUG] Exclamation mark did not fit in simulation table
+ * Added instructions for zooming in plot dialog
+
+2010-12-01 Doug Pedrick
+
+ * Merging printing support
+
2010-10-30 Sampo Niskanen
* [BUG] Invalid refereces to components used in caches
* [BUG] Take launch lug radial angle into account when loading rkt file
-2010-10-24 Sampo Niskane
+2010-10-24 Sampo Niskanen
* Added SafetyMutex and took into use in Simulation
#
+! Set to the name of the current translation file (used for debugging purposes)
+debug.currentFile = messages.properties
+
+
! Labels used in buttons of dialog windows
button.ok = OK
button.cancel = Cancel
done
-java -cp bin/:lib/miglayout15-swing.jar:lib/jcommon-1.0.16.jar:lib/jfreechart-1.0.13.jar:. $JAVAOPTS net.sf.openrocket.startup.Startup "$@"
+java -cp bin/:lib/miglayout15-swing.jar:lib/jcommon-1.0.16.jar:lib/jfreechart-1.0.13.jar:lib/iText-5.0.2.jar:. $JAVAOPTS net.sf.openrocket.startup.Startup "$@"
@Override
public int getExactWidth() {
- return 32;
+ return 36;
}
@Override
import javax.swing.JButton;
import javax.swing.JCheckBox;
import javax.swing.JDialog;
+import javax.swing.JLabel;
import javax.swing.JPanel;
import net.miginfocom.swing.MigLayout;
import net.sf.openrocket.document.Simulation;
+import net.sf.openrocket.gui.components.StyledLabel;
import net.sf.openrocket.simulation.FlightDataBranch;
import net.sf.openrocket.simulation.FlightDataType;
import net.sf.openrocket.simulation.FlightEvent;
});
panel.add(check, "split, left");
+
+ JLabel label = new StyledLabel("Click+drag down+right to zoom in, up+left to zoom out", -2);
+ panel.add(label, "gapleft para");
+
+
panel.add(new JPanel(), "growx");
JButton button = new JButton("Close");
import net.sf.openrocket.aerodynamics.FlightConditions;
import net.sf.openrocket.aerodynamics.Warning;
-import net.sf.openrocket.aerodynamics.WarningSet;
import net.sf.openrocket.logging.LogHelper;
import net.sf.openrocket.motor.Motor;
import net.sf.openrocket.motor.MotorId;
// Initialize the simulation
currentStepper = flightStepper;
- status = initialStatus(configuration, motorConfiguration, simulationConditions);
+ status = initialStatus(configuration, motorConfiguration, simulationConditions, flightData);
status = currentStepper.initialize(status);
private SimulationStatus initialStatus(Configuration configuration,
MotorInstanceConfiguration motorConfiguration,
- SimulationConditions simulationConditions) {
+ SimulationConditions simulationConditions, FlightData flightData) {
SimulationStatus init = new SimulationStatus();
init.setSimulationConditions(simulationConditions);
init.getEventQueue().add(new FlightEvent(FlightEvent.Type.LAUNCH, 0, simulationConditions.getRocket()));
init.setFlightData(new FlightDataBranch("MAIN", FlightDataType.TYPE_TIME));
- init.setWarnings(new WarningSet());
+ init.setWarnings(flightData.getWarningSet());
return init;
}
import java.io.File;
import java.io.PrintStream;
import java.util.List;
+import java.util.Locale;
import java.util.concurrent.atomic.AtomicInteger;
import javax.swing.JOptionPane;
import net.sf.openrocket.gui.main.ExceptionHandler;
import net.sf.openrocket.gui.main.SimpleFileFilter;
import net.sf.openrocket.gui.main.Splash;
+import net.sf.openrocket.l10n.DebugTranslator;
+import net.sf.openrocket.l10n.ResourceBundleTranslator;
+import net.sf.openrocket.l10n.Translator;
import net.sf.openrocket.logging.DelegatorLogger;
import net.sf.openrocket.logging.LogHelper;
import net.sf.openrocket.logging.LogLevel;
// Initialize logging first so we can use it
initializeLogging();
+ // Setup the translations
+ initializeL10n();
+
// Check that we have a head
checkHead();
+
private static void checkDebugStatus() {
if (System.getProperty("openrocket.debug") != null) {
System.setProperty("openrocket.log.stdout", "VBOSE");
}
-
+ /**
+ * Initializes the localization system.
+ */
+ private static void initializeL10n() {
+ String locale = System.getProperty("openrocket.locale");
+ if (locale != null) {
+ Locale l;
+ String[] split = locale.split("[_-]", 3);
+ if (split.length == 1) {
+ l = new Locale(split[0]);
+ } else if (split.length == 2) {
+ l = new Locale(split[0], split[1]);
+ } else {
+ l = new Locale(split[0], split[1], split[2]);
+ }
+ Locale.setDefault(l);
+ }
+
+ Translator t;
+ if (Locale.getDefault().getLanguage().equals("xx")) {
+ t = new DebugTranslator();
+ } else {
+ t = new ResourceBundleTranslator("l10n.messages");
+ }
+
+ log.info("Set up translation for locale " + Locale.getDefault() +
+ ", debug.currentFile=" + t.get("debug.currentFile"));
+
+ Application.setTranslator(t);
+ }
+
+
private static void runMain(String[] args) {