Merge commit '42b2e5ca519766e37ce6941ba4faecc9691cc403' into upstream
[debian/openrocket] / core / src / net / sf / openrocket / gui / dialogs / motor / thrustcurve / ThrustCurveMotorSelectionPanel.java
index 8e6fe5d6d71955114aec1eb5f156fe7440e02c06..7deaaa8f1e5e7e5922e98c74cf1e18f237f98b9c 100644 (file)
@@ -14,6 +14,7 @@ import java.awt.event.MouseEvent;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
+import java.util.Locale;
 import java.util.prefs.Preferences;
 
 import javax.swing.BorderFactory;
@@ -333,7 +334,7 @@ public class ThrustCurveMotorSelectionPanel extends JPanel implements MotorSelec
                                String[] split = text.split("\\s+");
                                ArrayList<String> list = new ArrayList<String>();
                                for (String s : split) {
-                                       s = s.trim().toLowerCase();
+                                       s = s.trim().toLowerCase(Locale.getDefault());
                                        if (s.length() > 0) {
                                                list.add(s);
                                        }
@@ -762,7 +763,7 @@ public class ThrustCurveMotorSelectionPanel extends JPanel implements MotorSelec
                s = s.trim();
                if (s.length() == 0) {
                        //// No description available.
-                       comment.setText("No description available.");
+                       comment.setText(trans.get("TCMotorSelPan.noDescription"));
                        comment.setFont(noCommentFont);
                        comment.setForeground(NO_COMMENT_COLOR);
                } else {
@@ -776,7 +777,7 @@ public class ThrustCurveMotorSelectionPanel extends JPanel implements MotorSelec
        private void scrollSelectionVisible() {
                if (selectedMotorSet != null) {
                        int index = table.convertRowIndexToView(model.getIndex(selectedMotorSet));
-                       System.out.println("index=" + index);
+                       //System.out.println("index=" + index);
                        table.getSelectionModel().setSelectionInterval(index, index);
                        Rectangle rect = table.getCellRect(index, 0, true);
                        rect = new Rectangle(rect.x, rect.y - 100, rect.width, rect.height + 200);
@@ -943,7 +944,7 @@ public class ThrustCurveMotorSelectionPanel extends JPanel implements MotorSelec
                public boolean filterByString(ThrustCurveMotorSet m) {
                        main: for (String s : searchTerms) {
                                for (ThrustCurveMotorColumns col : ThrustCurveMotorColumns.values()) {
-                                       String str = col.getValue(m).toString().toLowerCase();
+                                       String str = col.getValue(m).toString().toLowerCase(Locale.getDefault());
                                        if (str.indexOf(s) >= 0)
                                                continue main;
                                }