Author: toad
Date: 2009-01-06 21:42:28 +0000 (Tue, 06 Jan 2009)
New Revision: 24942
Modified:
trunk/freenet/src/freenet/clients/http/ConfigToadlet.java
trunk/freenet/src/freenet/l10n/L10n.java
trunk/freenet/src/freenet/node/useralerts/MeaningfulNodeNameUserAlert.java
Log:
Fix with-translation-link HTML
Modified: trunk/freenet/src/freenet/clients/http/ConfigToadlet.java
===================================================================
--- trunk/freenet/src/freenet/clients/http/ConfigToadlet.java 2009-01-06
21:36:42 UTC (rev 24941)
+++ trunk/freenet/src/freenet/clients/http/ConfigToadlet.java 2009-01-06
21:42:28 UTC (rev 24942)
@@ -390,9 +390,9 @@
String defaultValue = "128";
item.addChild("span", new String[]{ "class",
"title", "style" },
new String[]{
"configshortdesc", L10n.getString("ConfigToadlet.defaultIs", new String[] {
"default" }, new String[] { defaultValue }),
- "cursor: help;"
}).addChild(L10n.getHTMLNode("WrapperConfig."+configName+".short"));
+ "cursor: help;"
}).addChild(L10n.getHTMLNode("WrapperConfig."+configName+".short", ctx));
item.addChild("span", "class",
"config").addChild("input", new String[] { "type", "class", "name", "value" },
new String[] { "text", "config", configName, curValue });
- item.addChild("span", "class",
"configlongdesc").addChild(L10n.getHTMLNode("WrapperConfig."+configName+".long"));
+ item.addChild("span", "class",
"configlongdesc").addChild(L10n.getHTMLNode("WrapperConfig."+configName+".long",
ctx));
}
}
@@ -411,7 +411,7 @@
HTMLNode configItemNode =
configGroupUlNode.addChild("li");
configItemNode.addChild("span", new
String[]{ "class", "title", "style" },
new String[]{
"configshortdesc", L10n.getString("ConfigToadlet.defaultIs", new String[] {
"default" }, new String[] { o[j].getDefault() }) + (mode >=
PageMaker.MODE_ADVANCED ? " ["+sc[i].getPrefix() + '.' + o[j].getName() + ']' :
""),
- "cursor: help;"
}).addChild(L10n.getHTMLNode(o[j].getShortDesc()));
+ "cursor: help;"
}).addChild(L10n.getHTMLNode(o[j].getShortDesc(), ctx));
HTMLNode configItemValueNode =
configItemNode.addChild("span", "class", "config");
if(o[j].getValueString() == null){
Logger.error(this,
sc[i].getPrefix() + configName + "has returned null from config!);");
@@ -436,7 +436,7 @@
new String[] { "text",
"config", o[j].getShortDesc(),
sc[i].getPrefix() + '.' + configName, o[j].getValueString() });
- configItemNode.addChild("span",
"class", "configlongdesc").addChild(L10n.getHTMLNode(o[j].getLongDesc()));
+ configItemNode.addChild("span",
"class", "configlongdesc").addChild(L10n.getHTMLNode(o[j].getLongDesc(), ctx));
}
}
Modified: trunk/freenet/src/freenet/l10n/L10n.java
===================================================================
--- trunk/freenet/src/freenet/l10n/L10n.java 2009-01-06 21:36:42 UTC (rev
24941)
+++ trunk/freenet/src/freenet/l10n/L10n.java 2009-01-06 21:42:28 UTC (rev
24942)
@@ -9,6 +9,7 @@
import java.io.InputStream;
import java.util.MissingResourceException;
+import freenet.clients.http.LinkFixer;
import freenet.clients.http.TranslationToadlet;
import freenet.support.HTMLEncoder;
import freenet.support.HTMLNode;
@@ -279,13 +280,13 @@
* @param key
* @return HTMLNode
*/
- public static HTMLNode getHTMLNode(String key) {
+ public static HTMLNode getHTMLNode(String key, LinkFixer fixer) {
String value = getString(key, true);
if(value != null)
return new HTMLNode("#", value);
HTMLNode translationField = new HTMLNode("span", "class",
"translate_it") ;
translationField.addChild("#", getDefaultString(key));
- translationField.addChild("a", "href",
TranslationToadlet.TOADLET_URL+"?translate=" + key).addChild("small", "
(translate it in your native language!)");
+ translationField.addChild("a", "href",
fixer.fixLink(TranslationToadlet.TOADLET_URL+"?translate=" +
key)).addChild("small", " (translate it in your native language!)");
return translationField;
}
Modified:
trunk/freenet/src/freenet/node/useralerts/MeaningfulNodeNameUserAlert.java
===================================================================
--- trunk/freenet/src/freenet/node/useralerts/MeaningfulNodeNameUserAlert.java
2009-01-06 21:36:42 UTC (rev 24941)
+++ trunk/freenet/src/freenet/node/useralerts/MeaningfulNodeNameUserAlert.java
2009-01-06 21:42:28 UTC (rev 24942)
@@ -3,6 +3,7 @@
* http://www.gnu.org/ for further details of the GPL. */
package freenet.node.useralerts;
+import freenet.clients.http.LinkFixer;
import freenet.config.Option;
import freenet.config.SubConfig;
import freenet.l10n.L10n;
@@ -50,9 +51,9 @@
HTMLNode itemNode = listNode.addChild("li");
itemNode.addChild("span", new String[]{ "class", "title",
"style" },
new String[]{ "configshortdesc",
L10n.getString("ConfigToadlet.defaultIs", new String[] { "default" }, new
String[] { o.getDefault() }),
- "cursor: help;"
}).addChild(L10n.getHTMLNode(o.getShortDesc()));
+ "cursor: help;"
}).addChild(L10n.getHTMLNode(o.getShortDesc(), fixer));
itemNode.addChild("input", new String[] { "type", "class",
"alt", "name", "value" }, new String[] { "text", "config", o.getShortDesc(),
"node.name", o.getValueString() });
- itemNode.addChild("span", "class",
"configlongdesc").addChild(L10n.getHTMLNode(o.getLongDesc()));
+ itemNode.addChild("span", "class",
"configlongdesc").addChild(L10n.getHTMLNode(o.getLongDesc(), fixer));
formNode.addChild("input", new String[] { "type", "value" },
new String[] { "submit", L10n.getString("UserAlert.apply") });
formNode.addChild("input", new String[] { "type", "value" },
new String[] { "reset", L10n.getString("UserAlert.reset") });
_______________________________________________
cvs mailing list
[email protected]
http://emu.freenetproject.org/cgi-bin/mailman/listinfo/cvs