Author: nextgens
Date: 2007-03-31 23:10:43 +0000 (Sat, 31 Mar 2007)
New Revision: 12499
Modified:
trunk/freenet/src/freenet/node/Node.java
trunk/freenet/src/freenet/support/StringArray.java
Log:
Improve the description of the new config. option
Modified: trunk/freenet/src/freenet/node/Node.java
===================================================================
--- trunk/freenet/src/freenet/node/Node.java 2007-03-31 22:26:01 UTC (rev
12498)
+++ trunk/freenet/src/freenet/node/Node.java 2007-03-31 23:10:43 UTC (rev
12499)
@@ -104,6 +104,7 @@
import freenet.support.Logger;
import freenet.support.ShortBuffer;
import freenet.support.SimpleFieldSet;
+import freenet.support.StringArray;
import freenet.support.api.BooleanCallback;
import freenet.support.api.IntCallback;
import freenet.support.api.LongCallback;
@@ -1308,9 +1309,14 @@
disableHangCheckers =
nodeConfig.getBoolean("disableHangCheckers");
- // l10n stuffs
- nodeConfig.register("l10n", "en", sortOrder++, false, true,
"The language the node will use", "This setting ",
+ // l10n stuffs
+ nodeConfig.register("l10n", "en", sortOrder++, false, true,
+ "The language the node will use to display
messages",
+ "This setting will change the language used to
display messages. " +
+ "Choose from " +
StringArray.toString(L10n.availableLanguages) + ". " +
+ "Keep in mind that some strings won't be
translated until next node startup though.",
new StringCallback(){
+
public String get() {
return L10n.getSelectedLanguage();
}
Modified: trunk/freenet/src/freenet/support/StringArray.java
===================================================================
--- trunk/freenet/src/freenet/support/StringArray.java 2007-03-31 22:26:01 UTC
(rev 12498)
+++ trunk/freenet/src/freenet/support/StringArray.java 2007-03-31 23:10:43 UTC
(rev 12499)
@@ -27,6 +27,21 @@
}
/**
+ * This method implements the equivalent of Arrays.valueOf() (java 1.5)
+ * @param array
+ * @return string
+ */
+ public static String toString(String[] array){
+ if((array != null) && (array.length > 0)){
+ StringBuffer sb = new StringBuffer();
+ for(int i=0; i<array.length; i++)
+ sb.append(array[i]+'|');
+ return '[' + sb.substring(0, sb.length() -
1).toString() + ']';
+ }else
+ return "";
+ }
+
+ /**
* This methods returns a String[] from Object[]
* @param array
* @return string[]