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")));
}