I18 changes
[debian/openrocket] / src / net / sf / openrocket / gui / dialogs / motor / thrustcurve / ThrustCurveMotorSelectionPanel.java
index 359c485b4f7f1b188b36a2fecd67119f73d84041..ca0fb811de48ab835f136e69a281f62d545f44af 100644 (file)
@@ -81,9 +81,12 @@ public class ThrustCurveMotorSelectionPanel extends JPanel implements MotorSelec
        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;
        
@@ -194,7 +197,7 @@ public class ThrustCurveMotorSelectionPanel extends JPanel implements MotorSelec
 
                // 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
@@ -229,7 +232,7 @@ public class ThrustCurveMotorSelectionPanel extends JPanel implements MotorSelec
                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() {
@@ -295,7 +298,7 @@ public class ThrustCurveMotorSelectionPanel extends JPanel implements MotorSelec
 
                // 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");
                
@@ -303,7 +306,7 @@ public class ThrustCurveMotorSelectionPanel extends JPanel implements MotorSelec
 
                // Search field
                //// Search:
-               label = new StyledLabel("Search:");
+               label = new StyledLabel(trans.get("TCMotorSelPan.lbl.Search"));
                panel.add(label, "");
                
                searchField = new JTextField();
@@ -351,7 +354,7 @@ public class ThrustCurveMotorSelectionPanel extends JPanel implements MotorSelec
 
                // 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();
@@ -373,7 +376,7 @@ public class ThrustCurveMotorSelectionPanel extends JPanel implements MotorSelec
 
 
                // 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);
@@ -382,7 +385,8 @@ public class ThrustCurveMotorSelectionPanel extends JPanel implements MotorSelec
                        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 {
@@ -395,7 +399,7 @@ public class ThrustCurveMotorSelectionPanel extends JPanel implements MotorSelec
                });
                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);
                
 
@@ -405,43 +409,43 @@ public class ThrustCurveMotorSelectionPanel extends JPanel implements MotorSelec
 
                // 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 {
@@ -482,7 +486,7 @@ public class ThrustCurveMotorSelectionPanel extends JPanel implements MotorSelec
                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);
@@ -697,7 +701,7 @@ public class ThrustCurveMotorSelectionPanel extends JPanel implements MotorSelec
                        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();
                        
@@ -745,6 +749,7 @@ public class ThrustCurveMotorSelectionPanel extends JPanel implements MotorSelec
        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);
@@ -832,7 +837,8 @@ public class ThrustCurveMotorSelectionPanel extends JPanel implements MotorSelec
        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 {
@@ -842,7 +848,8 @@ public class ThrustCurveMotorSelectionPanel extends JPanel implements MotorSelec
                        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));
                        
@@ -858,7 +865,8 @@ public class ThrustCurveMotorSelectionPanel extends JPanel implements MotorSelec
                                }
                                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");
                                }
@@ -866,7 +874,8 @@ public class ThrustCurveMotorSelectionPanel extends JPanel implements MotorSelec
                        } else {
                                
                                selectedDelay = currentDelay;
-                               delayBox.setSelectedItem(ThrustCurveMotor.getDelayString(currentDelay, "None"));
+                       //// None
+                               delayBox.setSelectedItem(ThrustCurveMotor.getDelayString(currentDelay, trans.get("TCMotorSelPan.delayBox.None")));
                                
                        }