Internationalization refactoring pass 2 : removing dependencies to

previous implentation
This commit is contained in:
David Touzet
2014-09-26 08:12:44 -04:00
parent 92b317b2c9
commit 05c0c0342e
34 changed files with 3829 additions and 3372 deletions

View File

@ -19,7 +19,6 @@ import org.apache.ecs.html.PRE;
import org.owasp.webgoat.session.DatabaseUtilities;
import org.owasp.webgoat.session.ECSFactory;
import org.owasp.webgoat.session.WebSession;
import org.owasp.webgoat.util.WebGoatI18N;
/***************************************************************************************************
@ -117,7 +116,7 @@ public class SqlModifyData extends SequentialLessonAdapter
}
else
{
ec.addElement(WebGoatI18N.get("NoResultsMatched"));
ec.addElement(getLabelManager().get("NoResultsMatched"));
}
// see if target data was modified
@ -149,7 +148,7 @@ public class SqlModifyData extends SequentialLessonAdapter
}
} catch (Exception e)
{
s.setMessage(WebGoatI18N.get("ErrorGenerating") + this.getClass().getName());
s.setMessage(getLabelManager().get("ErrorGenerating") + this.getClass().getName());
e.printStackTrace();
}
@ -161,13 +160,13 @@ public class SqlModifyData extends SequentialLessonAdapter
protected Element makeAccountLine(WebSession s)
{
ElementContainer ec = new ElementContainer();
ec.addElement(new P().addElement(WebGoatI18N.get("EnterUserid")));
ec.addElement(new P().addElement(getLabelManager().get("EnterUserid")));
userid = s.getParser().getRawParameter(USERID, "jsmith");
Input input = new Input(Input.TEXT, USERID, userid.toString());
ec.addElement(input);
Element b = ECSFactory.makeButton(WebGoatI18N.get("Go!"));
Element b = ECSFactory.makeButton(getLabelManager().get("Go!"));
ec.addElement(b);
return ec;
@ -203,11 +202,11 @@ public class SqlModifyData extends SequentialLessonAdapter
{
List<String> hints = new ArrayList<String>();
hints.add(WebGoatI18N.get("SqlModifyDataHint1"));
hints.add(WebGoatI18N.get("SqlModifyDataHint2"));
hints.add(WebGoatI18N.get("SqlModifyDataHint3"));
hints.add(WebGoatI18N.get("SqlModifyDataHint4"));
hints.add(WebGoatI18N.get("SqlModifyDataHint5"));
hints.add(getLabelManager().get("SqlModifyDataHint1"));
hints.add(getLabelManager().get("SqlModifyDataHint2"));
hints.add(getLabelManager().get("SqlModifyDataHint3"));
hints.add(getLabelManager().get("SqlModifyDataHint4"));
hints.add(getLabelManager().get("SqlModifyDataHint5"));
return hints;
}