Author: juiceman
Date: 2008-12-29 07:40:17 +0000 (Mon, 29 Dec 2008)
New Revision: 24818

Modified:
   trunk/freenet/src/freenet/clients/http/SimpleHelpToadlet.java
   trunk/freenet/src/freenet/l10n/L10n.java
   trunk/freenet/src/freenet/l10n/freenet.l10n.en.properties
Log:
Revert L10n html.  Nextgens is right.  Keep the formatting separate from the 
content

Modified: trunk/freenet/src/freenet/clients/http/SimpleHelpToadlet.java
===================================================================
--- trunk/freenet/src/freenet/clients/http/SimpleHelpToadlet.java       
2008-12-29 01:20:24 UTC (rev 24817)
+++ trunk/freenet/src/freenet/clients/http/SimpleHelpToadlet.java       
2008-12-29 07:40:17 UTC (rev 24818)
@@ -38,14 +38,12 @@
                
                HTMLNode helpScreenBox1 = 
contentNode.addChild(ctx.getPageMaker().getInfobox("infobox-content", 
L10n.getString("SimpleHelpToadlet.descriptionTitle")));
                HTMLNode helpScreenContent1 = 
ctx.getPageMaker().getContentNode(helpScreenBox1);
-               HTMLNode p1 = helpScreenContent1.addChild("p1");
-               L10n.addL10nHTML(p1, "SimpleHelpToadlet.descriptionText");
+               helpScreenContent1.addChild("#", 
L10n.getString("SimpleHelpToadlet.descriptionText"));
                
                
                HTMLNode helpScreenBox2 = 
contentNode.addChild(ctx.getPageMaker().getInfobox("infobox-content", 
L10n.getString("SimpleHelpToadlet.connectivityTitle")));
                HTMLNode helpScreenContent2 = 
ctx.getPageMaker().getContentNode(helpScreenBox2);
-               HTMLNode p2 = helpScreenContent2.addChild("p2");
-               L10n.addL10nHTML(p2, "SimpleHelpToadlet.connectivityText");
+               helpScreenContent2.addChild("#", 
L10n.getString("SimpleHelpToadlet.connectivityText"));
                
                
                this.writeHTMLReply(ctx, 200, "OK", pageNode.generate());

Modified: trunk/freenet/src/freenet/l10n/L10n.java
===================================================================
--- trunk/freenet/src/freenet/l10n/L10n.java    2008-12-29 01:20:24 UTC (rev 
24817)
+++ trunk/freenet/src/freenet/l10n/L10n.java    2008-12-29 07:40:17 UTC (rev 
24818)
@@ -414,12 +414,6 @@
                        result = result.replaceAll("\\$\\{"+patterns[i]+"\\}", 
quoteReplacement(values[i]));
                node.addChild("%", result);
        }
-       
-       //Provide a way to handle most basic html tags without manually 
including the search strings in addL10nSubstitution.
-       //I know it's ugly, but will only be used rarely.  -Juiceman.
-       public static void addL10nHTML(HTMLNode node, String key){
-               addL10nSubstitution(node, key, new String[] { "p", "/p", "b", 
"/b", "br", "hr", "pre", "/pre", "i", "/i", "ul", "/ul", "ol", "/ol", "li", 
"center", "/center", "strike", "/strike", "blockquote", "/blockquote", "h1", 
"/h1", "h2", "/h2", "h3", "/h3", "h4", "/h4", "h5", "/h5", "h6", "/h6", 
"strong", "/strong", "table", "/table", "th", "/th", "tr", "/tr", "td", "/td" 
}, new String[] { "<p>", "</p>", "<b>", "</b>", "<br>", "<hr>", "<pre>", 
"</pre>", "<i>", "</i>", "<ul>", "</ul>", "<ol>", "</ol>", "<li>", "<center>", 
"</center>", "<strike>", "</strike>", "<blockquote>", "</blockquote>", "<h1>", 
"</h1>", "<h2>", "</h2>", "<h3>", "</h3>", "<h4>", "</h4>", "<h5>", "</h5>", 
"<h6>", "</h6>", "<strong>", "</strong>", "<table>", "</table>", "<th>", 
"</th>", "<tr>", "</tr>", "<td>", "</td>" });
-       }
 
        public static String getString(String key, String pattern, String 
value) {
                return getString(key, new String[] { pattern }, new String[] { 
value }); // FIXME code efficiently!

Modified: trunk/freenet/src/freenet/l10n/freenet.l10n.en.properties
===================================================================
--- trunk/freenet/src/freenet/l10n/freenet.l10n.en.properties   2008-12-29 
01:20:24 UTC (rev 24817)
+++ trunk/freenet/src/freenet/l10n/freenet.l10n.en.properties   2008-12-29 
07:40:17 UTC (rev 24818)
@@ -1116,7 +1116,7 @@
 SecurityLevels.userAlertExtro=You can change these settings on ${link}the 
config page${/link}.
 ShortOption.parseError=Cannot parse value as a string array: ${error}
 ShortOption.parseError=The value specified can't be parsed as a 16-bit integer 
: ${val}
-SimpleHelpToadlet.connectivityText=${p}${b}Testing.${/b}${p}Test${hr}Blah blah 
blah, etc etc etc 
+SimpleHelpToadlet.connectivityText=Testing. Test.   Blah blah blah, etc etc 
etc 
 SimpleHelpToadlet.connectivityTitle=Connectivity
 SimpleHelpToadlet.descriptionText=This page should provide basic info for you 
to get started with Freenet.  There are many other places for more in-depth 
information such as the offical Freenet website http://freenetproject.org, the 
offical wiki http://wiki.freenetproject.org or in-Freenet Freesites.
 SimpleHelpToadlet.descriptionTitle=Description

_______________________________________________
cvs mailing list
[email protected]
http://emu.freenetproject.org/cgi-bin/mailman/listinfo/cvs

Reply via email to