* Added to all toUpperCase/toLowerCase calls the Locale.ENGLISH to prevent problems with some languages (e.g. Turkish). Removed some unused import statements. (#4634).

This commit is contained in:
LevelX2 2018-03-18 18:18:54 +01:00
parent 03ebdc17d8
commit b073ce1c42
147 changed files with 1419 additions and 1496 deletions

View file

@ -24,15 +24,14 @@
* The views and conclusions contained in the software and documentation are those of the
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com.
*/
*/
package mage.client.dialog;
import java.util.Locale;
import javax.swing.*;
import mage.client.SessionHandler;
import org.apache.log4j.Logger;
import javax.swing.*;
/**
* Feedback dialog.
*
@ -47,17 +46,19 @@ public class FeedbackDialog extends javax.swing.JDialog {
"Thank you or \"Devs, you are so cool!\"",
"Question or \"I'm so curious about\""};
/** Creates new form PreferencesDialog */
/**
* Creates new form PreferencesDialog
*/
public FeedbackDialog(java.awt.Frame parent, boolean modal) {
super(parent, modal);
initComponents();
cbFeedbackType.setModel(new DefaultComboBoxModel(feedbackTypes));
}
/** This method is called from within the constructor to
* initialize the form.
* WARNING: Do NOT modify this code. The content of this method is
* always regenerated by the Form Editor.
/**
* This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always
* regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
@ -259,16 +260,16 @@ public class FeedbackDialog extends javax.swing.JDialog {
if (type == null || type.isEmpty()) {
return "";
}
if (type.toLowerCase().startsWith("bug")) {
if (type.toLowerCase(Locale.ENGLISH).startsWith("bug")) {
return "bug";
}
if (type.toLowerCase().startsWith("feature")) {
if (type.toLowerCase(Locale.ENGLISH).startsWith("feature")) {
return "feature";
}
if (type.toLowerCase().startsWith("thank")) {
if (type.toLowerCase(Locale.ENGLISH).startsWith("thank")) {
return "thank";
}
if (type.toLowerCase().startsWith("question")) {
if (type.toLowerCase(Locale.ENGLISH).startsWith("question")) {
return "question";
}
return "";