forked from External/mage
* 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:
parent
03ebdc17d8
commit
b073ce1c42
147 changed files with 1419 additions and 1496 deletions
|
|
@ -37,7 +37,6 @@ import java.awt.Dimension;
|
|||
import java.awt.Point;
|
||||
import java.beans.PropertyVetoException;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
import javax.swing.ImageIcon;
|
||||
|
|
|
|||
|
|
@ -51,11 +51,9 @@ import java.net.URL;
|
|||
import java.net.UnknownHostException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.CancellationException;
|
||||
import java.util.concurrent.ExecutionException;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
|
@ -723,14 +721,14 @@ public class ConnectDialog extends MageDialog {
|
|||
|
||||
}//GEN-LAST:event_btnFind2findPublicServerActionPerformed
|
||||
|
||||
private void connectXmageus(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_connecXmageusW
|
||||
private void connectXmageus(java.awt.event.ActionEvent evt) {
|
||||
String serverAddress = "xmage.us";
|
||||
this.txtServer.setText(serverAddress);
|
||||
this.txtPort.setText("17171");
|
||||
// Update userName and password according to the chosen server.
|
||||
this.txtUserName.setText(MagePreferences.getUserName(serverAddress));
|
||||
this.txtPassword.setText(MagePreferences.getPassword(serverAddress));
|
||||
}//GEN-LAST:event_connectXmageus
|
||||
}
|
||||
|
||||
private void btnFlagSearchActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnFlagSearchActionPerformed
|
||||
doFastFlagSearch();
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<?xml version="1.1" encoding="UTF-8" ?>
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
|
||||
<Form version="1.3" maxVersion="1.7" type="org.netbeans.modules.form.forminfo.JDialogFormInfo">
|
||||
<Properties>
|
||||
|
|
@ -7,6 +7,7 @@
|
|||
</Properties>
|
||||
<SyntheticProperties>
|
||||
<SyntheticProperty name="formSizePolicy" type="int" value="1"/>
|
||||
<SyntheticProperty name="generateCenter" type="boolean" value="false"/>
|
||||
</SyntheticProperties>
|
||||
<AuxValues>
|
||||
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
|
||||
|
|
|
|||
|
|
@ -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 "";
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@ import java.util.ArrayList;
|
|||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.UUID;
|
||||
import javax.swing.*;
|
||||
import javax.swing.filechooser.FileFilter;
|
||||
|
|
@ -1264,7 +1265,7 @@ class DeckFilter extends FileFilter {
|
|||
int i = s.lastIndexOf('.');
|
||||
|
||||
if (i > 0 && i < s.length() - 1) {
|
||||
ext = s.substring(i + 1).toLowerCase();
|
||||
ext = s.substring(i + 1).toLowerCase(Locale.ENGLISH);
|
||||
}
|
||||
return (ext == null) ? false : ext.equals("dck");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -210,11 +210,11 @@ public class PickChoiceDialog extends MageDialog {
|
|||
// load data to datamodel after filter or on startup
|
||||
String filter = choice.getSearchText();
|
||||
if (filter == null){ filter = ""; }
|
||||
filter = filter.toLowerCase();
|
||||
filter = filter.toLowerCase(Locale.ENGLISH);
|
||||
|
||||
this.dataModel.clear();
|
||||
for(KeyValueItem item: this.allItems){
|
||||
if(!choice.isSearchEnabled() || item.Value.toLowerCase().contains(filter)){
|
||||
if(!choice.isSearchEnabled() || item.Value.toLowerCase(Locale.ENGLISH).contains(filter)){
|
||||
this.dataModel.addElement(item);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,8 +35,6 @@
|
|||
package mage.client.dialog;
|
||||
|
||||
import java.awt.Point;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.KeyAdapter;
|
||||
import java.awt.event.KeyEvent;
|
||||
import java.awt.event.KeyListener;
|
||||
import javax.swing.*;
|
||||
|
|
|
|||
|
|
@ -45,6 +45,7 @@ import java.io.File;
|
|||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.prefs.BackingStoreException;
|
||||
import java.util.prefs.Preferences;
|
||||
|
|
@ -3492,7 +3493,7 @@ public class PreferencesDialog extends javax.swing.JDialog {
|
|||
}
|
||||
|
||||
private static void loadProxySettings(Preferences prefs) {
|
||||
dialog.cbProxyType.setSelectedItem(Connection.ProxyType.valueOf(MageFrame.getPreferences().get(KEY_PROXY_TYPE, "NONE").toUpperCase()));
|
||||
dialog.cbProxyType.setSelectedItem(Connection.ProxyType.valueOf(MageFrame.getPreferences().get(KEY_PROXY_TYPE, "NONE").toUpperCase(Locale.ENGLISH)));
|
||||
|
||||
load(prefs, dialog.txtProxyServer, KEY_PROXY_ADDRESS, Config.serverName);
|
||||
load(prefs, dialog.txtProxyPort, KEY_PROXY_PORT, Integer.toString(Config.port));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue