Author: toad
Date: 2007-05-09 18:24:47 +0000 (Wed, 09 May 2007)
New Revision: 13175
Modified:
trunk/freenet/src/freenet/l10n/freenet.l10n.en.properties
trunk/freenet/src/freenet/node/useralerts/N2NTMUserAlert.java
trunk/freenet/src/freenet/node/useralerts/PeerManagerUserAlert.java
trunk/freenet/src/freenet/node/useralerts/RevocationKeyFoundUserAlert.java
trunk/freenet/src/freenet/node/useralerts/SimpleHTMLUserAlert.java
trunk/freenet/src/freenet/node/useralerts/SimpleUserAlert.java
Log:
Some more useralert keys
Modified: trunk/freenet/src/freenet/l10n/freenet.l10n.en.properties
===================================================================
--- trunk/freenet/src/freenet/l10n/freenet.l10n.en.properties 2007-05-09
17:55:56 UTC (rev 13174)
+++ trunk/freenet/src/freenet/l10n/freenet.l10n.en.properties 2007-05-09
18:24:47 UTC (rev 13175)
@@ -743,4 +743,29 @@
N2NTMUserAlert.header=From: ${from} (composed ${composed} | sent ${sent} |
received ${received})
N2NTMUserAlert.reply=Reply
N2NTMUserAlert.delete=Delete
-End
+PeerManagerUserAlert.noPeersTitle=No peers found
+PeerManagerUserAlert.noConnsTitle=No open connections
+PeerManagerUserAlert.onlyFewConnsTitle=Only ${count} open connection(s)
+PeerManagerUserAlert.tooManyNeverConnectedTitle=Many peers have not connected
once yet
+PeerManagerUserAlert.tooManyDisconnectedTitle=Too many disconnected peers
+PeerManagerUserAlert.tooManyConnsTitle=Too many open connections
+PeerManagerUserAlert.tooManyPeersTitle=Too many peers
+PeerManagerUserAlert.tooHighBwlimitDelayTimeTitle=bwlimitDelayTime too high
+PeerManagerUserAlert.tooHighPingTimeTitle=nodeAveragePingTime too high
+PeerManagerUserAlert.tooOldNeverConnectedPeersTitle=Never connected peer(s)
too old
+PeerManagerUserAlert.noPeersTestnet=This node has no peers to connect to,
therefore it will not be able to function normally. Ideally you should connect
to peers run by people you know (if you are paranoid, then people you trust; if
not, then at least people you've talked to). You need at least 3 connected
peers at all times, and ideally 5-10. But since this is a testnet node, we
suggest that you log on to irc.freenode.net channel #freenet-refs and ask
around for somebody to connect to.
+PeerManagerUserAlert.noPeersDarknet=This node has no peers to connect to,
therefore it will not be able to function normally. Ideally you should connect
to peers run by people you know (if you are paranoid, then people you trust; if
not, then at least people you've talked to). You need at least 3 connected
peers at all times, and ideally 5-10. You could log on to irc.freenode.net
channel #freenet-refs and ask around for somebody to connect to, but remember
that you are vulnerable to those you are directly connected to. (This is
especially true in this early alpha of Freenet 0.7...) BE SURE THAT THE OTHER
PERSON HAS ADDED YOUR REFERENCE, TOO, AS ONE-WAY CONNECTIONS WON'T WORK!
+PeerManagerUserAlert.noConns=This node has not been able to connect to any
other nodes so far; it will not be able to function normally. Hopefully some of
your peers will connect soon; if not, try to get some more peers. You need at
least 3 peers at any time, and should aim for 5-10.
+PeerManagerUserAlert.oneConn=This node only has one connection. Performance
will be impaired, and you have no anonymity nor even plausible deniability if
that one person is malicious. Your node is attached to the network like a
"leaf" and does not contribute to the network's health. Try to get at least 3
(ideally more like 5-10) connected peers at any given time.
+PeerManagerUserAlert.twoConns=This node has only two connections. Performance
and security will not be very good, and your node is not doing any routing for
other nodes. Your node is embedded like a 'chain' in the network and does not
contribute (much) to the network's health. Try to get at least 3 (ideally more
like 5-10) connected peers at any given time.
+PeerManagerUserAlert.tooManyNeverConnected=Many of this node's peers have
never connected even once: ${count}. You should not add peers unless you know
that they have also added your reference. Otherwise they will not connect.
+PeerManagerUserAlert.tooManyNeverConnectedWithLink=Many of this node's peers
have never connected even once: ${count}. You should not add peers unless you
know that they have also added ${link}your reference${/link}. Otherwise they
will not connect.
+PeerManagerUserAlert.tooManyDisconnected=This node has too many disconnected
peers (${count} > ${max}). This will have a slight impact on your performance
as disconnected peers also consume a small amount of bandwidth and CPU.
Consider "cleaning up" your peer list. Note that ideally you should connect to
nodes run by people you know. Even if not, adding lots of nodes automatically
is bad as it does not produce an optimal topology.
+PeerManagerUserAlert.tooManyConns=This node has too many connections (${count}
> ${max}). Adding large numbers of nodes automatically does not produce a
small-world topology, hurts routing, and risks producing single points of
failure.
+PeerManagerUserAlert.tooManyPeers=This node has too many peers (${count} >
${max}). We do not recommend running ubernodes with automated addition of
peers; this does not produce a small world network topology. This will also
marginally impact your performance as disconnected peers consume a small amount
of bandwidth and CPU. Consider "cleaning up" your peer list.
+PeerManagerUserAlert.tooHighBwlimitDelayTime=This node has to wait too long
for available bandwidth (${delay}ms > ${max}ms). Increase your output bandwidth
limit and/or remove some peers to improve the situation.
+PeerManagerUserAlert.tooHighPingTime=This node is having trouble talking with
its peers quickly enough (${ping}ms > ${max}ms). Increase your output bandwidth
limit and/or remove some peers to improve the situation.
+PeerManagerUserAlert.tooOldNeverConnectedPeers=One or more of your node's
peers have never connected in the two weeks since they were added. Consider
removing them since they are marginally affecting performance (wasting packets
talking to nodes that aren't there).
+RevocationKeyFoundUserAlert.title=The private key of the project has been
compromized!
+RevocationKeyFoundUserAlert.text=Your node has found the auto-updater's
revocation key on the network. It means that our auto-updating system is likely
to have been COMPROMIZED! Consequently, it has been disabled on your node to
prevent "bad things" to be installed. We strongly advise you to check the
project's website for updates. Please take care of verifying that the website
hasn't been spoofed either. The revocation message is the following :
${message}.
+End
\ No newline at end of file
Modified: trunk/freenet/src/freenet/node/useralerts/N2NTMUserAlert.java
===================================================================
--- trunk/freenet/src/freenet/node/useralerts/N2NTMUserAlert.java
2007-05-09 17:55:56 UTC (rev 13174)
+++ trunk/freenet/src/freenet/node/useralerts/N2NTMUserAlert.java
2007-05-09 18:24:47 UTC (rev 13175)
@@ -8,7 +8,6 @@
import freenet.l10n.L10n;
import freenet.node.PeerNode;
-import freenet.support.HTMLEncoder;
import freenet.support.HTMLNode;
// Node To Node Text Message User Alert
Modified: trunk/freenet/src/freenet/node/useralerts/PeerManagerUserAlert.java
===================================================================
--- trunk/freenet/src/freenet/node/useralerts/PeerManagerUserAlert.java
2007-05-09 17:55:56 UTC (rev 13174)
+++ trunk/freenet/src/freenet/node/useralerts/PeerManagerUserAlert.java
2007-05-09 18:24:47 UTC (rev 13175)
@@ -3,6 +3,7 @@
* http://www.gnu.org/ for further details of the GPL. */
package freenet.node.useralerts;
+import freenet.l10n.L10n;
import freenet.node.NodeStats;
import freenet.support.HTMLNode;
@@ -45,126 +46,74 @@
public String getTitle() {
if(peers == 0)
- return "No peers found";
+ return l10n("noPeersTitle");
if(conns == 0)
- return "No open connections";
- if(conns < MIN_CONN_ALERT_THRESHOLD) {
- String suff = "";
- if (conns > 1) suff = "s";
- return "Only "+conns+" open connection"+suff;
- }
+ return l10n("noConnsTitle");
+ if(conns < MIN_CONN_ALERT_THRESHOLD)
+ return l10n("onlyFewConnsTitle", "count",
Integer.toString(conns));
if(neverConn > MAX_NEVER_CONNECTED_PEER_ALERT_THRESHOLD)
- return "Many peers have not connected once yet";
+ return l10n("tooManyNeverConnectedTitle");
if((peers - conns) > MAX_DISCONN_PEER_ALERT_THRESHOLD)
- return "Too many disconnected peers";
+ return l10n("tooManyDisconnectedTitle");
if(conns > MAX_CONN_ALERT_THRESHOLD)
- return "Too many open connections";
+ return l10n("tooManyConnsTitle");
if(peers > MAX_PEER_ALERT_THRESHOLD)
- return "Too many peers";
+ return l10n("tooManyPeersTitle");
if(n.bwlimitDelayAlertRelevant && (bwlimitDelayTime >
NodeStats.MAX_BWLIMIT_DELAY_TIME_ALERT_THRESHOLD))
- return "bwlimitDelayTime too high";
+ return l10n("tooHighBwlimitDelayTimeTitle");
if(n.nodeAveragePingAlertRelevant && (nodeAveragePingTime >
NodeStats.MAX_NODE_AVERAGE_PING_TIME_ALERT_THRESHOLD))
- return "nodeAveragePingTime too high";
+ return l10n("tooHighPingTimeTitle");
if(oldestNeverConnectedPeerAge >
MAX_OLDEST_NEVER_CONNECTED_PEER_AGE_ALERT_THRESHOLD)
- return "Never connected peer(s) too old";
+ return l10n("tooOldNeverConnectedPeersTitle");
else throw new IllegalArgumentException("Not valid");
}
- static final String NO_PEERS_START =
- "This node has no peers to connect to, therefore it will not " +
- "be able to function normally. Ideally you should connect to
peers run by people you know " +
- "(if you are paranoid, then people you trust; if not, then at
least people you've talked to). " +
- "You need at least 3 connected peers at all times, and ideally
5-10.";
- static final String NO_PEERS_LOG_ONTO_IRC =
- " log on to irc.freenode.net channel #freenet-refs and ask
around for somebody to connect to";
- static final String NO_PEERS_TESTNET = NO_PEERS_START +
- ", but since this is a testnet node, we suggest that you " +
NO_PEERS_LOG_ONTO_IRC + '.';
- static final String NO_PEERS_DARKNET = NO_PEERS_START +
- ". You could " + NO_PEERS_LOG_ONTO_IRC + ", but remember that
you are vulnerable to " +
- "those you are directly connected to. (This is especially true
in this early alpha of Freenet 0.7...)\n" +
- "BE SURE THAT THE OTHER PERSON HAS ADDED YOUR REFERENCE, TOO,
AS ONE-WAY CONNECTIONS WON'T WORK!";
-
- static final String NO_CONNS =
- "This node has not been able to connect to any other nodes so
far; it will not be able to function normally. " +
- "Hopefully some of your peers will connect soon; if not, try to
get some more peers. You need at least 3 peers at any time, and should aim for
5-10.";
-
- static final String ONE_CONN =
- "This node only has one connection. Performance will be
impaired, and you have no anonymity nor even plausible deniability if that one
person is malicious. " +
- "Your node is attached to the network like a \u201cleaf\u201d
and does not contribute to the network's health. " +
- "Try to get at least 3 (ideally more like 5-10) connected peers
at any given time.";
-
- static final String TWO_CONNS =
- "This node has only two connections. Performance and security
will not be very good, and your node is not doing any routing for other nodes.
" +
- "Your node is embedded like a 'chain' in the network and does
not contribute (much) to the network's health. " +
- "Try to get at least 3 (ideally more like 5-10) connected peers
at any given time.";
-
- static final String NEVER_CONN_START =
- "Many of this node's peers have never connected even once:
{NEVER_CONN}. You should not add peers unless you know that they have also
added ";
- static final String NEVER_CONN_END = ". Otherwise they will not
connect. " +
- "Also please note that adding large numbers of connections
automatically is discouraged as it does not produce a small-world network, and
therefore hurts routing.";
- static final String NEVER_CONN_MIDDLE_TEXT = "your reference";
- static final HTMLNode NEVER_CONN_MIDDLE_NODE() {
- return new HTMLNode("a", "href", "/darknet/myref.fref", "your
reference");
+ private String l10n(String key, String pattern, String value) {
+ return L10n.getString("PeerManagerUserAlert."+key, pattern,
value);
}
-
- static final String NEVER_CONN_TEXT =
- NEVER_CONN_START + NEVER_CONN_MIDDLE_TEXT + NEVER_CONN_END;
-// static final HTMLNode NEVER_CONN_MIDDLE_NODE =
-// new HTMLNode()
-// "<a href=\"/darknet/myref.txt\">your reference</a>
-
- static final String DISCONNECTED =
- "This node has too many disconnected peers ({DISCONNECTED} >
"+MAX_DISCONN_PEER_ALERT_THRESHOLD+
- "). This will have a slight impact on your performance as
disconnected peers also consume a small amount of bandwidth and CPU. Consider
\"cleaning up\" your peer list. " +
- "Note that ideally you should connect to nodes run by people
you know. Even if not, adding lots of nodes automatically is bad as it does not
produce an optimal topology.";
-
- static final String TOO_MANY_CONNECTIONS =
- "This node has too many connections ({CONNS} >
"+MAX_CONN_ALERT_THRESHOLD+"). Adding large numbers of nodes automatically does
not produce a small-world topology, hurts routing, and risks producing single
points of failure.";
-
- static final String TOO_MANY_PEERS =
- "This node has too many peers ({PEERS} >
"+MAX_PEER_ALERT_THRESHOLD+"). We do not recommend running ubernodes with
automated addition of peers; this does not produce a small world network
topology." +
- "This will also marginally impact your performance as all peers
(connected or not) consume a small amount of bandwidth and CPU. Consider
\"cleaning up\" your peer list.";
-
- static final String TOO_HIGH_BWLIMITDELAYTIME =
- "This node has to wait too long for available bandwidth
({BWLIMIT_DELAY_TIME} > "+NodeStats.MAX_BWLIMIT_DELAY_TIME_ALERT_THRESHOLD+").
Increase your output bandwidth limit and/or remove some peers to improve the
situation.";
-
- static final String TOO_HIGH_PING =
- "This node is having trouble talking with its peers quickly
enough ({PING_TIME} > "+
- NodeStats.MAX_NODE_AVERAGE_PING_TIME_ALERT_THRESHOLD+").
Increase your output bandwidth limit and/or remove some peers to improve the
situation.";
- static final String NEVER_CONNECTED_TWO_WEEKS =
- "One or more of your node's peers have never connected in the
two weeks since they were added. Consider removing them since they are
marginally affecting performance.";
-
+ private String l10n(String key, String[] pattern, String[] value) {
+ return L10n.getString("PeerManagerUserAlert."+key, pattern,
value);
+ }
+
+ private String l10n(String key) {
+ return L10n.getString("PeerManagerUserAlert."+key);
+ }
+
public String getText() {
String s;
int disconnected = peers - conns;
if(peers == 0) {
if(n.isTestnetEnabled())
- return NO_PEERS_TESTNET;
+ return l10n("noPeersTestnet");
else
- return NO_PEERS_DARKNET;
+ return l10n("noPeersDarknet");
} else if(conns == 0) {
- return NO_CONNS;
+ return l10n("noConns");
} else if(conns == 1) {
- return ONE_CONN;
+ return l10n("oneConn");
} else if(conns == 2) {
- return TWO_CONNS;
+ return l10n("twoConns");
} else if(neverConn > MAX_NEVER_CONNECTED_PEER_ALERT_THRESHOLD)
{
- s = replace(NEVER_CONN_TEXT, "\\{NEVER_CONN\\}",
Integer.toString(neverConn));
+ s = l10n("tooManyNeverConnected", "count",
Integer.toString(neverConn));
} else if((peers - conns) > MAX_DISCONN_PEER_ALERT_THRESHOLD){
- s = replace(DISCONNECTED, "\\{DISCONNECTED\\}",
Integer.toString(disconnected));
+ s = l10n("tooManyDisconnected", new String[] { "count",
"max" },
+ new String[] {
Integer.toString(disconnected),
Integer.toString(MAX_DISCONN_PEER_ALERT_THRESHOLD)});
} else if(conns > MAX_CONN_ALERT_THRESHOLD) {
- s = replace(TOO_MANY_CONNECTIONS, "\\{CONNS\\}",
Integer.toString(conns));
+ s = l10n("tooManyConns", new String[] { "count", "max"
},
+ new String[] { Integer.toString(conns),
Integer.toString(MAX_CONN_ALERT_THRESHOLD)});
} else if(peers > MAX_PEER_ALERT_THRESHOLD) {
- s = replace(TOO_MANY_PEERS, "\\{PEERS\\}",
Integer.toString(peers));
+ s = l10n("tooManyPeers", new String[] { "count", "max"
},
+ new String[] { Integer.toString(peers),
Integer.toString(MAX_PEER_ALERT_THRESHOLD)});
} else if(n.bwlimitDelayAlertRelevant && (bwlimitDelayTime >
NodeStats.MAX_BWLIMIT_DELAY_TIME_ALERT_THRESHOLD)) {
- s = replace(TOO_HIGH_BWLIMITDELAYTIME,
"\\{BWLIMIT_DELAY_TIME\\}", Integer.toString(bwlimitDelayTime));
-
+ s = l10n("tooHighBwlimitDelayTime", new String[] {
"delay", "max" },
+ new String[] {
Integer.toString(bwlimitDelayTime),
Long.toString(NodeStats.MAX_BWLIMIT_DELAY_TIME_ALERT_THRESHOLD)});
// FIXME I'm not convinced about the next one!
} else if(n.nodeAveragePingAlertRelevant &&
(nodeAveragePingTime > NodeStats.MAX_NODE_AVERAGE_PING_TIME_ALERT_THRESHOLD)) {
- s = replace(TOO_HIGH_PING, "\\{PING_TIME\\}",
Integer.toString(nodeAveragePingTime));
+ s = l10n("tooHighPingTime", new String[] { "ping",
"max" },
+ new String[] {
Integer.toString(nodeAveragePingTime),
Long.toString(NodeStats.MAX_NODE_AVERAGE_PING_TIME_ALERT_THRESHOLD) });
} else if(oldestNeverConnectedPeerAge >
MAX_OLDEST_NEVER_CONNECTED_PEER_AGE_ALERT_THRESHOLD) {
- s = NEVER_CONNECTED_TWO_WEEKS;
+ return l10n("tooOldNeverConnectedPeers");
} else throw new IllegalArgumentException("Not valid");
return s;
}
@@ -198,31 +147,35 @@
int disconnected = peers - conns;
if (peers == 0) {
if(n.isTestnetEnabled())
- alertNode.addChild("#", NO_PEERS_TESTNET);
+ alertNode.addChild("#", l10n("noPeersTestnet"));
else
- alertNode.addChild("#", NO_PEERS_DARKNET);
+ alertNode.addChild("#",
l10n("noPeersDarknet"));
} else if (conns == 0) {
- alertNode.addChild("#", NO_CONNS);
+ alertNode.addChild("#", l10n("noConns"));
} else if (conns == 1) {
- alertNode.addChild("#", ONE_CONN);
+ alertNode.addChild("#", l10n("oneConn"));
} else if (conns == 2) {
- alertNode.addChild("#", TWO_CONNS);
+ alertNode.addChild("#", l10n("twoConns"));
} else if (neverConn >
MAX_NEVER_CONNECTED_PEER_ALERT_THRESHOLD) {
- alertNode.addChild("#", replace(NEVER_CONN_START,
"\\{NEVER_CONN\\}", Integer.toString(neverConn)));
- alertNode.addChild(NEVER_CONN_MIDDLE_NODE());
- alertNode.addChild("#", replace(NEVER_CONN_END,
"\\{NEVER_CONN\\}", Integer.toString(neverConn)));
+ L10n.addL10nSubstitution(alertNode,
"tooManyNeverConnectedWithLink",
+ new String[] { "link", "/link", "count"
},
+ new String[] { "<a
href=\"/darknet/myref.fref\">", "</a>", Integer.toString(neverConn) });
} else if ((peers - conns) > MAX_DISCONN_PEER_ALERT_THRESHOLD) {
- alertNode.addChild("#", replace(DISCONNECTED,
"\\{DISCONNECTED\\}", Integer.toString(disconnected)));
+ alertNode.addChild("#", l10n("tooManyDisconnected", new
String[] { "count", "max" }, new String[] { Integer.toString(disconnected),
Integer.toString(MAX_DISCONN_PEER_ALERT_THRESHOLD)}));
} else if (conns > MAX_CONN_ALERT_THRESHOLD) {
- alertNode.addChild("#", replace(TOO_MANY_CONNECTIONS,
"\\{CONNS\\}", Integer.toString(conns)));
+ alertNode.addChild("#", l10n("tooManyConns", new
String[] { "count", "max" },
+ new String[] { Integer.toString(conns),
Integer.toString(MAX_CONN_ALERT_THRESHOLD)}));
} else if (peers > MAX_PEER_ALERT_THRESHOLD) {
- alertNode.addChild("#", replace(TOO_MANY_PEERS,
"\\{PEERS\\}", Integer.toString(peers)));
+ alertNode.addChild("#", l10n("tooManyPeers", new
String[] { "count", "max" },
+ new String[] { Integer.toString(peers),
Integer.toString(MAX_PEER_ALERT_THRESHOLD)}));
} else if (n.bwlimitDelayAlertRelevant && (bwlimitDelayTime >
NodeStats.MAX_BWLIMIT_DELAY_TIME_ALERT_THRESHOLD)) {
- alertNode.addChild("#",
replace(TOO_HIGH_BWLIMITDELAYTIME, "\\{BWLIMIT_DELAY_TIME\\}",
Integer.toString(bwlimitDelayTime)));
+ alertNode.addChild("#", l10n("tooHighBwlimitDelayTime",
new String[] { "delay", "max" },
+ new String[] {
Integer.toString(bwlimitDelayTime),
Long.toString(NodeStats.MAX_BWLIMIT_DELAY_TIME_ALERT_THRESHOLD)}));
} else if (n.nodeAveragePingAlertRelevant &&
(nodeAveragePingTime > NodeStats.MAX_NODE_AVERAGE_PING_TIME_ALERT_THRESHOLD)) {
- alertNode.addChild("#", replace(TOO_HIGH_PING,
"\\{PING_TIME\\}", Integer.toString(nodeAveragePingTime)));
+ alertNode.addChild("#", l10n("tooHighPingTime", new
String[] { "ping", "max" },
+ new String[] {
Integer.toString(nodeAveragePingTime),
Long.toString(NodeStats.MAX_NODE_AVERAGE_PING_TIME_ALERT_THRESHOLD) }));
} else if (oldestNeverConnectedPeerAge >
MAX_OLDEST_NEVER_CONNECTED_PEER_AGE_ALERT_THRESHOLD) {
- alertNode.addChild("#", NEVER_CONNECTED_TWO_WEEKS);
+ alertNode.addChild("#",
l10n("tooOldNeverConnectedPeers"));
} else throw new IllegalArgumentException("not valid");
return alertNode;
@@ -263,7 +216,7 @@
}
public String dismissButtonText(){
- return "Hide";
+ return L10n.getString("UserAlert.hide");
}
public boolean shouldUnregisterOnDismiss() {
Modified:
trunk/freenet/src/freenet/node/useralerts/RevocationKeyFoundUserAlert.java
===================================================================
--- trunk/freenet/src/freenet/node/useralerts/RevocationKeyFoundUserAlert.java
2007-05-09 17:55:56 UTC (rev 13174)
+++ trunk/freenet/src/freenet/node/useralerts/RevocationKeyFoundUserAlert.java
2007-05-09 18:24:47 UTC (rev 13175)
@@ -3,6 +3,7 @@
* http://www.gnu.org/ for further details of the GPL. */
package freenet.node.useralerts;
+import freenet.l10n.L10n;
import freenet.support.HTMLNode;
public class RevocationKeyFoundUserAlert implements UserAlert {
@@ -17,21 +18,16 @@
}
public String getTitle() {
- return "The private key of the project has been compromized!";
+ return L10n.getString("RevocationKeyFoundUserAlert.title");
}
public String getText() {
//TODO: reformulate : maybe put the GPG key fingerprint of
"trusted devs"
- return "Your node has found the auto-updater's revocation key
on the network. "+
- "It means that our auto-updating system is likely to
have been COMPROMIZED! "+
- "Consequently, it has been disabled on your node to
prevent \"bad things\" to "+
- "be installed. We strongly advise you to check the
project's website for updates. "+
- "Please take care of verifying that the website hasn't
been spoofed either. "+
- "The revocation message is the following : "+msg;
+ return L10n.getString("RevocationKeyFoundUserAlert.text",
"message", msg);
}
public HTMLNode getHTMLText() {
- return new HTMLNode("div", "Your node has found the
audo-updater\u2019s revocation key on the network. It means that our
auto-updating system is likely to have been COMPROMIZED! Consequently, it has
been disabled on your node to prevent \u201cbad things\u201d to be installed.
We strongly advise you to check the project\u2019s website for updates. Please
take care of verifying that the website hasn't been spoofed either. The
revocation message is the following: " + msg);
+ return new HTMLNode("div", getText());
}
public short getPriorityClass() {
@@ -47,7 +43,7 @@
}
public String dismissButtonText(){
- return "Hide";
+ return null; // can't be dismissed
}
public boolean shouldUnregisterOnDismiss() {
Modified: trunk/freenet/src/freenet/node/useralerts/SimpleHTMLUserAlert.java
===================================================================
--- trunk/freenet/src/freenet/node/useralerts/SimpleHTMLUserAlert.java
2007-05-09 17:55:56 UTC (rev 13174)
+++ trunk/freenet/src/freenet/node/useralerts/SimpleHTMLUserAlert.java
2007-05-09 18:24:47 UTC (rev 13175)
@@ -1,5 +1,6 @@
package freenet.node.useralerts;
+import freenet.l10n.L10n;
import freenet.support.HTMLNode;
public class SimpleHTMLUserAlert implements UserAlert {
@@ -45,7 +46,7 @@
}
public String dismissButtonText() {
- return "Hide";
+ return L10n.getString("UserAlert.hide");
}
public boolean shouldUnregisterOnDismiss() {
Modified: trunk/freenet/src/freenet/node/useralerts/SimpleUserAlert.java
===================================================================
--- trunk/freenet/src/freenet/node/useralerts/SimpleUserAlert.java
2007-05-09 17:55:56 UTC (rev 13174)
+++ trunk/freenet/src/freenet/node/useralerts/SimpleUserAlert.java
2007-05-09 18:24:47 UTC (rev 13175)
@@ -3,6 +3,7 @@
* http://www.gnu.org/ for further details of the GPL. */
package freenet.node.useralerts;
+import freenet.l10n.L10n;
import freenet.support.HTMLNode;
public class SimpleUserAlert implements UserAlert {
@@ -48,7 +49,7 @@
}
public String dismissButtonText() {
- return "Hide";
+ return L10n.getString("UserAlert.hide");
}
public boolean shouldUnregisterOnDismiss() {