Author: nextgens
Date: 2007-04-26 17:45:50 +0000 (Thu, 26 Apr 2007)
New Revision: 12992
Modified:
trunk/freenet/src/freenet/clients/http/TranslationToadlet.java
Log:
solve #1334: "Remove the translation override" doesn't work
Modified: trunk/freenet/src/freenet/clients/http/TranslationToadlet.java
===================================================================
--- trunk/freenet/src/freenet/clients/http/TranslationToadlet.java
2007-04-26 16:50:31 UTC (rev 12991)
+++ trunk/freenet/src/freenet/clients/http/TranslationToadlet.java
2007-04-26 17:45:50 UTC (rev 12992)
@@ -131,9 +131,9 @@
HTMLNode infobox =
contentNode.addChild(ctx.getPageMaker().getInfobox("infobox-warning", "You are
about to remove a translation override key!"));
HTMLNode content =
ctx.getPageMaker().getContentNode(infobox);
content.addChild("p").addChild("#", "Are you sure that
you want to remove the following translation key : (" + key + " - " +
L10n.getString(key) + ") ?");
- HTMLNode removeForm =
ctx.addFormChild(content.addChild("p"), TOADLET_URL, "remove-confirm");
- removeForm.addChild("input", new String[] { "type",
"name", "value" }, new String[] { "hidden", "remove-confirm", key });
- removeForm.addChild("input", new String[] { "type",
"name", "value" }, new String[] { "submit", "submit", "Remove" });
+ HTMLNode removeForm =
ctx.addFormChild(content.addChild("p"), TOADLET_URL, "remove_confirmed");
+ removeForm.addChild("input", new String[] { "type",
"name", "value" }, new String[] { "hidden", "remove_confirm", key });
+ removeForm.addChild("input", new String[] { "type",
"name", "value" }, new String[] { "submit", "remove_confirmed", "Remove" });
removeForm.addChild("input", new String[] { "type",
"name", "value" }, new String[] { "submit", "cancel", "Cancel" });
this.writeReply(ctx, 200, "text/html; charset=utf-8",
"OK", pageNode.generate());
@@ -195,8 +195,8 @@
redirectTo(ctx,
TOADLET_URL+"?translation_updated="+key);
return;
- } else if(request.getPartAsString("remove-confirm",
32).length() > 0) {
- String key = request.getPartAsString("remove-confirm",
256);
+ } else if(request.getPartAsString("remove_confirmed",
32).length() > 0) {
+ String key = request.getPartAsString("remove_confirm",
256).trim();
L10n.setOverride(key, "");
redirectTo(ctx,
TOADLET_URL+"?translation_updated="+key);