[sword-svn] r418 - trunk/webapp/admin
scribe at crosswire.org
scribe at crosswire.org
Tue Jul 8 17:08:06 MST 2014
Author: scribe
Date: 2014-07-08 17:08:06 -0700 (Tue, 08 Jul 2014)
New Revision: 418
Modified:
trunk/webapp/admin/translate.jsp
Log:
updated to work with sets instead of vectors
Modified: trunk/webapp/admin/translate.jsp
===================================================================
--- trunk/webapp/admin/translate.jsp 2014-07-08 20:22:43 UTC (rev 417)
+++ trunk/webapp/admin/translate.jsp 2014-07-09 00:08:06 UTC (rev 418)
@@ -28,13 +28,15 @@
if (request.getParameter("t0") != null) {
Properties locale = TranslateTag.getSessionLocale(pageContext);
- for (int i = 0; i < pageTags.size(); i++) {
- String key = (String)pageTags.get(i);
+ int i = 0;
+ for (Object k : pageTags) {
+ String key = (String)k;
String value = (String)request.getParameter("t"+Integer.toString(i));
if ((key != null) && (value != null)) {
value = new String(value.getBytes("iso8859-1"), "UTF-8");
locale.setProperty(""+key.hashCode(), value);
}
+ ++i;
}
File propName = new File(pageContext.getServletContext().getRealPath("/WEB-INF/classes/trans_"+lang+".properties"));
@@ -58,8 +60,9 @@
<fieldset>
<legend>Strings which are marked for translation:</legend>
<%
- for (int i = 0; i < pageTags.size(); i++) {
- String key = (String)pageTags.get(i);
+ int i = 0;
+ for (Object k : pageTags) {
+ String key = (String)k;
String value = TranslateTag.getTranslation(pageContext, key, false);
%>
<p>
@@ -67,6 +70,7 @@
<input type="text" name="t<%=i%>" size="120" value="<%= HTTPUtils.canonize(value)%>"/>
</p>
<%
+ ++i;
}
%>
<input type="submit" value="save" title="Save translation strings" />
More information about the sword-cvs
mailing list