package net.sf.openrocket.aerodynamics;
+import net.sf.openrocket.l10n.Translator;
+import net.sf.openrocket.startup.Application;
import net.sf.openrocket.unit.UnitGroup;
public abstract class Warning {
-
+ private static final Translator trans = Application.getTranslator();
+
/**
* Return a Warning with the specific text.
*/
@Override
public String toString() {
if (Double.isNaN(aoa))
- return "Large angle of attack encountered.";
- return ("Large angle of attack encountered (" +
+ //// Large angle of attack encountered.
+ return trans.get("Warning.LargeAOA.str1");
+ //// Large angle of attack encountered (
+ return (trans.get("Warning.LargeAOA.str2") +
UnitGroup.UNITS_ANGLE.getDefaultUnit().toString(aoa) + ").");
}
/** A <code>Warning</code> that the body diameter is discontinuous. */
+////Discontinuity in rocket body diameter.
public static final Warning DISCONTINUITY =
- new Other("Discontinuity in rocket body diameter.");
+ new Other(trans.get("Warning.DISCONTINUITY"));
/** A <code>Warning</code> that the fins are thick compared to the rocket body. */
+////Thick fins may not be modeled accurately.
public static final Warning THICK_FIN =
- new Other("Thick fins may not be modeled accurately.");
+ new Other(trans.get("Warning.THICK_FIN"));
/** A <code>Warning</code> that the fins have jagged edges. */
+////Jagged-edged fin predictions may be inaccurate.
public static final Warning JAGGED_EDGED_FIN =
- new Other("Jagged-edged fin predictions may be inaccurate.");
+ new Other(trans.get("Warning.JAGGED_EDGED_FIN"));
/** A <code>Warning</code> that simulation listeners have affected the simulation */
+////Listeners modified the flight simulation
public static final Warning LISTENERS_AFFECTED =
- new Other("Listeners modified the flight simulation");
+ new Other(trans.get("Warning.LISTENERS_AFFECTED"));
+////Recovery device opened while motor still burning.
public static final Warning RECOVERY_DEPLOYMENT_WHILE_BURNING =
- new Other("Recovery device opened while motor still burning.");
-
+ new Other(trans.get("Warning.RECOVERY_DEPLOYMENT_WHILE_BURNING"));
+ //// Invalid parameter encountered, ignoring.
public static final Warning FILE_INVALID_PARAMETER =
- new Other("Invalid parameter encountered, ignoring.");
+ new Other(trans.get("Warning.FILE_INVALID_PARAMETER"));
}
package net.sf.openrocket.database;
+import net.sf.openrocket.l10n.Translator;
import net.sf.openrocket.logging.LogHelper;
import net.sf.openrocket.material.Material;
import net.sf.openrocket.material.MaterialStorage;
*/
public class Databases {
private static final LogHelper log = Application.getLogger();
-
+ private static final Translator trans = Application.getTranslator();
+
/* Static implementations of specific databases: */
/**
static {
// Add default materials
- BULK_MATERIAL.add(new Material.Bulk("Acrylic", 1190, false));
- BULK_MATERIAL.add(new Material.Bulk("Balsa", 170, false));
- BULK_MATERIAL.add(new Material.Bulk("Birch", 670, false));
- BULK_MATERIAL.add(new Material.Bulk("Cardboard", 680, false));
- BULK_MATERIAL.add(new Material.Bulk("Carbon fiber", 1780, false));
- BULK_MATERIAL.add(new Material.Bulk("Cork", 240, false));
- BULK_MATERIAL.add(new Material.Bulk("Depron (XPS)", 40, false));
- BULK_MATERIAL.add(new Material.Bulk("Fiberglass", 1850, false));
- BULK_MATERIAL.add(new Material.Bulk("Kraft phenolic", 950, false));
- BULK_MATERIAL.add(new Material.Bulk("Maple", 755, false));
- BULK_MATERIAL.add(new Material.Bulk("Paper (office)", 820, false));
- BULK_MATERIAL.add(new Material.Bulk("Pine", 530, false));
- BULK_MATERIAL.add(new Material.Bulk("Plywood (birch)", 630, false));
- BULK_MATERIAL.add(new Material.Bulk("Polycarbonate (Lexan)", 1200, false));
- BULK_MATERIAL.add(new Material.Bulk("Polystyrene", 1050, false));
- BULK_MATERIAL.add(new Material.Bulk("PVC", 1390, false));
- BULK_MATERIAL.add(new Material.Bulk("Spruce", 450, false));
- BULK_MATERIAL.add(new Material.Bulk("Styrofoam (generic EPS)", 20, false));
+ BULK_MATERIAL.add(new Material.Bulk(trans.get("Databases.materials.Acrylic"), 1190, false));
+ BULK_MATERIAL.add(new Material.Bulk(trans.get("Databases.materials.Balsa"), 170, false));
+ BULK_MATERIAL.add(new Material.Bulk(trans.get("Databases.materials.Birch"), 670, false));
+ BULK_MATERIAL.add(new Material.Bulk(trans.get("Databases.materials.Cardboard"), 680, false));
+ BULK_MATERIAL.add(new Material.Bulk(trans.get("Databases.materials.Carbonfiber"), 1780, false));
+ BULK_MATERIAL.add(new Material.Bulk(trans.get("Databases.materials.Cork"), 240, false));
+ BULK_MATERIAL.add(new Material.Bulk(trans.get("Databases.materials.DepronXPS"), 40, false));
+ BULK_MATERIAL.add(new Material.Bulk(trans.get("Databases.materials.Fiberglass"), 1850, false));
+ BULK_MATERIAL.add(new Material.Bulk(trans.get("Databases.materials.Kraftphenolic"), 950, false));
+ BULK_MATERIAL.add(new Material.Bulk(trans.get("Databases.materials.Maple"), 755, false));
+ BULK_MATERIAL.add(new Material.Bulk(trans.get("Databases.materials.Paperoffice"), 820, false));
+ BULK_MATERIAL.add(new Material.Bulk(trans.get("Databases.materials.Pine"), 530, false));
+ BULK_MATERIAL.add(new Material.Bulk(trans.get("Databases.materials.Plywoodbirch"), 630, false));
+ BULK_MATERIAL.add(new Material.Bulk(trans.get("Databases.materials.PolycarbonateLexan"), 1200, false));
+ BULK_MATERIAL.add(new Material.Bulk(trans.get("Databases.materials.Polystyrene"), 1050, false));
+ BULK_MATERIAL.add(new Material.Bulk(trans.get("Databases.materials.PVC"), 1390, false));
+ BULK_MATERIAL.add(new Material.Bulk(trans.get("Databases.materials.Spruce"), 450, false));
+ BULK_MATERIAL.add(new Material.Bulk(trans.get("Databases.materials.StyrofoamgenericEPS"), 20, false));
// BULK_MATERIAL.add(new Material.Bulk("Styrofoam (Blue foam, XPS)", 32, false));
- BULK_MATERIAL.add(new Material.Bulk("Styrofoam \"Blue foam\" (XPS)", 32, false));
- BULK_MATERIAL.add(new Material.Bulk("Quantum tubing", 1050, false));
+ BULK_MATERIAL.add(new Material.Bulk(trans.get("Databases.materials.StyrofoamBluefoamXPS"), 32, false));
+ BULK_MATERIAL.add(new Material.Bulk(trans.get("Databases.materials.Quantumtubing"), 1050, false));
- SURFACE_MATERIAL.add(new Material.Surface("Ripstop nylon", 0.067, false));
- SURFACE_MATERIAL.add(new Material.Surface("Mylar", 0.021, false));
- SURFACE_MATERIAL.add(new Material.Surface("Polyethylene (thin)", 0.015, false));
- SURFACE_MATERIAL.add(new Material.Surface("Polyethylene (heavy)", 0.040, false));
- SURFACE_MATERIAL.add(new Material.Surface("Silk", 0.060, false));
- SURFACE_MATERIAL.add(new Material.Surface("Paper (office)", 0.080, false));
- SURFACE_MATERIAL.add(new Material.Surface("Cellophane", 0.018, false));
- SURFACE_MATERIAL.add(new Material.Surface("Cr\u00eape paper", 0.025, false));
+ SURFACE_MATERIAL.add(new Material.Surface(trans.get("Databases.materials.Ripstopnylon"), 0.067, false));
+ SURFACE_MATERIAL.add(new Material.Surface(trans.get("Databases.materials.Mylar"), 0.021, false));
+ SURFACE_MATERIAL.add(new Material.Surface(trans.get("Databases.materials.Polyethylenethin"), 0.015, false));
+ SURFACE_MATERIAL.add(new Material.Surface(trans.get("Databases.materials.Polyethyleneheavy"), 0.040, false));
+ SURFACE_MATERIAL.add(new Material.Surface(trans.get("Databases.materials.Silk"), 0.060, false));
+ SURFACE_MATERIAL.add(new Material.Surface(trans.get("Databases.materials.Paperoffice"), 0.080, false));
+ SURFACE_MATERIAL.add(new Material.Surface(trans.get("Databases.materials.Cellophane"), 0.018, false));
+ SURFACE_MATERIAL.add(new Material.Surface(trans.get("Databases.materials.Creapepaper"), 0.025, false));
- LINE_MATERIAL.add(new Material.Line("Thread (heavy-duty)", 0.0003, false));
- LINE_MATERIAL.add(new Material.Line("Elastic cord (round 2mm, 1/16 in)", 0.0018, false));
- LINE_MATERIAL.add(new Material.Line("Elastic cord (flat 6mm, 1/4 in)", 0.0043, false));
- LINE_MATERIAL.add(new Material.Line("Elastic cord (flat 12mm, 1/2 in)", 0.008, false));
- LINE_MATERIAL.add(new Material.Line("Elastic cord (flat 19mm, 3/4 in)", 0.0012, false));
- LINE_MATERIAL.add(new Material.Line("Elastic cord (flat 25mm, 1 in)", 0.0016, false));
- LINE_MATERIAL.add(new Material.Line("Braided nylon (2 mm, 1/16 in)", 0.001, false));
- LINE_MATERIAL.add(new Material.Line("Braided nylon (3 mm, 1/8 in)", 0.0035, false));
- LINE_MATERIAL.add(new Material.Line("Tubular nylon (11 mm, 7/16 in)", 0.013, false));
- LINE_MATERIAL.add(new Material.Line("Tubular nylon (14 mm, 9/16 in)", 0.016, false));
- LINE_MATERIAL.add(new Material.Line("Tubular nylon (25 mm, 1 in)", 0.029, false));
+ //// Thread (heavy-duty)
+ LINE_MATERIAL.add(new Material.Line(trans.get("Databases.materials.Threadheavy-duty"), 0.0003, false));
+ //// Elastic cord (round 2mm, 1/16 in)
+ LINE_MATERIAL.add(new Material.Line(trans.get("Databases.materials.Elasticcordround2mm"), 0.0018, false));
+ //// Elastic cord (flat 6mm, 1/4 in)
+ LINE_MATERIAL.add(new Material.Line(trans.get("Databases.materials.Elasticcordflat6mm"), 0.0043, false));
+ //// Elastic cord (flat 12mm, 1/2 in)
+ LINE_MATERIAL.add(new Material.Line(trans.get("Databases.materials.Elasticcordflat12mm"), 0.008, false));
+ //// Elastic cord (flat 19mm, 3/4 in)
+ LINE_MATERIAL.add(new Material.Line(trans.get("Databases.materials.Elasticcordflat19mm"), 0.0012, false));
+ //// Elastic cord (flat 25mm, 1 in)
+ LINE_MATERIAL.add(new Material.Line(trans.get("Databases.materials.Elasticcordflat25mm"), 0.0016, false));
+ //// Braided nylon (2 mm, 1/16 in)
+ LINE_MATERIAL.add(new Material.Line(trans.get("Databases.materials.Braidednylon2mm"), 0.001, false));
+ //// Braided nylon (3 mm, 1/8 in)
+ LINE_MATERIAL.add(new Material.Line(trans.get("Databases.materials.Braidednylon3mm"), 0.0035, false));
+ //// Tubular nylon (11 mm, 7/16 in)
+ LINE_MATERIAL.add(new Material.Line(trans.get("Databases.materials.Tubularnylon11mm"), 0.013, false));
+ //// Tubular nylon (14 mm, 9/16 in)
+ LINE_MATERIAL.add(new Material.Line(trans.get("Databases.materials.Tubularnylon14mm"), 0.016, false));
+ //// Tubular nylon (25 mm, 1 in)
+ LINE_MATERIAL.add(new Material.Line(trans.get("Databases.materials.Tubularnylon25mm"), 0.029, false));
// Add user-defined materials
}
if (file.exists()) {
- int ret = JOptionPane.showConfirmDialog(this,
- "File \"" + file.getName() + "\" exists. Overwrite?",
- "File exists", JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE);
+ int ret = JOptionPane.showConfirmDialog(this,
+ //// File
+ trans.get("SimExpPan.Fileexists.desc1") + file.getName() +
+ //// \" exists. Overwrite?
+ trans.get("SimExpPan.Fileexists.desc2"),
+ //// File exists
+ trans.get("SimExpPan.Fileexists.title"), JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE);
if (ret != JOptionPane.YES_OPTION)
return;
}
}
if (n == 1) {
- str = "Exporting 1 variable out of " + total + ".";
+ //// Exporting 1 variable out of
+ str = trans.get("SimExpPan.ExportingVar.desc1") + " " + total + ".";
} else {
- str = "Exporting "+n+" variables out of " + total + ".";
+ //// Exporting
+ //// variables out of
+ str = trans.get("SimExpPan.ExportingVar.desc2") + " "+n+" " +
+ trans.get("SimExpPan.ExportingVar.desc3") + " " + total + ".";
}
selectedCountLabel.setText(str);
case SELECTED:
return "";
case NAME:
- return "Variable";
+ //// Variable
+ return trans.get("SimExpPan.Col.Variable");
case UNIT:
- return "Unit";
+ //// Unit
+ return trans.get("SimExpPan.Col.Unit");
default:
throw new IndexOutOfBoundsException("column=" + column);
}
import javax.swing.event.ChangeListener;
import net.miginfocom.swing.MigLayout;
+import net.sf.openrocket.l10n.Translator;
import net.sf.openrocket.rocketcomponent.Configuration;
+import net.sf.openrocket.startup.Application;
public class StageSelector extends JPanel implements ChangeListener {
private class StageAction extends AbstractAction implements ChangeListener {
private final int stage;
+ private final Translator trans = Application.getTranslator();
public StageAction(final int stage) {
this.stage = stage;
@Override
public Object getValue(String key) {
if (key.equals(NAME)) {
- return "Stage "+(stage+1);
+ //// Stage
+ return trans.get("StageAction.Stage") + " " + (stage+1);
}
return super.getValue(key);
}
if (component instanceof EngineBlock) {
final DescriptionArea desc = new DescriptionArea(6);
- desc.setText("<html>An <b>engine block</b> stops the motor from moving forwards " +
- "in the motor mount tube.<br><br>In order to add a motor, create a " +
- "<b>body tube</b> or <b>inner tube</b> and mark it as a motor mount in " +
- "the <em>Motor</em> tab.");
+ //// <html>An <b>engine block</b> stops the motor from moving forwards in the motor mount tube.<br><br>In order to add a motor, create a <b>body tube</b> or <b>inner tube</b> and mark it as a motor mount in the <em>Motor</em> tab.
+ desc.setText(trans.get("ringcompcfg.EngineBlock.desc"));
sub.add(desc, "width 1px, growx, wrap");
}
panel.add(sub,"cell 4 0, gapleft paragraph, aligny 0%, spany");
DescriptionArea note = new DescriptionArea(2);
- note.setText("Note: An inner tube will not affect the aerodynamics" +
- " of the rocket even if it is located outside of the body tube.");
+ //// Note: An inner tube will not affect the aerodynamics of the rocket even if it is located outside of the body tube.
+ note.setText(trans.get("ringcompcfg.note.desc"));
panel.add(note, "spanx, growx");
System.arraycopy(LineStyle.values(), 0, list, 1, LineStyle.values().length);
JComboBox combo = new JComboBox(new EnumModel<LineStyle>(component, "LineStyle",
- list, "Default style"));
+ //// Default style
+ list, trans.get("LineStyle.Defaultstyle")));
panel.add(combo, "spanx 2, growx, wrap 50lp");
//// Save as default style
panel.add(typeBox,"span, split 2");
//// Clipped
- checkbox = new JCheckBox(new BooleanModel(component,trans.get("TransitionCfg.checkbox.Clipped")));
+ checkbox = new JCheckBox(new BooleanModel(component,"Clipped"));
//// Clipped
checkbox.setText(trans.get("TransitionCfg.checkbox.Clipped"));
panel.add(checkbox,"wrap");
panel.add(new BasicSlider(m.getSliderModel(0,0.01)),"w 100lp, wrap 0px");
//// Filled
- checkbox = new JCheckBox(new BooleanModel(component,trans.get("TransitionCfg.checkbox.Filled")));
+ checkbox = new JCheckBox(new BooleanModel(component,"Filled"));
//// Filled
checkbox.setText(trans.get("TransitionCfg.checkbox.Filled"));
panel.add(checkbox,"skip, span 2, wrap");
//// <html>If connected to the Internet, you can simply click
//// <em>Send bug report</em>.
- label = new JLabel("<html>If connected to the Internet, you can simply click " +
- "<em>Send bug report</em>.");
+ label = new JLabel(trans.get("bugreport.dlg.connectedInternet"));
d = label.getPreferredSize();
d.width = 100000;
label.setMaximumSize(d);
panel.add(label, "gapleft para, wrap");
//// Otherwise, send the text below to the address:
- panel.add(new JLabel("Otherwise, send the text below to the address: "),
+ panel.add(new JLabel(trans.get("bugreport.dlg.otherwise") +" "),
"gapleft para, split 2, gapright rel");
panel.add(new SelectableLabel(REPORT_EMAIL), "growx, wrap para");
panel.add(new JScrollPane(textArea), "grow, wrap");
- panel.add(new StyledLabel("The information above may be included in a public " +
- "bug report. Make sure it does not contain any sensitive information you " +
- "do not want to be made public.", -1), "wrap para");
+ panel.add(new StyledLabel(trans.get("bugreport.lbl.Theinformation"), -1), "wrap para");
} catch (Exception ex) {
// Sending the message failed.
JOptionPane.showMessageDialog(BugReportDialog.this,
- new Object[] { "OpenRocket was unable to send the bug report:",
+ //// OpenRocket was unable to send the bug report:
+ new Object[] { trans.get("bugreport.dlg.failedmsg1"),
ex.getClass().getSimpleName() + ": " + ex.getMessage(), " ",
- "Please send the report manually to " + REPORT_EMAIL },
- "Error sending report", JOptionPane.ERROR_MESSAGE);
+ //// Please send the report manually to
+ trans.get("bugreport.dlg.failedmsg2") +" " + REPORT_EMAIL },
+ //// Error sending report
+ trans.get("bugreport.dlg.failedmsg3"), JOptionPane.ERROR_MESSAGE);
}
}
});
BugReportDialog reportDialog =
new BugReportDialog(parent,
- "<html><b>You can report a bug in OpenRocket by filling in and submitting " +
- "the form below.</b><br>" +
- "You can also report bugs and include attachments on the project " +
- "web site.", sb.toString());
+ //// <html><b>You can report a bug in OpenRocket by filling in and submitting the form below.</b><br>You can also report bugs and include attachments on the project web site.
+ trans.get("bugreport.reportDialog.txt"), sb.toString());
reportDialog.setVisible(true);
}
sb.append('\n');
BugReportDialog reportDialog =
- new BugReportDialog(parent, "<html><b>Please include a short description about " +
- "what you were doing when the exception occurred.</b>", sb.toString());
+ //// <html><b>Please include a short description about what you were doing when the exception occurred.</b>
+ new BugReportDialog(parent, trans.get("bugreport.reportDialog.txt2"), sb.toString());
reportDialog.setVisible(true);
}
MotorMount mount = findMount(column);
Motor motor = mount.getMotor(id);
if (motor == null)
+ //// None
return "None";
String str = motor.getDesignation(mount.getMotorDelay(id));
@Override
public String getColumnName(int column) {
if (column == 0) {
- return "Configuration name";
+ //// Configuration name
+ return trans.get("edtmotorconfdlg.lbl.Configname");
}
MotorMount mount = findMount(column);
private ExampleDesignDialog(ExampleDesign[] designs, Window parent) {
//// Open example design
- super(parent, "Open example design", Dialog.ModalityType.APPLICATION_MODAL);
+ super(parent, trans.get("exdesigndlg.lbl.Openexampledesign"), Dialog.ModalityType.APPLICATION_MODAL);
JPanel panel = new JPanel(new MigLayout("fill"));
//// Select example designs to open:
- panel.add(new JLabel("Select example designs to open:"), "wrap");
+ panel.add(new JLabel(trans.get("exdesigndlg.lbl.Selectexample")), "wrap");
designSelection = new JList(designs);
designSelection.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
panel.add(new JScrollPane(designSelection), "grow, wmin 300lp, wrap para");
//// Open button
- JButton openButton = new JButton(trans.get("debuglogdlg.but.clear"));
+ JButton openButton = new JButton(trans.get("exdesigndlg.but.open"));
openButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
}
if (designs == null || designs.length == 0) {
//// Example designs could not be found.
- JOptionPane.showMessageDialog(parent, "Example designs could not be found.",
+ JOptionPane.showMessageDialog(parent, trans.get("exdesigndlg.lbl.Exampledesignsnotfound"),
//// Examples not found
- "Examples not found", JOptionPane.ERROR_MESSAGE);
+ trans.get("exdesigndlg.lbl.Examplesnotfound"), JOptionPane.ERROR_MESSAGE);
return null;
}
*/
enum ThrustCurveMotorColumns {
- MANUFACTURER("Manufacturer", 100) {
+ //// Manufacturer
+ MANUFACTURER("TCurveMotorCol.MANUFACTURER", 100) {
@Override
public String getValue(ThrustCurveMotorSet m) {
return m.getManufacturer().getDisplayName();
return Collator.getInstance();
}
},
- DESIGNATION("Designation") {
+ //// Designation
+ DESIGNATION("TCurveMotorCol.DESIGNATION") {
@Override
public String getValue(ThrustCurveMotorSet m) {
return m.getDesignation();
return new DesignationComparator();
}
},
- TYPE("Type") {
+ //// Type
+ TYPE("TCurveMotorCol.TYPE") {
@Override
public String getValue(ThrustCurveMotorSet m) {
return m.getType().getName();
return Collator.getInstance();
}
},
- DIAMETER("Diameter") {
+ //// Diameter
+ DIAMETER("TCurveMotorCol.DIAMETER") {
@Override
public Object getValue(ThrustCurveMotorSet m) {
return new Value(m.getDiameter(), UnitGroup.UNITS_MOTOR_DIMENSIONS);
return ValueComparator.INSTANCE;
}
},
- LENGTH("Length") {
+ //// Length
+ LENGTH("TCurveMotorCol.LENGTH") {
@Override
public Object getValue(ThrustCurveMotorSet m) {
return new Value(m.getLength(), UnitGroup.UNITS_MOTOR_DIMENSIONS);
public abstract Comparator<?> getComparator();
public String getTitle() {
- return title;
+ return trans.get(title);
}
public int getWidth() {
private static final int SHOW_SMALLER = 1;
private static final int SHOW_EXACT = 2;
private static final String[] SHOW_DESCRIPTIONS = {
- "Show all motors",
- "Show motors with diameter less than that of the motor mount",
- "Show motors with diameter equal to that of the motor mount"
+ //// Show all motors
+ trans.get("TCMotorSelPan.SHOW_DESCRIPTIONS.desc1"),
+ //// Show motors with diameter less than that of the motor mount
+ trans.get("TCMotorSelPan.SHOW_DESCRIPTIONS.desc2"),
+ //// Show motors with diameter equal to that of the motor mount
+ trans.get("TCMotorSelPan.SHOW_DESCRIPTIONS.desc3")
};
private static final int SHOW_MAX = 2;
// Selection label
//// Select rocket motor:
- label = new StyledLabel("Select rocket motor:", Style.BOLD);
+ label = new StyledLabel(trans.get("TCMotorSelPan.lbl.Selrocketmotor"), Style.BOLD);
panel.add(label, "spanx, wrap para");
// Diameter selection
panel.add(filterComboBox, "spanx, growx, wrap rel");
//// Hide very similar thrust curves
- hideSimilarBox = new JCheckBox("Hide very similar thrust curves");
+ hideSimilarBox = new JCheckBox(trans.get("TCMotorSelPan.checkbox.hideSimilar"));
GUIUtil.changeFontSize(hideSimilarBox, -1);
hideSimilarBox.setSelected(Prefs.getBoolean(Prefs.MOTOR_HIDE_SIMILAR, true));
hideSimilarBox.addActionListener(new ActionListener() {
// Motor mount diameter label
//// Motor mount diameter:
- label = new StyledLabel("Motor mount diameter: " +
+ label = new StyledLabel(trans.get("TCMotorSelPan.lbl.Motormountdia")+ " " +
UnitGroup.UNITS_MOTOR_DIMENSIONS.getDefaultUnit().toStringUnit(diameter));
panel.add(label, "gapright 30lp, spanx, split");
// Search field
//// Search:
- label = new StyledLabel("Search:");
+ label = new StyledLabel(trans.get("TCMotorSelPan.lbl.Search"));
panel.add(label, "");
searchField = new JTextField();
// Thrust curve selection
//// Select thrust curve:
- curveSelectionLabel = new JLabel("Select thrust curve:");
+ curveSelectionLabel = new JLabel(trans.get("TCMotorSelPan.lbl.Selectthrustcurve"));
panel.add(curveSelectionLabel);
curveSelectionModel = new DefaultComboBoxModel();
// Ejection charge delay:
- panel.add(new JLabel("Ejection charge delay:"));
+ panel.add(new JLabel(trans.get("TCMotorSelPan.lbl.Ejectionchargedelay")));
delayBox = new JComboBox();
delayBox.setEditable(true);
public void actionPerformed(ActionEvent e) {
JComboBox cb = (JComboBox) e.getSource();
String sel = (String) cb.getSelectedItem();
- if (sel.equalsIgnoreCase("None")) {
+ //// None
+ if (sel.equalsIgnoreCase(trans.get("TCMotorSelPan.equalsIgnoreCase.None"))) {
selectedDelay = Motor.PLUGGED;
} else {
try {
});
panel.add(delayBox, "growx, wrap rel");
//// (Number of seconds or \"None\")
- panel.add(new StyledLabel("(Number of seconds or \"None\")", -3), "skip, wrap para");
+ panel.add(new StyledLabel(trans.get("TCMotorSelPan.lbl.NumberofsecondsorNone"), -3), "skip, wrap para");
setDelays(false);
// Thrust curve info
//// Total impulse:
- panel.add(new JLabel("Total impulse:"));
+ panel.add(new JLabel(trans.get("TCMotorSelPan.lbl.Totalimpulse")));
totalImpulseLabel = new JLabel();
panel.add(totalImpulseLabel, "wrap");
//// Avg. thrust:
- panel.add(new JLabel("Avg. thrust:"));
+ panel.add(new JLabel(trans.get("TCMotorSelPan.lbl.Avgthrust")));
avgThrustLabel = new JLabel();
panel.add(avgThrustLabel, "wrap");
//// Max. thrust:
- panel.add(new JLabel("Max. thrust:"));
+ panel.add(new JLabel(trans.get("TCMotorSelPan.lbl.Maxthrust")));
maxThrustLabel = new JLabel();
panel.add(maxThrustLabel, "wrap");
//// Burn time:
- panel.add(new JLabel("Burn time:"));
+ panel.add(new JLabel(trans.get("TCMotorSelPan.lbl.Burntime")));
burnTimeLabel = new JLabel();
panel.add(burnTimeLabel, "wrap");
//// Launch mass:
- panel.add(new JLabel("Launch mass:"));
+ panel.add(new JLabel(trans.get("TCMotorSelPan.lbl.Launchmass")));
launchMassLabel = new JLabel();
panel.add(launchMassLabel, "wrap");
//// Empty mass:
- panel.add(new JLabel("Empty mass:"));
+ panel.add(new JLabel(trans.get("TCMotorSelPan.lbl.Emptymass")));
emptyMassLabel = new JLabel();
panel.add(emptyMassLabel, "wrap");
//// Data points:
- panel.add(new JLabel("Data points:"));
+ panel.add(new JLabel(trans.get("TCMotorSelPan.lbl.Datapoints")));
dataPointsLabel = new JLabel();
panel.add(dataPointsLabel, "wrap para");
if (System.getProperty("openrocket.debug.motordigest") != null) {
//// Digest:
- panel.add(new JLabel("Digest:"));
+ panel.add(new JLabel(trans.get("TCMotorSelPan.lbl.Digest")));
digestLabel = new JLabel();
panel.add(digestLabel, "w :300:, wrap para");
} else {
changeLabelFont(plot.getDomainAxis(), -2);
//// Thrust curve:
- chart.setTitle(new TextTitle("Thrust curve:", this.getFont()));
+ chart.setTitle(new TextTitle(trans.get("TCMotorSelPan.title.Thrustcurve"), this.getFont()));
chart.setBackgroundPaint(this.getBackground());
plot.setBackgroundPaint(Color.WHITE);
plot.setDomainGridlinePaint(Color.LIGHT_GRAY);
ThrustCurveMotor m = motors.get(i);
//// Thrust
- XYSeries series = new XYSeries("Thrust");
+ XYSeries series = new XYSeries(trans.get("TCMotorSelPan.title.Thrust"));
double[] time = m.getTimePoints();
double[] thrust = m.getThrustPoints();
private void setComment(String s) {
s = s.trim();
if (s.length() == 0) {
+ //// No description available.
comment.setText("No description available.");
comment.setFont(noCommentFont);
comment.setForeground(NO_COMMENT_COLOR);
private void setDelays(boolean reset) {
if (selectedMotor == null) {
- delayBox.setModel(new DefaultComboBoxModel(new String[] { "None" }));
+ //// None
+ delayBox.setModel(new DefaultComboBoxModel(new String[] { trans.get("TCMotorSelPan.delayBox.None") }));
delayBox.setSelectedIndex(0);
} else {
double currentDelay = selectedDelay; // Store current setting locally
for (int i = 0; i < delays.size(); i++) {
- delayStrings[i] = ThrustCurveMotor.getDelayString(delays.get(i), "None");
+ //// None
+ delayStrings[i] = ThrustCurveMotor.getDelayString(delays.get(i), trans.get("TCMotorSelPan.delayBox.None"));
}
delayBox.setModel(new DefaultComboBoxModel(delayStrings));
}
if (!Double.isNaN(closest)) {
selectedDelay = closest;
- delayBox.setSelectedItem(ThrustCurveMotor.getDelayString(closest, "None"));
+ //// None
+ delayBox.setSelectedItem(ThrustCurveMotor.getDelayString(closest, trans.get("TCMotorSelPan.delayBox.None")));
} else {
delayBox.setSelectedItem("None");
}
} else {
selectedDelay = currentDelay;
- delayBox.setSelectedItem(ThrustCurveMotor.getDelayString(currentDelay, "None"));
+ //// None
+ delayBox.setSelectedItem(ThrustCurveMotor.getDelayString(currentDelay, trans.get("TCMotorSelPan.delayBox.None")));
}
//// Position to insert new body components:
panel.add(new JLabel(trans.get("pref.dlg.lbl.Positiontoinsert")), "gapright para");
panel.add(new JComboBox(new PrefChoiseSelector(Prefs.BODY_COMPONENT_INSERT_POSITION_KEY,
- "Always ask", "Insert in middle", "Add to end")), "wrap para, growx, sg combos");
+ //// Always ask
+ //// Insert in middle
+ //// Add to end
+ trans.get("pref.dlg.PrefChoiseSelector1"),
+ trans.get("pref.dlg.PrefChoiseSelector2"),
+ trans.get("pref.dlg.PrefChoiseSelector3"))), "wrap para, growx, sg combos");
//// Confirm deletion of simulations:
panel.add(new JLabel(trans.get("pref.dlg.lbl.Confirmdeletion")));
panel.add(new JComboBox(new PrefBooleanSelector(Prefs.CONFIRM_DELETE_SIMULATION,
- "Delete", "Confirm", true)), "wrap 40lp, growx, sg combos");
+ //// Delete
+ //// Confirm
+ trans.get("pref.dlg.PrefBooleanSelector1"),
+ trans.get("pref.dlg.PrefBooleanSelector2"), true)), "wrap 40lp, growx, sg combos");
//// User-defined thrust curves:
panel.add(new JLabel(trans.get("pref.dlg.lbl.User-definedthrust")), "spanx, wrap");
chooser.setCurrentDirectory(defaultDirectory);
}
- int returnVal = chooser.showDialog(PreferencesDialog.this, "Add");
+ //// Add
+ int returnVal = chooser.showDialog(PreferencesDialog.this, trans.get("pref.dlg.Add"));
if (returnVal == JFileChooser.APPROVE_OPTION) {
log.user("Adding user thrust curve: " + chooser.getSelectedFile());
defaultDirectory = chooser.getCurrentDirectory();
});
panel.add(button, "wrap");
- DescriptionArea desc = new DescriptionArea("Add directories, RASP motor files (*.eng), " +
- "RockSim engine files (*.rse) or ZIP archives separated by a semicolon (;) to load external " +
- "thrust curves. Changes will take effect the next time you start OpenRocket.", 3, -3, false);
+ //// Add directories, RASP motor files (*.eng), RockSim engine files (*.rse) or ZIP archives separated by a semicolon (;) to load external thrust curves. Changes will take effect the next time you start OpenRocket.
+ DescriptionArea desc = new DescriptionArea(trans.get("pref.dlg.DescriptionArea.Adddirectories"), 3, -3, false);
desc.setBackground(getBackground());
panel.add(desc, "spanx, growx, wrap 40lp");
private void drawMainInfo() {
GlyphVector name = createText(configuration.getRocket().getName());
GlyphVector lengthLine = createText(
- "Length " + UnitGroup.UNITS_LENGTH.getDefaultUnit().toStringUnit(length) +
- ", max. diameter " +
+ //// Length
+ trans.get("RocketInfo.lengthLine.Length") +" " + UnitGroup.UNITS_LENGTH.getDefaultUnit().toStringUnit(length) +
+ //// , max. diameter
+ trans.get("RocketInfo.lengthLine.maxdiameter") +" " +
UnitGroup.UNITS_LENGTH.getDefaultUnit().toStringUnit(diameter));
String massText;
if (configuration.hasMotors())
- massText = "Mass with motors ";
+ //// Mass with motors
+ massText = trans.get("RocketInfo.massText1") +" ";
else
- massText = "Mass with no motors ";
+ //// Mass with no motors
+ massText = trans.get("RocketInfo.massText2") +" ";
massText += UnitGroup.UNITS_MASS.getDefaultUnit().toStringUnit(mass);
private void drawStabilityInfo() {
String at;
-
- at = "at M="+UnitGroup.UNITS_COEFFICIENT.getDefaultUnit().toStringUnit(mach);
+ //// at M=
+ at = trans.get("RocketInfo.at")+UnitGroup.UNITS_COEFFICIENT.getDefaultUnit().toStringUnit(mach);
if (!Double.isNaN(aoa)) {
at += " "+ALPHA+"=" + UnitGroup.UNITS_ANGLE.getDefaultUnit().toStringUnit(aoa);
}
getCp());
GlyphVector stabValue = createText(
getStability());
-
- GlyphVector cgText = createText("CG: ");
- GlyphVector cpText = createText("CP: ");
- GlyphVector stabText = createText("Stability: ");
+ //// CG:
+ GlyphVector cgText = createText(trans.get("RocketInfo.cgText") +" ");
+ //// CP:
+ GlyphVector cpText = createText(trans.get("RocketInfo.cpText") +" ");
+ //// Stability:
+ GlyphVector stabText = createText(trans.get("RocketInfo.stabText") + " ");
GlyphVector atText = createSmallText(at);
Rectangle2D cgRect = cgValue.getVisualBounds();
GlyphVector[] texts = new GlyphVector[warnings.size()+1];
double max = 0;
- texts[0] = createText("Warning:");
+ //// Warning:
+ texts[0] = createText(trans.get("RocketInfo.Warning"));
int i=1;
for (Warning w: warnings) {
texts[i] = createText(w.toString());
double height = drawFlightData();
if (calculatingData) {
- GlyphVector calculating = createText("Calculating...");
+ //// Calculating...
+ GlyphVector calculating = createText(trans.get("RocketInfo.Calculating"));
g2.setColor(Color.BLACK);
g2.drawGlyphVector(calculating, x1, (float)(y2-height));
}
double width=0;
- GlyphVector apogee = createText("Apogee: ");
- GlyphVector maxVelocity = createText("Max. velocity: ");
- GlyphVector maxAcceleration = createText("Max. acceleration: ");
+ //// Apogee:
+ GlyphVector apogee = createText(trans.get("RocketInfo.Apogee")+" ");
+ //// Max. velocity:
+ GlyphVector maxVelocity = createText(trans.get("RocketInfo.Maxvelocity") +" ");
+ //// Max. acceleration:
+ GlyphVector maxAcceleration = createText(trans.get("RocketInfo.Maxacceleration") + " ");
GlyphVector apogeeValue, velocityValue, accelerationValue;
if (!Double.isNaN(flightData.getMaxAltitude())) {
apogeeValue = createText(
UnitGroup.UNITS_DISTANCE.toStringUnit(flightData.getMaxAltitude()));
} else {
- apogeeValue = createText("N/A");
+ //// N/A
+ apogeeValue = createText(trans.get("RocketInfo.apogeeValue"));
}
if (!Double.isNaN(flightData.getMaxVelocity())) {
velocityValue = createText(
UnitGroup.UNITS_VELOCITY.toStringUnit(flightData.getMaxVelocity()) +
- " (Mach " +
+ //// (Mach
+ " " +trans.get("RocketInfo.Mach") +" " +
UnitGroup.UNITS_COEFFICIENT.toString(flightData.getMaxMachNumber()) + ")");
} else {
- velocityValue = createText("N/A");
+ //// N/A
+ velocityValue = createText(trans.get("RocketInfo.velocityValue"));
}
if (!Double.isNaN(flightData.getMaxAcceleration())) {
accelerationValue = createText(
UnitGroup.UNITS_ACCELERATION.toStringUnit(flightData.getMaxAcceleration()));
} else {
- accelerationValue = createText("N/A");
+ //// N/A
+ accelerationValue = createText(trans.get("RocketInfo.accelerationValue"));
}
Rectangle2D rect;
log.info("Warnings while reading file: " + warnings);
WarningDialog.showWarnings(parent,
new Object[] {
- "The following problems were encountered while opening " + filename + ".",
- "Some design features may not have been loaded correctly."
+ //// The following problems were encountered while opening
+ trans.get("BasicFrame.WarningDialog.txt1") +" " + filename + ".",
+ //// Some design features may not have been loaded correctly.
+ trans.get("BasicFrame.WarningDialog.txt2")
},
- "Warnings while opening file", warnings);
+ //// Warnings while opening file
+ trans.get("BasicFrame.WarningDialog.title"), warnings);
}
Rocket rocket = new Rocket();
Stage stage = new Stage();
- stage.setName("Sustainer");
+ //// Sustainer
+ stage.setName(trans.get("BasicFrame.StageName.Sustainer"));
rocket.addChild(stage);
OpenRocketDocument doc = new OpenRocketDocument(rocket);
doc.setSaved(true);
import javax.swing.Icon;
import javax.swing.ImageIcon;
+import net.sf.openrocket.l10n.Translator;
import net.sf.openrocket.rocketcomponent.BodyTube;
import net.sf.openrocket.rocketcomponent.Bulkhead;
import net.sf.openrocket.rocketcomponent.CenteringRing;
import net.sf.openrocket.rocketcomponent.Transition;
import net.sf.openrocket.rocketcomponent.TrapezoidFinSet;
import net.sf.openrocket.rocketcomponent.TubeCoupler;
+import net.sf.openrocket.startup.Application;
public class ComponentIcons {
-
+ private static final Translator trans = Application.getTranslator();
+
private static final String ICON_DIRECTORY = "pix/componenticons/";
private static final String SMALL_SUFFIX = "-small.png";
private static final String LARGE_SUFFIX = "-large.png";
new HashMap<Class<?>,ImageIcon>();
static {
- load("nosecone", "Nose cone", NoseCone.class);
- load("bodytube", "Body tube", BodyTube.class);
- load("transition", "Transition", Transition.class);
- load("trapezoidfin", "Trapezoidal fin set", TrapezoidFinSet.class);
- load("ellipticalfin", "Elliptical fin set", EllipticalFinSet.class);
- load("freeformfin", "Freeform fin set", FreeformFinSet.class);
- load("launchlug", "Launch lug", LaunchLug.class);
- load("innertube", "Inner tube", InnerTube.class);
- load("tubecoupler", "Tube coupler", TubeCoupler.class);
- load("centeringring", "Centering ring", CenteringRing.class);
- load("bulkhead", "Bulk head", Bulkhead.class);
- load("engineblock", "Engine block", EngineBlock.class);
- load("parachute", "Parachute", Parachute.class);
- load("streamer", "Streamer", Streamer.class);
- load("shockcord", "Shock cord", ShockCord.class);
- load("mass", "Mass component", MassComponent.class);
+ //// Nose cone
+ load("nosecone", trans.get("ComponentIcons.Nosecone"), NoseCone.class);
+ //// Body tube
+ load("bodytube", trans.get("ComponentIcons.Bodytube"), BodyTube.class);
+ //// Transition
+ load("transition", trans.get("ComponentIcons.Transition"), Transition.class);
+ //// Trapezoidal fin set
+ load("trapezoidfin", trans.get("ComponentIcons.Trapezoidalfinset"), TrapezoidFinSet.class);
+ //// Elliptical fin set
+ load("ellipticalfin", trans.get("ComponentIcons.Ellipticalfinset"), EllipticalFinSet.class);
+ //// Freeform fin set
+ load("freeformfin", trans.get("ComponentIcons.Freeformfinset"), FreeformFinSet.class);
+ //// Launch lug
+ load("launchlug", trans.get("ComponentIcons.Launchlug"), LaunchLug.class);
+ //// Inner tube
+ load("innertube", trans.get("ComponentIcons.Innertube"), InnerTube.class);
+ //// Tube coupler
+ load("tubecoupler", trans.get("ComponentIcons.Tubecoupler"), TubeCoupler.class);
+ //// Centering ring
+ load("centeringring", trans.get("ComponentIcons.Centeringring"), CenteringRing.class);
+ //// Bulk head
+ load("bulkhead", trans.get("ComponentIcons.Bulkhead"), Bulkhead.class);
+ //// Engine block
+ load("engineblock", trans.get("ComponentIcons.Engineblock"), EngineBlock.class);
+ //// Parachute
+ load("parachute", trans.get("ComponentIcons.Parachute"), Parachute.class);
+ //// Streamer
+ load("streamer", trans.get("ComponentIcons.Streamer"), Streamer.class);
+ //// Shock cord
+ load("shockcord", trans.get("ComponentIcons.Shockcord"), ShockCord.class);
+ //// Mass component
+ load("mass", trans.get("ComponentIcons.Masscomponent"), MassComponent.class);
}
private static void load(String filename, String name, Class<?> componentClass) {
}
- icons[1] = new ImageIcon(bi2,desc + " (disabled)");
+ //// (disabled)
+ icons[1] = new ImageIcon(bi2,desc + " " +trans.get("ComponentIcons.disabled"));
return icons;
} else {
private String getIntensityDescription(double i) {
if (i < 0.001)
- return "None";
+ //// None
+ return trans.get("simedtdlg.IntensityDesc.None");
if (i < 0.05)
- return "Very low";
+ //// Very low
+ return trans.get("simedtdlg.IntensityDesc.Verylow");
if (i < 0.10)
- return "Low";
+ //// Low
+ return trans.get("simedtdlg.IntensityDesc.Low");
if (i < 0.15)
- return "Medium";
+ //// Medium
+ return trans.get("simedtdlg.IntensityDesc.Medium");
if (i < 0.20)
- return "High";
+ //// High
+ return trans.get("simedtdlg.IntensityDesc.High");
if (i < 0.25)
- return "Very high";
- return "Extreme";
+ //// Very high
+ return trans.get("simedtdlg.IntensityDesc.Veryhigh");
+ //// Extreme
+ return trans.get("simedtdlg.IntensityDesc.Extreme");
}
PlotConfiguration config;
//// Vertical motion vs. time
- config = new PlotConfiguration("Vertical motion vs. time");
+ config = new PlotConfiguration(trans.get("PlotConfiguration.Verticalmotion"));
config.addPlotDataType(FlightDataType.TYPE_ALTITUDE, 0);
config.addPlotDataType(FlightDataType.TYPE_VELOCITY_Z);
config.addPlotDataType(FlightDataType.TYPE_ACCELERATION_Z);
configs.add(config);
//// Total motion vs. time
- config = new PlotConfiguration("Total motion vs. time");
+ config = new PlotConfiguration(trans.get("PlotConfiguration.Totalmotion"));
config.addPlotDataType(FlightDataType.TYPE_ALTITUDE, 0);
config.addPlotDataType(FlightDataType.TYPE_VELOCITY_TOTAL);
config.addPlotDataType(FlightDataType.TYPE_ACCELERATION_TOTAL);
configs.add(config);
//// Flight side profile
- config = new PlotConfiguration("Flight side profile", FlightDataType.TYPE_POSITION_X);
+ config = new PlotConfiguration(trans.get("PlotConfiguration.Flightside"), FlightDataType.TYPE_POSITION_X);
config.addPlotDataType(FlightDataType.TYPE_ALTITUDE);
config.setEvent(FlightEvent.Type.IGNITION, true);
config.setEvent(FlightEvent.Type.BURNOUT, true);
public static final int LEFT = 0;
public static final int RIGHT = 1;
- public static final String AUTO_NAME = "Auto";
- public static final String LEFT_NAME = "Left";
- public static final String RIGHT_NAME = "Right";
+ //// Auto
+ public static final String AUTO_NAME = trans.get("simplotpanel.AUTO_NAME");
+ //// Left
+ public static final String LEFT_NAME = trans.get("simplotpanel.LEFT_NAME");
+ //// Right
+ public static final String RIGHT_NAME = trans.get("simplotpanel.RIGHT_NAME");
- private static final String CUSTOM = "Custom";
+ //// Custom
+ private static final String CUSTOM = trans.get("simplotpanel.CUSTOM");
/** The "Custom" configuration - not to be used for anything other than the title. */
private static final PlotConfiguration CUSTOM_CONFIGURATION;
package net.sf.openrocket.rocketcomponent;
+import net.sf.openrocket.l10n.Translator;
import net.sf.openrocket.motor.Motor;
+import net.sf.openrocket.startup.Application;
import net.sf.openrocket.util.Coordinate;
import net.sf.openrocket.util.MathUtil;
*/
public class BodyTube extends SymmetricComponent implements MotorMount, Coaxial {
-
+ private static final Translator trans = Application.getTranslator();
+
private double radius = 0;
private boolean autoRadius = false; // Radius chosen automatically based on parent component
*/
@Override
public String getComponentName() {
- return "Body tube";
+ //// Body tube
+ return trans.get("BodyTube.BodyTube");
}
/**
package net.sf.openrocket.rocketcomponent;
+import net.sf.openrocket.l10n.Translator;
+import net.sf.openrocket.startup.Application;
+
public class Bulkhead extends RadiusRingComponent {
-
+ private static final Translator trans = Application.getTranslator();
+
public Bulkhead() {
setOuterRadiusAutomatic(true);
setLength(0.002);
@Override
public String getComponentName() {
- return "Bulkhead";
+ //// Bulkhead
+ return trans.get("Bulkhead.Bulkhead");
}
@Override
import java.util.List;
+import net.sf.openrocket.l10n.Translator;
import net.sf.openrocket.material.Material;
+import net.sf.openrocket.startup.Application;
import net.sf.openrocket.unit.UnitGroup;
import net.sf.openrocket.util.Prefs;
public abstract class ExternalComponent extends RocketComponent {
public enum Finish {
- ROUGH("Rough", 500e-6),
- UNFINISHED("Unfinished", 150e-6),
- NORMAL("Regular paint", 60e-6),
- SMOOTH("Smooth paint", 20e-6),
- POLISHED("Polished", 2e-6);
+ //// Rough
+ ROUGH("ExternalComponent.Rough", 500e-6),
+ //// Unfinished
+ UNFINISHED("ExternalComponent.Unfinished", 150e-6),
+ //// Regular paint
+ NORMAL("ExternalComponent.Regularpaint", 60e-6),
+ //// Smooth paint
+ SMOOTH("ExternalComponent.Smoothpaint", 20e-6),
+ //// Polished
+ POLISHED("ExternalComponent.Polished", 2e-6);
private final String name;
private final double roughnessSize;
@Override
public String toString() {
- return name + " (" + UnitGroup.UNITS_ROUGHNESS.toStringUnit(roughnessSize) + ")";
+ final Translator trans = Application.getTranslator();
+ return trans.get(name) + " (" + UnitGroup.UNITS_ROUGHNESS.toStringUnit(roughnessSize) + ")";
}
}
import java.util.Collection;
import java.util.List;
+import net.sf.openrocket.l10n.Translator;
+import net.sf.openrocket.startup.Application;
import net.sf.openrocket.util.Coordinate;
import net.sf.openrocket.util.MathUtil;
import net.sf.openrocket.util.Transformation;
public abstract class FinSet extends ExternalComponent {
-
+ private static final Translator trans = Application.getTranslator();
+
/**
* Maximum allowed cant of fins.
*/
public enum CrossSection {
- SQUARE("Square", 1.00),
- ROUNDED("Rounded", 0.99),
- AIRFOIL("Airfoil", 0.85);
+ //// Square
+ SQUARE(trans.get("FinSet.CrossSection.SQUARE"), 1.00),
+ //// Rounded
+ ROUNDED(trans.get("FinSet.CrossSection.ROUNDED"), 0.99),
+ //// Airfoil
+ AIRFOIL(trans.get("FinSet.CrossSection.AIRFOIL"), 0.85);
private final String name;
private final double volume;
}
public enum TabRelativePosition {
- FRONT("Root chord leading edge"),
- CENTER("Root chord midpoint"),
- END("Root chord trailing edge");
+ //// Root chord leading edge
+ FRONT(trans.get("FinSet.TabRelativePosition.FRONT")),
+ //// Root chord midpoint
+ CENTER(trans.get("FinSet.TabRelativePosition.CENTER")),
+ //// Root chord trailing edge
+ END(trans.get("FinSet.TabRelativePosition.END"));
private final String name;
import java.util.Collections;
import java.util.List;
+import net.sf.openrocket.l10n.Translator;
import net.sf.openrocket.logging.LogHelper;
import net.sf.openrocket.startup.Application;
import net.sf.openrocket.util.ArrayList;
public class FreeformFinSet extends FinSet {
private static final LogHelper log = Application.getLogger();
-
+ private static final Translator trans = Application.getTranslator();
+
private ArrayList<Coordinate> points = new ArrayList<Coordinate>();
public FreeformFinSet() {
@Override
public String getComponentName() {
- return "Freeform fin set";
+ //// Freeform fin set
+ return trans.get("FreeformFinSet.FreeformFinSet");
}
package net.sf.openrocket.rocketcomponent;
+import net.sf.openrocket.l10n.Translator;
import net.sf.openrocket.motor.Motor;
+import net.sf.openrocket.startup.Application;
import net.sf.openrocket.util.BugException;
import net.sf.openrocket.util.Coordinate;
import net.sf.openrocket.util.MathUtil;
*/
public class InnerTube extends ThicknessRingComponent
implements Clusterable, RadialParent, MotorMount {
-
+ private static final Translator trans = Application.getTranslator();
+
private ClusterConfiguration cluster = ClusterConfiguration.SINGLE;
private double clusterScale = 1.0;
private double clusterRotation = 0.0;
@Override
public String getComponentName() {
- return "Inner Tube";
+ //// Inner Tube
+ return trans.get("InnerTube.InnerTube");
}
@Override
package net.sf.openrocket.rocketcomponent;
+import net.sf.openrocket.l10n.Translator;
+import net.sf.openrocket.startup.Application;
import net.sf.openrocket.util.Coordinate;
import net.sf.openrocket.util.MathUtil;
public class LaunchLug extends ExternalComponent implements Coaxial {
+ private static final Translator trans = Application.getTranslator();
+
private double radius;
private double thickness;
@Override
public String getComponentName() {
- return "Launch lug";
+ //// Launch lug
+ return trans.get("LaunchLug.Launchlug");
}
@Override
package net.sf.openrocket.rocketcomponent;
+import net.sf.openrocket.l10n.Translator;
+import net.sf.openrocket.startup.Application;
import net.sf.openrocket.util.MathUtil;
public class MassComponent extends MassObject {
+ private static final Translator trans = Application.getTranslator();
+
private double mass = 0;
@Override
public String getComponentName() {
- return "Mass component";
+ //// Mass component
+ return trans.get("MassComponent.MassComponent");
}
@Override
package net.sf.openrocket.rocketcomponent;
+import net.sf.openrocket.l10n.Translator;
import net.sf.openrocket.motor.Motor;
import net.sf.openrocket.simulation.FlightEvent;
+import net.sf.openrocket.startup.Application;
import net.sf.openrocket.util.ChangeSource;
import net.sf.openrocket.util.Coordinate;
public interface MotorMount extends ChangeSource {
-
+ static final Translator trans = Application.getTranslator();
+
public static enum IgnitionEvent {
- AUTOMATIC("Automatic (launch or ejection charge)") {
+ //// Automatic (launch or ejection charge)
+ AUTOMATIC(trans.get("MotorMount.IgnitionEvent.AUTOMATIC")) {
@Override
public boolean isActivationEvent(FlightEvent e, RocketComponent source) {
int count = source.getRocket().getStageCount();
}
}
},
- LAUNCH("Launch") {
+ //// Launch
+ LAUNCH(trans.get("MotorMount.IgnitionEvent.LAUNCH")) {
@Override
public boolean isActivationEvent(FlightEvent e, RocketComponent source) {
return (e.getType() == FlightEvent.Type.LAUNCH);
}
},
- EJECTION_CHARGE("First ejection charge of previous stage") {
+ //// First ejection charge of previous stage
+ EJECTION_CHARGE(trans.get("MotorMount.IgnitionEvent.EJECTION_CHARGE")) {
@Override
public boolean isActivationEvent(FlightEvent e, RocketComponent source) {
if (e.getType() != FlightEvent.Type.EJECTION_CHARGE)
return (mount+1 == charge);
}
},
- BURNOUT("First burnout of previous stage") {
+ //// First burnout of previous stage
+ BURNOUT(trans.get("MotorMount.IgnitionEvent.BURNOUT")) {
@Override
public boolean isActivationEvent(FlightEvent e, RocketComponent source) {
if (e.getType() != FlightEvent.Type.BURNOUT)
return (mount+1 == charge);
}
},
- NEVER("Never") {
+ //// Never
+ NEVER(trans.get("MotorMount.IgnitionEvent.NEVER")) {
@Override
public boolean isActivationEvent(FlightEvent e, RocketComponent source) {
return false;
package net.sf.openrocket.rocketcomponent;
+import net.sf.openrocket.l10n.Translator;
+import net.sf.openrocket.startup.Application;
+
/**
* Rocket nose cones of various types. Implemented as a transition with the
* fore radius == 0.
*/
public class NoseCone extends Transition {
-
+ private static final Translator trans = Application.getTranslator();
+
/********* Constructors **********/
public NoseCone() {
*/
@Override
public String getComponentName() {
- return "Nose cone";
+ //// Nose cone
+ return trans.get("NoseCone.NoseCone");
}
/**
package net.sf.openrocket.rocketcomponent;
+import net.sf.openrocket.l10n.Translator;
import net.sf.openrocket.material.Material;
+import net.sf.openrocket.startup.Application;
import net.sf.openrocket.util.MathUtil;
import net.sf.openrocket.util.Prefs;
public class Parachute extends RecoveryDevice {
-
+ private static final Translator trans = Application.getTranslator();
+
public static final double DEFAULT_CD = 0.8;
private double diameter;
@Override
public String getComponentName() {
- return "Parachute";
+ //// Parachute
+ return trans.get("Parachute.Parachute");
}
@Override
package net.sf.openrocket.rocketcomponent;
+import net.sf.openrocket.l10n.Translator;
import net.sf.openrocket.material.Material;
import net.sf.openrocket.simulation.FlightEvent;
+import net.sf.openrocket.startup.Application;
import net.sf.openrocket.util.MathUtil;
import net.sf.openrocket.util.Pair;
import net.sf.openrocket.util.Prefs;
* @author Sampo Niskanen <sampo.niskanen@iki.fi>
*/
public abstract class RecoveryDevice extends MassObject {
+ private static final Translator trans = Application.getTranslator();
public static enum DeployEvent {
- LAUNCH("Launch (plus NN seconds)") {
+ //// Launch (plus NN seconds)
+ LAUNCH(trans.get("RecoveryDevice.DeployEvent.LAUNCH")) {
@Override
public boolean isActivationEvent(FlightEvent e, RocketComponent source) {
return e.getType() == FlightEvent.Type.LAUNCH;
}
},
- EJECTION("First ejection charge of this stage") {
+ //// First ejection charge of this stage
+ EJECTION(trans.get("RecoveryDevice.DeployEvent.EJECTION")) {
@Override
public boolean isActivationEvent(FlightEvent e, RocketComponent source) {
if (e.getType() != FlightEvent.Type.EJECTION_CHARGE)
return charge.getStageNumber() == source.getStageNumber();
}
},
- APOGEE("Apogee") {
+ //// Apogee
+ APOGEE(trans.get("RecoveryDevice.DeployEvent.APOGEE")) {
@Override
public boolean isActivationEvent(FlightEvent e, RocketComponent source) {
return e.getType() == FlightEvent.Type.APOGEE;
}
},
- ALTITUDE("Specific altitude during descent") {
+ //// Specific altitude during descent
+ ALTITUDE(trans.get("RecoveryDevice.DeployEvent.ALTITUDE")) {
@SuppressWarnings("unchecked")
@Override
public boolean isActivationEvent(FlightEvent e, RocketComponent source) {
return (altitude.getU() >= alt) && (altitude.getV() <= alt);
}
},
- NEVER("Never") {
+ //// Never
+ NEVER(trans.get("RecoveryDevice.DeployEvent.NEVER")) {
@Override
public boolean isActivationEvent(FlightEvent e, RocketComponent source) {
return false;
import javax.swing.event.EventListenerList;
import net.sf.openrocket.gui.main.ExceptionHandler;
+import net.sf.openrocket.l10n.Translator;
import net.sf.openrocket.logging.LogHelper;
import net.sf.openrocket.motor.Motor;
import net.sf.openrocket.startup.Application;
public class Rocket extends RocketComponent {
private static final LogHelper log = Application.getLogger();
+ private static final Translator trans = Application.getTranslator();
public static final double DEFAULT_REFERENCE_LENGTH = 0.01;
}
if (motorCount == 0) {
- return "[No motors]";
+ //// [No motors]
+ return trans.get("Rocket.motorCount.Nomotor");
}
// Change multiple occurrences of a motor to n x motor
@Override
public String getComponentName() {
- return "Rocket";
+ //// Rocket
+ return trans.get("Rocket.compname.Rocket");
}
@Override
import javax.swing.event.ChangeListener;
+import net.sf.openrocket.l10n.Translator;
import net.sf.openrocket.logging.LogHelper;
import net.sf.openrocket.startup.Application;
import net.sf.openrocket.util.ArrayList;
public abstract class RocketComponent implements ChangeSource, Cloneable, Iterable<RocketComponent>,
Visitable<ComponentVisitor, RocketComponent> {
private static final LogHelper log = Application.getLogger();
-
+ private static final Translator trans = Application.getTranslator();
+
/*
* Text is suitable to the form
* Position relative to: <title>
*/
public enum Position {
/** Position relative to the top of the parent component. */
- TOP("Top of the parent component"),
+ //// Top of the parent component
+ TOP(trans.get("RocketComponent.Position.TOP")),
/** Position relative to the middle of the parent component. */
- MIDDLE("Middle of the parent component"),
+ //// Middle of the parent component
+ MIDDLE(trans.get("RocketComponent.Position.MIDDLE")),
/** Position relative to the bottom of the parent component. */
- BOTTOM("Bottom of the parent component"),
+ //// Bottom of the parent component
+ BOTTOM(trans.get("RocketComponent.Position.BOTTOM")),
/** Position after the parent component (for body components). */
- AFTER("After the parent component"),
+ //// After the parent component
+ AFTER(trans.get("RocketComponent.Position.AFTER")),
/** Specify an absolute X-coordinate position. */
- ABSOLUTE("Tip of the nose cone");
+ //// Tip of the nose cone
+ ABSOLUTE(trans.get("RocketComponent.Position.ABSOLUTE"));
private String title;
package net.sf.openrocket.rocketcomponent;
+import net.sf.openrocket.l10n.Translator;
import net.sf.openrocket.material.Material;
+import net.sf.openrocket.startup.Application;
import net.sf.openrocket.util.BugException;
import net.sf.openrocket.util.MathUtil;
import net.sf.openrocket.util.Prefs;
public class ShockCord extends MassObject {
-
+ private static final Translator trans = Application.getTranslator();
+
private Material material;
private double cordLength;
@Override
public String getComponentName() {
- return "Shock cord";
+ //// Shock cord
+ return trans.get("ShockCord.ShockCord");
}
@Override
package net.sf.openrocket.rocketcomponent;
+import net.sf.openrocket.l10n.Translator;
+import net.sf.openrocket.startup.Application;
+
public class Stage extends ComponentAssembly {
+ private static final Translator trans = Application.getTranslator();
+
@Override
public String getComponentName () {
- return "Stage";
+ //// Stage
+ return trans.get("Stage.Stage");
}
package net.sf.openrocket.rocketcomponent;
+import net.sf.openrocket.l10n.Translator;
+import net.sf.openrocket.startup.Application;
import net.sf.openrocket.util.Coordinate;
import net.sf.openrocket.util.MathUtil;
private double aftShoulderThickness;
private double aftShoulderLength;
private boolean aftShoulderCapped;
-
+ private static final Translator trans = Application.getTranslator();
// Used to cache the clip length
private double clipLength = -1;
*/
@Override
public String getComponentName() {
- return "Transition";
+ //// Transition
+ return trans.get("Transition.Transition");
}
@Override
/**
* Conical shape.
*/
- CONICAL("Conical",
- "A conical nose cone has a profile of a triangle.",
- "A conical transition has straight sides.") {
+ //// Conical
+ CONICAL(trans.get("Shape.Conical"),
+ //// A conical nose cone has a profile of a triangle.
+ trans.get("Shape.Conical.desc1"),
+ //// A conical transition has straight sides.
+ trans.get("Shape.Conical.desc2")) {
@Override
public double getRadius(double x, double radius, double length, double param) {
assert x >= 0;
* that will be used. That is, for param==1 a tangent ogive will be produced, and
* for smaller values the shape straightens out into a cone at param==0.
*/
- OGIVE("Ogive",
- "An ogive nose cone has a profile that is a segment of a circle. " +
- "The shape parameter value 1 produces a <b>tangent ogive</b>, which has " +
- "a smooth transition to the body tube, values less than 1 produce " +
- "<b>secant ogives</b>.",
- "An ogive transition has a profile that is a segment of a circle. " +
- "The shape parameter value 1 produces a <b>tangent ogive</b>, which has " +
- "a smooth transition to the body tube at the aft end, values less than 1 " +
- "produce <b>secant ogives</b>.") {
+ //// Ogive
+ OGIVE(trans.get("Shape.Ogive"),
+ //// An ogive nose cone has a profile that is a segment of a circle. The shape parameter value 1 produces a <b>tangent ogive</b>, which has a smooth transition to the body tube, values less than 1 produce <b>secant ogives</b>.
+ trans.get("Shape.Ogive.desc1"),
+ //// An ogive transition has a profile that is a segment of a circle. The shape parameter value 1 produces a <b>tangent ogive</b>, which has a smooth transition to the body tube at the aft end, values less than 1 produce <b>secant ogives</b>.
+ trans.get("Shape.Ogive.desc2")) {
@Override
public boolean usesParameter() {
return true; // Range 0...1 is default
/**
* Ellipsoidal shape.
*/
- ELLIPSOID("Ellipsoid",
- "An ellipsoidal nose cone has a profile of a half-ellipse " +
- "with major axes of lengths 2×<i>Length</i> and <i>Diameter</i>.",
- "An ellipsoidal transition has a profile of a half-ellipse " +
- "with major axes of lengths 2×<i>Length</i> and <i>Diameter</i>. If the " +
- "transition is not clipped, then the profile is extended at the center by the " +
- "corresponding radius.", true) {
+ //// Ellipsoid
+ ELLIPSOID(trans.get("Shape.Ellipsoid"),
+ //// An ellipsoidal nose cone has a profile of a half-ellipse with major axes of lengths 2×<i>Length</i> and <i>Diameter</i>.
+ trans.get("Shape.Ellipsoid.desc1"),
+ //// An ellipsoidal transition has a profile of a half-ellipse with major axes of lengths 2×<i>Length</i> and <i>Diameter</i>. If the transition is not clipped, then the profile is extended at the center by the corresponding radius.
+ trans.get("Shape.Ellipsoid.desc2"), true) {
@Override
public double getRadius(double x, double radius, double length, double param) {
assert x >= 0;
return sqrt(2 * radius * x - x * x); // radius/length * sphere
}
},
-
- POWER("Power series",
- "A power series nose cone has a profile of " +
- "<i>Radius</i> × (<i>x</i> / <i>Length</i>)" +
- "<sup><i>k</i></sup> " +
- "where <i>k</i> is the shape parameter. For <i>k</i>=0.5 this is a " +
- "<b>" + FRAC12 + "-power</b> or <b>parabolic</b> nose cone, for <i>k</i>=0.75 a " +
- "<b>" + FRAC34 + "-power</b>, and for <i>k</i>=1 a <b>conical</b> nose cone.",
- "A power series transition has a profile of " +
- "<i>Radius</i> × (<i>x</i> / <i>Length</i>)" +
- "<sup><i>k</i></sup> " +
- "where <i>k</i> is the shape parameter. For <i>k</i>=0.5 the transition is " +
- "<b>" + FRAC12 + "-power</b> or <b>parabolic</b>, for <i>k</i>=0.75 a " +
- "<b>" + FRAC34 + "-power</b>, and for <i>k</i>=1 <b>conical</b>.", true) {
+ //// Power series
+ POWER(trans.get("Shape.Powerseries"),
+ //// A power series nose cone has a profile of <i>Radius</i> × (<i>x</i> / <i>Length</i>)<sup><i>k</i></sup> where <i>k</i> is the shape parameter. For <i>k</i>=0.5 this is a <b>
+ trans.get("Shape.Powerseries.descA1") + FRAC12 +
+ //// -power</b> or <b>parabolic</b> nose cone, for <i>k</i>=0.75 a <b>
+ trans.get("Shape.Powerseries.descA2") + FRAC34 +
+ //// -power</b>, and for <i>k</i>=1 a <b>conical</b> nose cone.
+ trans.get("Shape.Powerseries.descA3"),
+ //// A power series transition has a profile of <i>Radius</i> × (<i>x</i> / <i>Length</i>)<sup><i>k</i></sup> where <i>k</i> is the shape parameter. For <i>k</i>=0.5 the transition is <b>
+ trans.get("Shape.Powerseries.descB1") + FRAC12 +
+ //// -power</b> or <b>parabolic</b>, for <i>k</i>=0.75 a <b>
+ trans.get("Shape.Powerseries.descB2") + FRAC34 +
+ //// -power</b>, and for <i>k</i>=1 <b>conical</b>.
+ trans.get("Shape.Powerseries.descB3"), true) {
@Override
public boolean usesParameter() { // Range 0...1
return true;
}
},
-
- PARABOLIC("Parabolic series",
- "A parabolic series nose cone has a profile of a parabola. The shape " +
- "parameter defines the segment of the parabola to utilize. The shape " +
- "parameter 1.0 produces a <b>full parabola</b> which is tangent to the body " +
- "tube, 0.75 produces a <b>3/4 parabola</b>, 0.5 procudes a " +
- "<b>1/2 parabola</b> and 0 produces a <b>conical</b> nose cone.",
- "A parabolic series transition has a profile of a parabola. The shape " +
- "parameter defines the segment of the parabola to utilize. The shape " +
- "parameter 1.0 produces a <b>full parabola</b> which is tangent to the body " +
- "tube at the aft end, 0.75 produces a <b>3/4 parabola</b>, 0.5 procudes a " +
- "<b>1/2 parabola</b> and 0 produces a <b>conical</b> transition.") {
+ //// Parabolic series
+ PARABOLIC(trans.get("Shape.Parabolicseries"),
+ ////A parabolic series nose cone has a profile of a parabola. The shape parameter defines the segment of the parabola to utilize. The shape parameter 1.0 produces a <b>full parabola</b> which is tangent to the body tube, 0.75 produces a <b>3/4 parabola</b>, 0.5 procudes a <b>1/2 parabola</b> and 0 produces a <b>conical</b> nose cone.
+ trans.get("Shape.Parabolicseries.desc1"),
+ ////A parabolic series transition has a profile of a parabola. The shape parameter defines the segment of the parabola to utilize. The shape parameter 1.0 produces a <b>full parabola</b> which is tangent to the body tube at the aft end, 0.75 produces a <b>3/4 parabola</b>, 0.5 procudes a <b>1/2 parabola</b> and 0 produces a <b>conical</b> transition.
+ trans.get("Shape.Parabolicseries.desc2")) {
// In principle a parabolic transition is clippable, but the difference is
// negligible.
-
+
@Override
public boolean usesParameter() { // Range 0...1
return true;
},
-
- HAACK("Haack series",
- "The Haack series nose cones are designed to minimize drag. The shape parameter " +
- "0 produces an <b>LD-Haack</b> or <b>Von Karman</b> nose cone, which minimizes " +
- "drag for fixed length and diameter, while a value of 0.333 produces an " +
- "<b>LV-Haack</b> nose cone, which minimizes drag for fixed length and volume.",
- "The Haack series <i>nose cones</i> are designed to minimize drag. " +
- "These transition shapes are their equivalents, but do not necessarily produce " +
- "optimal drag for transitions. " +
- "The shape parameter 0 produces an <b>LD-Haack</b> or <b>Von Karman</b> shape, " +
- "while a value of 0.333 produces an <b>LV-Haack</b> shape.", true) {
+ //// Haack series
+ HAACK(trans.get("Shape.Haackseries"),
+ //// The Haack series nose cones are designed to minimize drag. The shape parameter 0 produces an <b>LD-Haack</b> or <b>Von Karman</b> nose cone, which minimizes drag for fixed length and diameter, while a value of 0.333 produces an <b>LV-Haack</b> nose cone, which minimizes drag for fixed length and volume.
+ trans.get("Shape.Haackseries.desc1"),
+ //// The Haack series <i>nose cones</i> are designed to minimize drag. These transition shapes are their equivalents, but do not necessarily produce optimal drag for transitions. The shape parameter 0 produces an <b>LD-Haack</b> or <b>Von Karman</b> shape, while a value of 0.333 produces an <b>LV-Haack</b> shape.
+ trans.get("Shape.Haackseries.desc2"), true) {
@Override
public boolean usesParameter() {
return true;
package net.sf.openrocket.rocketcomponent;
+import net.sf.openrocket.l10n.Translator;
+import net.sf.openrocket.startup.Application;
import net.sf.openrocket.util.Coordinate;
/**
*/
public class TrapezoidFinSet extends FinSet {
+ private static final Translator trans = Application.getTranslator();
+
public static final double MAX_SWEEP_ANGLE=(89*Math.PI/180.0);
/*
@Override
public String getComponentName() {
- return "Trapezoidal fin set";
+ //// Trapezoidal fin set
+ return trans.get("TrapezoidFinSet.TrapezoidFinSet");
}
/**
package net.sf.openrocket.rocketcomponent;
+import net.sf.openrocket.l10n.Translator;
+import net.sf.openrocket.startup.Application;
+
public class TubeCoupler extends ThicknessRingComponent implements RadialParent {
-
+ private static final Translator trans = Application.getTranslator();
+
public TubeCoupler() {
setOuterRadiusAutomatic(true);
setThickness(0.002);
@Override
public String getComponentName() {
- return "Tube coupler";
+ //// Tube coupler
+ return trans.get("TubeCoupler.TubeCoupler");
}
@Override
import java.util.HashMap;
import java.util.Map;
+import net.sf.openrocket.l10n.Translator;
+import net.sf.openrocket.startup.Application;
import net.sf.openrocket.unit.UnitGroup;
/**
* @author Sampo Niskanen <sampo.niskanen@iki.fi>
*/
public class FlightDataType implements Comparable<FlightDataType> {
-
+ private static final Translator trans = Application.getTranslator();
+
/** Priority of custom-created variables */
private static final int DEFAULT_PRIORITY = 999;
//// Time
- public static final FlightDataType TYPE_TIME = newType("Time", UnitGroup.UNITS_FLIGHT_TIME, 1);
+ public static final FlightDataType TYPE_TIME = newType(trans.get("FlightDataType.TYPE_TIME"), UnitGroup.UNITS_FLIGHT_TIME, 1);
//// Vertical position and motion
- public static final FlightDataType TYPE_ALTITUDE = newType("Altitude", UnitGroup.UNITS_DISTANCE, 10);
- public static final FlightDataType TYPE_VELOCITY_Z = newType("Vertical velocity", UnitGroup.UNITS_VELOCITY, 11);
- public static final FlightDataType TYPE_ACCELERATION_Z = newType("Vertical acceleration", UnitGroup.UNITS_ACCELERATION, 12);
+ //// Altitude
+ public static final FlightDataType TYPE_ALTITUDE = newType(trans.get("FlightDataType.TYPE_ALTITUDE"), UnitGroup.UNITS_DISTANCE, 10);
+ //// Vertical velocity
+ public static final FlightDataType TYPE_VELOCITY_Z = newType(trans.get("FlightDataType.TYPE_VELOCITY_Z"), UnitGroup.UNITS_VELOCITY, 11);
+ //// Vertical acceleration
+ public static final FlightDataType TYPE_ACCELERATION_Z = newType(trans.get("FlightDataType.TYPE_ACCELERATION_Z"), UnitGroup.UNITS_ACCELERATION, 12);
//// Total motion
- public static final FlightDataType TYPE_VELOCITY_TOTAL = newType("Total velocity", UnitGroup.UNITS_VELOCITY, 20);
- public static final FlightDataType TYPE_ACCELERATION_TOTAL = newType("Total acceleration", UnitGroup.UNITS_ACCELERATION, 21);
+ //// Total velocity
+ public static final FlightDataType TYPE_VELOCITY_TOTAL = newType(trans.get("FlightDataType.TYPE_VELOCITY_TOTAL"), UnitGroup.UNITS_VELOCITY, 20);
+ //// Total acceleration
+ public static final FlightDataType TYPE_ACCELERATION_TOTAL = newType(trans.get("FlightDataType.TYPE_ACCELERATION_TOTAL"), UnitGroup.UNITS_ACCELERATION, 21);
//// Lateral position and motion
-
- public static final FlightDataType TYPE_POSITION_X = newType("Position upwind", UnitGroup.UNITS_DISTANCE, 30);
- public static final FlightDataType TYPE_POSITION_Y = newType("Position parallel to wind", UnitGroup.UNITS_DISTANCE, 31);
- public static final FlightDataType TYPE_POSITION_XY = newType("Lateral distance", UnitGroup.UNITS_DISTANCE, 32);
- public static final FlightDataType TYPE_POSITION_DIRECTION = newType("Lateral direction", UnitGroup.UNITS_ANGLE, 33);
-
- public static final FlightDataType TYPE_VELOCITY_XY = newType("Lateral velocity", UnitGroup.UNITS_VELOCITY, 34);
- public static final FlightDataType TYPE_ACCELERATION_XY = newType("Lateral acceleration", UnitGroup.UNITS_ACCELERATION, 35);
+ //// Position upwind
+ public static final FlightDataType TYPE_POSITION_X = newType(trans.get("FlightDataType.TYPE_POSITION_X"), UnitGroup.UNITS_DISTANCE, 30);
+ //// Position parallel to wind
+ public static final FlightDataType TYPE_POSITION_Y = newType(trans.get("FlightDataType.TYPE_POSITION_Y"), UnitGroup.UNITS_DISTANCE, 31);
+ //// Lateral distance
+ public static final FlightDataType TYPE_POSITION_XY = newType(trans.get("FlightDataType.TYPE_POSITION_XY"), UnitGroup.UNITS_DISTANCE, 32);
+ //// Lateral direction
+ public static final FlightDataType TYPE_POSITION_DIRECTION = newType(trans.get("FlightDataType.TYPE_POSITION_DIRECTION"), UnitGroup.UNITS_ANGLE, 33);
+ //// Lateral velocity
+ public static final FlightDataType TYPE_VELOCITY_XY = newType(trans.get("FlightDataType.TYPE_VELOCITY_XY"), UnitGroup.UNITS_VELOCITY, 34);
+ //// Lateral acceleration
+ public static final FlightDataType TYPE_ACCELERATION_XY = newType(trans.get("FlightDataType.TYPE_ACCELERATION_XY"), UnitGroup.UNITS_ACCELERATION, 35);
//// Angular motion
- public static final FlightDataType TYPE_AOA = newType("Angle of attack", UnitGroup.UNITS_ANGLE, 40);
- public static final FlightDataType TYPE_ROLL_RATE = newType("Roll rate", UnitGroup.UNITS_ROLL, 41);
- public static final FlightDataType TYPE_PITCH_RATE = newType("Pitch rate", UnitGroup.UNITS_ROLL, 42);
- public static final FlightDataType TYPE_YAW_RATE = newType("Yaw rate", UnitGroup.UNITS_ROLL, 43);
+ //// Angle of attack
+ public static final FlightDataType TYPE_AOA = newType(trans.get("FlightDataType.TYPE_AOA"), UnitGroup.UNITS_ANGLE, 40);
+ //// Roll rate
+ public static final FlightDataType TYPE_ROLL_RATE = newType(trans.get("FlightDataType.TYPE_ROLL_RATE"), UnitGroup.UNITS_ROLL, 41);
+ //// Pitch rate
+ public static final FlightDataType TYPE_PITCH_RATE = newType(trans.get("FlightDataType.TYPE_PITCH_RATE"), UnitGroup.UNITS_ROLL, 42);
+ //// Yaw rate
+ public static final FlightDataType TYPE_YAW_RATE = newType(trans.get("FlightDataType.TYPE_YAW_RATE"), UnitGroup.UNITS_ROLL, 43);
//// Stability information
- public static final FlightDataType TYPE_MASS = newType("Mass", UnitGroup.UNITS_MASS, 50);
- public static final FlightDataType TYPE_LONGITUDINAL_INERTIA = newType("Longitudinal moment of inertia", UnitGroup.UNITS_INERTIA, 51);
- public static final FlightDataType TYPE_ROTATIONAL_INERTIA = newType("Rotational moment of inertia", UnitGroup.UNITS_INERTIA, 52);
- public static final FlightDataType TYPE_CP_LOCATION = newType("CP location", UnitGroup.UNITS_LENGTH, 53);
- public static final FlightDataType TYPE_CG_LOCATION = newType("CG location", UnitGroup.UNITS_LENGTH, 54);
- public static final FlightDataType TYPE_STABILITY = newType("Stability margin calibers", UnitGroup.UNITS_COEFFICIENT, 55);
+ //// Mass
+ public static final FlightDataType TYPE_MASS = newType(trans.get("FlightDataType.TYPE_MASS"), UnitGroup.UNITS_MASS, 50);
+ //// Longitudinal moment of inertia
+ public static final FlightDataType TYPE_LONGITUDINAL_INERTIA = newType(trans.get("FlightDataType.TYPE_LONGITUDINAL_INERTIA"), UnitGroup.UNITS_INERTIA, 51);
+ //// Rotational moment of inertia
+ public static final FlightDataType TYPE_ROTATIONAL_INERTIA = newType(trans.get("FlightDataType.TYPE_ROTATIONAL_INERTIA"), UnitGroup.UNITS_INERTIA, 52);
+ //// CP location
+ public static final FlightDataType TYPE_CP_LOCATION = newType(trans.get("FlightDataType.TYPE_CP_LOCATION"), UnitGroup.UNITS_LENGTH, 53);
+ //// CG location
+ public static final FlightDataType TYPE_CG_LOCATION = newType(trans.get("FlightDataType.TYPE_CG_LOCATION"), UnitGroup.UNITS_LENGTH, 54);
+ //// Stability margin calibers
+ public static final FlightDataType TYPE_STABILITY = newType(trans.get("FlightDataType.TYPE_STABILITY"), UnitGroup.UNITS_COEFFICIENT, 55);
//// Characteristic numbers
- public static final FlightDataType TYPE_MACH_NUMBER = newType("Mach number", UnitGroup.UNITS_COEFFICIENT, 60);
- public static final FlightDataType TYPE_REYNOLDS_NUMBER = newType("Reynolds number", UnitGroup.UNITS_COEFFICIENT, 61);
+ //// Mach number
+ public static final FlightDataType TYPE_MACH_NUMBER = newType(trans.get("FlightDataType.TYPE_MACH_NUMBER"), UnitGroup.UNITS_COEFFICIENT, 60);
+ //// Reynolds number
+ public static final FlightDataType TYPE_REYNOLDS_NUMBER = newType(trans.get("FlightDataType.TYPE_REYNOLDS_NUMBER"), UnitGroup.UNITS_COEFFICIENT, 61);
//// Thrust and drag
- public static final FlightDataType TYPE_THRUST_FORCE = newType("Thrust", UnitGroup.UNITS_FORCE, 70);
- public static final FlightDataType TYPE_DRAG_FORCE = newType("Drag force", UnitGroup.UNITS_FORCE, 71);
- public static final FlightDataType TYPE_DRAG_COEFF = newType("Drag coefficient", UnitGroup.UNITS_COEFFICIENT, 72);
- public static final FlightDataType TYPE_AXIAL_DRAG_COEFF = newType("Axial drag coefficient", UnitGroup.UNITS_COEFFICIENT, 73);
+ //// Thrust
+ public static final FlightDataType TYPE_THRUST_FORCE = newType(trans.get("FlightDataType.TYPE_THRUST_FORCE"), UnitGroup.UNITS_FORCE, 70);
+ //// Drag force
+ public static final FlightDataType TYPE_DRAG_FORCE = newType(trans.get("FlightDataType.TYPE_DRAG_FORCE"), UnitGroup.UNITS_FORCE, 71);
+ //// Drag coefficient
+ public static final FlightDataType TYPE_DRAG_COEFF = newType(trans.get("FlightDataType.TYPE_DRAG_COEFF"), UnitGroup.UNITS_COEFFICIENT, 72);
+ //// Axial drag coefficient
+ public static final FlightDataType TYPE_AXIAL_DRAG_COEFF = newType(trans.get("FlightDataType.TYPE_AXIAL_DRAG_COEFF"), UnitGroup.UNITS_COEFFICIENT, 73);
//// Component drag coefficients
- public static final FlightDataType TYPE_FRICTION_DRAG_COEFF = newType("Friction drag coefficient", UnitGroup.UNITS_COEFFICIENT, 80);
- public static final FlightDataType TYPE_PRESSURE_DRAG_COEFF = newType("Pressure drag coefficient", UnitGroup.UNITS_COEFFICIENT, 81);
- public static final FlightDataType TYPE_BASE_DRAG_COEFF = newType("Base drag coefficient", UnitGroup.UNITS_COEFFICIENT, 82);
+ //// Friction drag coefficient
+ public static final FlightDataType TYPE_FRICTION_DRAG_COEFF = newType(trans.get("FlightDataType.TYPE_FRICTION_DRAG_COEFF"), UnitGroup.UNITS_COEFFICIENT, 80);
+ //// Pressure drag coefficient
+ public static final FlightDataType TYPE_PRESSURE_DRAG_COEFF = newType(trans.get("FlightDataType.TYPE_PRESSURE_DRAG_COEFF"), UnitGroup.UNITS_COEFFICIENT, 81);
+ //// Base drag coefficient
+ public static final FlightDataType TYPE_BASE_DRAG_COEFF = newType(trans.get("FlightDataType.TYPE_BASE_DRAG_COEFF"), UnitGroup.UNITS_COEFFICIENT, 82);
//// Other coefficients
- public static final FlightDataType TYPE_NORMAL_FORCE_COEFF = newType("Normal force coefficient", UnitGroup.UNITS_COEFFICIENT, 90);
- public static final FlightDataType TYPE_PITCH_MOMENT_COEFF = newType("Pitch moment coefficient", UnitGroup.UNITS_COEFFICIENT, 91);
- public static final FlightDataType TYPE_YAW_MOMENT_COEFF = newType("Yaw moment coefficient", UnitGroup.UNITS_COEFFICIENT, 92);
- public static final FlightDataType TYPE_SIDE_FORCE_COEFF = newType("Side force coefficient", UnitGroup.UNITS_COEFFICIENT, 93);
- public static final FlightDataType TYPE_ROLL_MOMENT_COEFF = newType("Roll moment coefficient", UnitGroup.UNITS_COEFFICIENT, 94);
- public static final FlightDataType TYPE_ROLL_FORCING_COEFF = newType("Roll forcing coefficient", UnitGroup.UNITS_COEFFICIENT, 95);
- public static final FlightDataType TYPE_ROLL_DAMPING_COEFF = newType("Roll damping coefficient", UnitGroup.UNITS_COEFFICIENT, 96);
-
- public static final FlightDataType TYPE_PITCH_DAMPING_MOMENT_COEFF = newType("Pitch damping coefficient", UnitGroup.UNITS_COEFFICIENT, 97);
- public static final FlightDataType TYPE_YAW_DAMPING_MOMENT_COEFF = newType("Yaw damping coefficient", UnitGroup.UNITS_COEFFICIENT, 98);
+ //// Normal force coefficient
+ public static final FlightDataType TYPE_NORMAL_FORCE_COEFF = newType(trans.get("FlightDataType.TYPE_NORMAL_FORCE_COEFF"), UnitGroup.UNITS_COEFFICIENT, 90);
+ //// Pitch moment coefficient
+ public static final FlightDataType TYPE_PITCH_MOMENT_COEFF = newType(trans.get("FlightDataType.TYPE_PITCH_MOMENT_COEFF"), UnitGroup.UNITS_COEFFICIENT, 91);
+ //// Yaw moment coefficient
+ public static final FlightDataType TYPE_YAW_MOMENT_COEFF = newType(trans.get("FlightDataType.TYPE_YAW_MOMENT_COEFF"), UnitGroup.UNITS_COEFFICIENT, 92);
+ //// Side force coefficient
+ public static final FlightDataType TYPE_SIDE_FORCE_COEFF = newType(trans.get("FlightDataType.TYPE_SIDE_FORCE_COEFF"), UnitGroup.UNITS_COEFFICIENT, 93);
+ //// Roll moment coefficient
+ public static final FlightDataType TYPE_ROLL_MOMENT_COEFF = newType(trans.get("FlightDataType.TYPE_ROLL_MOMENT_COEFF"), UnitGroup.UNITS_COEFFICIENT, 94);
+ //// Roll forcing coefficient
+ public static final FlightDataType TYPE_ROLL_FORCING_COEFF = newType(trans.get("FlightDataType.TYPE_ROLL_FORCING_COEFF"), UnitGroup.UNITS_COEFFICIENT, 95);
+ //// Roll damping coefficient
+ public static final FlightDataType TYPE_ROLL_DAMPING_COEFF = newType(trans.get("FlightDataType.TYPE_ROLL_DAMPING_COEFF"), UnitGroup.UNITS_COEFFICIENT, 96);
+
+ //// Pitch damping coefficient
+ public static final FlightDataType TYPE_PITCH_DAMPING_MOMENT_COEFF = newType(trans.get("FlightDataType.TYPE_PITCH_DAMPING_MOMENT_COEFF"), UnitGroup.UNITS_COEFFICIENT, 97);
+ //// Yaw damping coefficient
+ public static final FlightDataType TYPE_YAW_DAMPING_MOMENT_COEFF = newType(trans.get("FlightDataType.TYPE_YAW_DAMPING_MOMENT_COEFF"), UnitGroup.UNITS_COEFFICIENT, 98);
//// Reference length + area
- public static final FlightDataType TYPE_REFERENCE_LENGTH = newType("Reference length", UnitGroup.UNITS_LENGTH, 100);
- public static final FlightDataType TYPE_REFERENCE_AREA = newType("Reference area", UnitGroup.UNITS_AREA, 101);
+ //// Reference length
+ public static final FlightDataType TYPE_REFERENCE_LENGTH = newType(trans.get("FlightDataType.TYPE_REFERENCE_LENGTH"), UnitGroup.UNITS_LENGTH, 100);
+ //// Reference area
+ public static final FlightDataType TYPE_REFERENCE_AREA = newType(trans.get("FlightDataType.TYPE_REFERENCE_AREA"), UnitGroup.UNITS_AREA, 101);
//// Orientation
- public static final FlightDataType TYPE_ORIENTATION_THETA = newType("Vertical orientation (zenith)", UnitGroup.UNITS_ANGLE, 106);
- public static final FlightDataType TYPE_ORIENTATION_PHI = newType("Lateral orientation (azimuth)", UnitGroup.UNITS_ANGLE, 107);
+ //// Vertical orientation (zenith)
+ public static final FlightDataType TYPE_ORIENTATION_THETA = newType(trans.get("FlightDataType.TYPE_ORIENTATION_THETA"), UnitGroup.UNITS_ANGLE, 106);
+ //// Lateral orientation (azimuth)
+ public static final FlightDataType TYPE_ORIENTATION_PHI = newType(trans.get("FlightDataType.TYPE_ORIENTATION_PHI"), UnitGroup.UNITS_ANGLE, 107);
//// Atmospheric conditions
- public static final FlightDataType TYPE_WIND_VELOCITY = newType("Wind velocity", UnitGroup.UNITS_VELOCITY, 110);
- public static final FlightDataType TYPE_AIR_TEMPERATURE = newType("Air temperature", UnitGroup.UNITS_TEMPERATURE, 111);
- public static final FlightDataType TYPE_AIR_PRESSURE = newType("Air pressure", UnitGroup.UNITS_PRESSURE, 112);
- public static final FlightDataType TYPE_SPEED_OF_SOUND = newType("Speed of sound", UnitGroup.UNITS_VELOCITY, 113);
+ //// Wind velocity
+ public static final FlightDataType TYPE_WIND_VELOCITY = newType(trans.get("FlightDataType.TYPE_WIND_VELOCITY"), UnitGroup.UNITS_VELOCITY, 110);
+ //// Air temperature
+ public static final FlightDataType TYPE_AIR_TEMPERATURE = newType(trans.get("FlightDataType.TYPE_AIR_TEMPERATURE"), UnitGroup.UNITS_TEMPERATURE, 111);
+ //// Air pressure
+ public static final FlightDataType TYPE_AIR_PRESSURE = newType(trans.get("FlightDataType.TYPE_AIR_PRESSURE"), UnitGroup.UNITS_PRESSURE, 112);
+ //// Speed of sound
+ public static final FlightDataType TYPE_SPEED_OF_SOUND = newType(trans.get("FlightDataType.TYPE_SPEED_OF_SOUND"), UnitGroup.UNITS_VELOCITY, 113);
//// Simulation information
- public static final FlightDataType TYPE_TIME_STEP = newType("Simulation time step", UnitGroup.UNITS_TIME_STEP, 200);
- public static final FlightDataType TYPE_COMPUTATION_TIME = newType("Computation time", UnitGroup.UNITS_SHORT_TIME, 201);
+ //// Simulation time step
+ public static final FlightDataType TYPE_TIME_STEP = newType(trans.get("FlightDataType.TYPE_TIME_STEP"), UnitGroup.UNITS_TIME_STEP, 200);
+ //// Computation time
+ public static final FlightDataType TYPE_COMPUTATION_TIME = newType(trans.get("FlightDataType.TYPE_COMPUTATION_TIME"), UnitGroup.UNITS_SHORT_TIME, 201);
package net.sf.openrocket.simulation;
+import net.sf.openrocket.l10n.Translator;
import net.sf.openrocket.rocketcomponent.RocketComponent;
+import net.sf.openrocket.startup.Application;
/**
* @author Sampo Niskanen <sampo.niskanen@iki.fi>
*/
public class FlightEvent implements Comparable<FlightEvent> {
-
+ private static final Translator trans = Application.getTranslator();
+
/**
* The type of the flight event.
*
/**
* Rocket launch.
*/
- LAUNCH("Launch"),
+ //// Launch
+ LAUNCH(trans.get("FlightEvent.Type.LAUNCH")),
/**
* Ignition of a motor. Source is the motor mount the motor of which has ignited,
* and the data is the MotorId of the motor instance.
*/
- IGNITION("Motor ignition"),
+ //// Motor ignition
+ IGNITION(trans.get("FlightEvent.Type.IGNITION")),
/**
* When the motor has lifted off the ground.
*/
- LIFTOFF("Lift-off"),
+ //// Lift-off
+ LIFTOFF(trans.get("FlightEvent.Type.LIFTOFF")),
/**
* Launch rod has been cleared.
*/
- LAUNCHROD("Launch rod clearance"),
+ //// Launch rod clearance
+ LAUNCHROD(trans.get("FlightEvent.Type.LAUNCHROD")),
/**
* Burnout of a motor. Source is the motor mount the motor of which has burnt out,
* and the data is the MotorId of the motor instance.
*/
- BURNOUT("Motor burnout"),
+ //// Motor burnout
+ BURNOUT(trans.get("FlightEvent.Type.BURNOUT")),
/**
* Ejection charge of a motor fired. Source is the motor mount the motor of
* which has exploded its ejection charge, and data is the MotorId of the motor instance.
*/
- EJECTION_CHARGE("Ejection charge"),
+ //// Ejection charge
+ EJECTION_CHARGE(trans.get("FlightEvent.Type.EJECTION_CHARGE")),
/**
* Separation of a stage. Source is the stage which has separated all lower stages.
*/
- STAGE_SEPARATION("Stage separation"),
+ //// Stage separation
+ STAGE_SEPARATION(trans.get("FlightEvent.Type.STAGE_SEPARATION")),
/**
* Apogee has been reached.
*/
- APOGEE("Apogee"),
+ //// Apogee
+ APOGEE(trans.get("FlightEvent.Type.APOGEE")),
/**
* Opening of a recovery device. Source is the RecoveryComponent which has opened.
*/
- RECOVERY_DEVICE_DEPLOYMENT("Recovery device deployment"),
+ //// Recovery device deployment
+ RECOVERY_DEVICE_DEPLOYMENT(trans.get("FlightEvent.Type.RECOVERY_DEVICE_DEPLOYMENT")),
/**
* Ground has been hit after flight.
*/
- GROUND_HIT("Ground hit"),
+ //// Ground hit
+ GROUND_HIT(trans.get("FlightEvent.Type.GROUND_HIT")),
/**
* End of simulation. Placing this to the queue will end the simulation.
*/
- SIMULATION_END("Simulation end"),
+ //// Simulation end
+ SIMULATION_END(trans.get("FlightEvent.Type.SIMULATION_END")),
/**
* A change in altitude has occurred. Data is a <code>Pair<Double,Double></code>
* which contains the old and new altitudes.
*/
- ALTITUDE("Altitude change");
+ //// Altitude change
+ ALTITUDE(trans.get("FlightEvent.Type.ALTITUDE"));
private final String name;
import java.util.Arrays;
+import net.sf.openrocket.l10n.Translator;
+import net.sf.openrocket.startup.Application;
+
/**
* An enumeration of line styles. The line styles are defined by an array of
* floats suitable for <code>BasicStroke</code>.
*
* @author Sampo Niskanen <sampo.niskanen@iki.fi>
*/
+
public enum LineStyle {
- SOLID("Solid",new float[] { 10f, 0f }),
- DASHED("Dashed",new float[] { 6f, 4f }),
- DOTTED("Dotted",new float[] { 2f, 3f }),
- DASHDOT("Dash-dotted",new float[] { 8f, 3f, 2f, 3f})
+
+ //// Solid
+ SOLID("LineStyle.Solid",new float[] { 10f, 0f }),
+ //// Dashed
+ DASHED("LineStyle.Dashed",new float[] { 6f, 4f }),
+ //// Dotted
+ DOTTED("LineStyle.Dotted",new float[] { 2f, 3f }),
+ //// Dash-dotted
+ DASHDOT("LineStyle.Dash-dotted",new float[] { 8f, 3f, 2f, 3f})
;
private final String name;
private final float[] dashes;
+
LineStyle(String name, float[] dashes) {
+
this.name = name;
this.dashes = dashes;
}
}
@Override
public String toString() {
- return name;
+ final Translator trans = Application.getTranslator();
+ return trans.get(name);
}
}
\ No newline at end of file
import net.sf.openrocket.database.Databases;
import net.sf.openrocket.document.Simulation;
import net.sf.openrocket.gui.main.ExceptionHandler;
+import net.sf.openrocket.l10n.Translator;
import net.sf.openrocket.logging.LogHelper;
import net.sf.openrocket.material.Material;
import net.sf.openrocket.rocketcomponent.BodyComponent;
* Within a holder class so they will load only when needed.
*/
private static class DefaultMaterialHolder {
+ private static final Translator trans = Application.getTranslator();
+
+ //// Elastic cord (round 2mm, 1/16 in)
private static final Material DEFAULT_LINE_MATERIAL =
- Databases.findMaterial(Material.Type.LINE, "Elastic cord (round 2mm, 1/16 in)",
+ Databases.findMaterial(Material.Type.LINE, trans.get("Databases.materials.Elasticcordround2mm"),
0.0018, false);
+ //// Ripstop nylon
private static final Material DEFAULT_SURFACE_MATERIAL =
- Databases.findMaterial(Material.Type.SURFACE, "Ripstop nylon", 0.067, false);
+ Databases.findMaterial(Material.Type.SURFACE, trans.get("Databases.materials.Ripstopnylon"), 0.067, false);
+ //// Cardboard
private static final Material DEFAULT_BULK_MATERIAL =
- Databases.findMaterial(Material.Type.BULK, "Cardboard", 680, false);
+ Databases.findMaterial(Material.Type.BULK, trans.get("Databases.materials.Cardboard"), 680, false);
}
//////////////////////