Fixed auto-uncap of Wifi status messages.

Fixes #1852765. Change strings to lowercase and capitalize on demand.
This commit is contained in:
Amith Yamasani
2009-06-17 11:57:42 -07:00
parent f11d7458ea
commit 2fb22c03bd
2 changed files with 25 additions and 24 deletions

View File

@@ -625,18 +625,18 @@
<!-- Value for the wifi security when it is unknown -->
<string name="wifi_security_unknown">Unknown</string>
<!-- Verbose security type of a wifi network. Open means no security. -->
<string name="wifi_security_verbose_open">Open network</string>
<!-- Verbose security type of a wifi network. -->
<string name="wifi_security_verbose_wep">Secured with WEP</string>
<!-- Verbose security type of a wifi network. -->
<string name="wifi_security_verbose_wpa">Secured with WPA</string>
<!-- Verbose security type of a wifi network. -->
<string name="wifi_security_verbose_wpa2">Secured with WPA2</string>
<!-- Verbose security type of a wifi network. -->
<string name="wifi_security_verbose_wpa_eap">Secured with WPA-EAP</string>
<!-- Verbose security type of a wifi network. -->
<string name="wifi_security_verbose_ieee8021x">Secured with IEEE 802.1x</string>
<!-- Verbose security type of a wifi network. Open means no security. Capitalized by app. -->
<string name="wifi_security_verbose_open">open network</string>
<!-- Verbose security type of a wifi network. Capitalized by app. -->
<string name="wifi_security_verbose_wep">secured with WEP</string>
<!-- Verbose security type of a wifi network. Capitalized by app. -->
<string name="wifi_security_verbose_wpa">secured with WPA</string>
<!-- Verbose security type of a wifi network. Capitalized by app. -->
<string name="wifi_security_verbose_wpa2">secured with WPA2</string>
<!-- Verbose security type of a wifi network. Capitalized by app. -->
<string name="wifi_security_verbose_wpa_eap">secured with WPA-EAP</string>
<!-- Verbose security type of a wifi network. Capitalized by app. -->
<string name="wifi_security_verbose_ieee8021x">secured with IEEE 802.1x</string>
<!-- Wi-Fi IP addrress label -->
<string name="ip_address">IP address</string>
<!-- Label for the signal strength -->
@@ -683,10 +683,10 @@
<string name="wifi_show_password">Show password.</string>
<!--Wi-Fi settings screen menu option -->
<string name="scan_wifi">Scan</string>
<!-- Wifi network summary when not in nearby -->
<!-- Wifi network summary when not in nearby. -->
<string name="summary_not_in_range">Not in range</string>
<!-- Wifi network summary when the network is configured previously -->
<string name="summary_remembered">Remembered</string>
<!-- Wifi network summary when the network is configured previously, capitalized by app -->
<string name="summary_remembered">remembered</string>
<!-- Wifi network summary when there was an error connecting -->
<string name="summary_connection_failed">Connection unsuccessful, select to try again</string>
<!-- Header for the list of wifi networks-->

View File

@@ -816,18 +816,19 @@ public final class AccessPointState implements Comparable<AccessPointState>, Par
}
}
private void buildSummary(StringBuilder sb, String string, boolean autoLowerCaseFirstLetter) {
private void buildSummary(StringBuilder sb, String string, boolean autoUpperCaseFirstLetter) {
if (sb.length() == 0) {
sb.append(string);
} else {
sb.append(", ");
if (autoLowerCaseFirstLetter) {
// Convert first letter to lowercase
sb.append(Character.toLowerCase(string.charAt(0))).append(string, 1,
if (autoUpperCaseFirstLetter && string.length() > 1
&& Character.isLowerCase(string.charAt(0))
&& !Character.isUpperCase(string.charAt(1))) {
sb.append(Character.toUpperCase(string.charAt(0))).append(string, 1,
string.length());
} else {
sb.append(string);
}
} else {
sb.append(", ");
sb.append(string);
}
}