Author: toad
Date: 2007-12-06 15:58:37 +0000 (Thu, 06 Dec 2007)
New Revision: 16362

Modified:
   trunk/freenet/src/freenet/l10n/freenet.l10n.en.properties
   trunk/freenet/src/freenet/node/Node.java
Log:
Localise the warnings

Modified: trunk/freenet/src/freenet/l10n/freenet.l10n.en.properties
===================================================================
--- trunk/freenet/src/freenet/l10n/freenet.l10n.en.properties   2007-12-06 
15:52:37 UTC (rev 16361)
+++ trunk/freenet/src/freenet/l10n/freenet.l10n.en.properties   2007-12-06 
15:58:37 UTC (rev 16362)
@@ -584,6 +584,10 @@
 Node.nodeDirLong=Name of directory to put node-related files e.g. peers list in
 Node.nodeName=Nickname for this Freenet node
 Node.nodeNameLong=Node nickname. This will be visible to your friends only.
+Node.notUsingSunVMTitle=Not using a Sun JVM
+Node.notUsingSunVM=You are trying to run the node under a non-Sun JVM 
${vendor} ${version}. This is not recommended: the node may not run well. 
Please get Sun java from http://java.sun.com/ if possible.
+Node.notUsingWrapperTitle=Not using the wrapper!
+Node.notUsingWrapper=You are running the node without the wrapper. This is not 
recommended. The node will not be able to restart itself, so auto-updating 
won't work, and if the JVM goes off into limbo, it won't get restarted either. 
Also the node can't generate stack dumps in some places so debugging will be 
marginally harder.
 Node.oneConnectionPerIP=Limit to one connection per address?
 Node.oneConnectionPerIPLong=Don't allow more than one connection per address? 
This will make it slightly harder for an attacker to connect more than once to 
your node as different identities, in order to dominate your routing or make 
harvesting easier. Also prevents having the same node connected on darknet and 
opennet simultaneously. 
 Node.opennetEnabled=Enable promiscuous mode (automatically connect to 
untrusted nodes)?

Modified: trunk/freenet/src/freenet/node/Node.java
===================================================================
--- trunk/freenet/src/freenet/node/Node.java    2007-12-06 15:52:37 UTC (rev 
16361)
+++ trunk/freenet/src/freenet/node/Node.java    2007-12-06 15:58:37 UTC (rev 
16362)
@@ -1550,13 +1550,11 @@
                        }

                } else {
-                       // FIXME l10n
-                       clientCore.alerts.register(new SimpleUserAlert(true, 
"Not using a Sun JVM", "You are trying to run the node under a non-Sun JVM 
("+jvmVendor+" "+jvmVersion+"). This is not recommended: the node may not run 
well. Please get Sun java from http://java.sun.com/ if possible.", 
UserAlert.WARNING));
+                       clientCore.alerts.register(new SimpleUserAlert(true, 
l10n("notUsingSunVMTitle"), l10n("notUsingSunVM", new String[] { "vendor", 
"version" }, new String[] { jvmVendor, jvmVersion }), UserAlert.WARNING));
                }

                if(!isUsingWrapper()) {
-                       // FIXME l10n
-                       clientCore.alerts.register(new SimpleUserAlert(true, 
"Not using the wrapper!", "You are running the node without the wrapper. This 
is not recommended. The node will not be able to restart itself, so 
auto-updating won't work, and if the JVM goes off into limbo, it won't get 
restarted either. Also the node can't generate stack dumps in some places.", 
UserAlert.WARNING));
+                       clientCore.alerts.register(new SimpleUserAlert(true, 
l10n("notUsingWrapperTitle"), l10n("notUsingWrapper"), UserAlert.WARNING));
                }

        }
@@ -1569,6 +1567,10 @@
                return L10n.getString("Node."+key, pattern, value);
        }

+       private String l10n(String key, String[] pattern, String[] value) {
+               return L10n.getString("Node."+key, pattern, value);
+       }
+
        /**
         * Export volatile data about the node as a SimpleFieldSet
         */


Reply via email to