forked from I2P_Developers/i2p.i2p
* Specify locale in all toLowerCase() and toUpperCase() calls to
avoid "Turkish four i problem"
This commit is contained in:
@ -5,6 +5,7 @@ import java.io.IOException;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.Properties;
|
||||
import java.util.Set;
|
||||
@ -131,8 +132,8 @@ public class ConfigClientsHandler extends FormHandler {
|
||||
|
||||
// label (IE)
|
||||
String xStart = _("Start");
|
||||
if (_action.toLowerCase().startsWith(xStart + "<span class=hide> ") &&
|
||||
_action.toLowerCase().endsWith("</span>")) {
|
||||
if (_action.toLowerCase(Locale.US).startsWith(xStart + "<span class=hide> ") &&
|
||||
_action.toLowerCase(Locale.US).endsWith("</span>")) {
|
||||
// IE sucks
|
||||
String app = _action.substring(xStart.length() + 18, _action.length() - 7);
|
||||
int appnum = -1;
|
||||
|
@ -305,7 +305,7 @@ public class NetDbRenderer {
|
||||
buf.append("<tr><th align=\"left\">" + _("Country") + "</th><th>" + _("Count") + "</th></tr>\n");
|
||||
for (String country : countryList) {
|
||||
int num = countries.count(country);
|
||||
buf.append("<tr><td><img height=\"11\" width=\"16\" alt=\"").append(country.toUpperCase()).append("\"");
|
||||
buf.append("<tr><td><img height=\"11\" width=\"16\" alt=\"").append(country.toUpperCase(Locale.US)).append("\"");
|
||||
buf.append(" src=\"/flags.jsp?c=").append(country).append("\"> ");
|
||||
buf.append(_(_context.commSystem().getCountryName(country)));
|
||||
buf.append("</td><td align=\"center\">").append(num).append("</td></tr>\n");
|
||||
@ -365,7 +365,7 @@ public class NetDbRenderer {
|
||||
buf.append("<b>" + _("Address(es)") + ":</b> ");
|
||||
String country = _context.commSystem().getCountry(info.getIdentity().getHash());
|
||||
if(country != null) {
|
||||
buf.append("<img height=\"11\" width=\"16\" alt=\"").append(country.toUpperCase()).append('\"');
|
||||
buf.append("<img height=\"11\" width=\"16\" alt=\"").append(country.toUpperCase(Locale.US)).append('\"');
|
||||
buf.append(" title=\"").append(_(_context.commSystem().getCountryName(country))).append('\"');
|
||||
buf.append(" src=\"/flags.jsp?c=").append(country).append("\"> ");
|
||||
}
|
||||
|
Reference in New Issue
Block a user