* Checklist updates

* Console:
   - Don't reset graph settings when clicking restart or shutdown on graphs page
   - Don't recommend guest login on trac, it's disabled
   - Catch and remove corrupt jrb file (ticket #1186)
   - Always set default language on /configui
 * Readme: Update links
 * Transports: Reduce target connection count again to reduce
               tunnel reject rate further
This commit is contained in:
zzz
2014-02-10 14:22:43 +00:00
parent f6d9a6917f
commit a2ba9bbdb1
12 changed files with 62 additions and 17 deletions

View File

@@ -103,11 +103,33 @@ public class ConfigUIHelper extends HelperBase {
/** todo sort by translated string */
public String getLangSettings() {
StringBuilder buf = new StringBuilder(512);
String current = Messages.getLanguage(_context);
String clang = Messages.getLanguage(_context);
String current = clang;
String country = Messages.getCountry(_context);
if (country != null && country.length() > 0)
current += '_' + country;
// find best match
boolean found = false;
for (int i = 0; i < langs.length; i++) {
if (langs[i][0].equals(current)) {
found = true;
break;
}
}
if (!found) {
if (country != null && country.length() > 0) {
current = clang;
for (int i = 0; i < langs.length; i++) {
if (langs[i][0].equals(current)) {
found = true;
break;
}
}
}
if (!found)
current = "en";
}
StringBuilder buf = new StringBuilder(512);
for (int i = 0; i < langs.length; i++) {
// we use "lang" so it is set automagically in CSSHelper
buf.append("<input type=\"radio\" class=\"optbox\" name=\"lang\" ");