rave-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ja...@apache.org
Subject svn commit: r1162830 - in /incubator/rave/trunk/rave-portal/src/main: resources/ webapp/ webapp/WEB-INF/tags/ webapp/WEB-INF/views/ webapp/script/
Date Mon, 29 Aug 2011 14:26:53 GMT
Author: jasha
Date: Mon Aug 29 14:26:53 2011
New Revision: 1162830

URL: http://svn.apache.org/viewvc?rev=1162830&view=rev
Log:
RAVE-211 Replace all hard coded labels with overridable placeholders

Modified:
    incubator/rave/trunk/rave-portal/src/main/resources/messages.properties
    incubator/rave/trunk/rave-portal/src/main/webapp/WEB-INF/tags/rave_generic_page.tag
    incubator/rave/trunk/rave-portal/src/main/webapp/WEB-INF/views/addwidget.jsp
    incubator/rave/trunk/rave-portal/src/main/webapp/WEB-INF/views/home.jsp
    incubator/rave/trunk/rave-portal/src/main/webapp/WEB-INF/views/newaccount.jsp
    incubator/rave/trunk/rave-portal/src/main/webapp/WEB-INF/views/store.jsp
    incubator/rave/trunk/rave-portal/src/main/webapp/WEB-INF/views/userProfile.jsp
    incubator/rave/trunk/rave-portal/src/main/webapp/WEB-INF/views/widget.jsp
    incubator/rave/trunk/rave-portal/src/main/webapp/login.jsp
    incubator/rave/trunk/rave-portal/src/main/webapp/script/rave_forms.js

Modified: incubator/rave/trunk/rave-portal/src/main/resources/messages.properties
URL: http://svn.apache.org/viewvc/incubator/rave/trunk/rave-portal/src/main/resources/messages.properties?rev=1162830&r1=1162829&r2=1162830&view=diff
==============================================================================
--- incubator/rave/trunk/rave-portal/src/main/resources/messages.properties (original)
+++ incubator/rave/trunk/rave-portal/src/main/resources/messages.properties Mon Aug 29 14:26:53
2011
@@ -34,17 +34,70 @@ email.invalid=This is not a valid email 
 email.exists=This email address already exists for a user
 
 form.some.fields.required=Field marked with * are required
+form.all.fields.required=All fields are required.
 
 page.general.back=Back to Rave
-page.general.titlesuffix= - Rave
+page.general.addnewpage=Add a New Page
+page.general.confirmpassword=Confirm password:
+page.general.deletepage=Delete Page
+page.general.editpage=Edit Page
+page.general.email=Email address:
+page.general.logout=Logout
+page.general.movepage=Move Page
+page.general.movethispage=Move this page:
+page.general.movethispage.after=After {0}
+page.general.movethispage.tofirst=To First Tab (Set as Default)
+page.general.password=Password:
 page.general.screenshot=screenshot
+page.general.titlesuffix= - Rave
 page.general.thumbnail=thumbnail
+page.general.username=Username:
+
+page.general.addpage.title=Title
+page.general.addpage.layout.columns_1=One Column
+page.general.addpage.layout.columns_2=Two Columns
+page.general.addpage.layout.columns_2wn=Two Columns (wide/narrow)
+page.general.addpage.layout.columns_3=Three Columns
+page.general.addpage.layout.columns_3nwn=Three Columns (narrow/wide/narrow)
+page.general.addpage.layout.columns_4=Four Columns
+page.general.addpage.layout.columns_3nwn_1_bottom=Four Columns (narrow/wide/narrow/bottom)
+page.general.addpage.selectlayout=Select Page Layout:
+
+page.home.welcome=Hello {0}, welcome to Rave!
+
+page.login.title=Login
+page.login.createaccount=New User
+page.login.createaccount.label=Register:
+page.login.createaccount.button=Create New Account
+page.login.openid=OpenID Identity
+page.login.openid.button=Login with OpenID
+page.login.openid.fail=OpenID identification failed.
+page.login.openid.identifier=Identity:
+page.login.rememberme=Remember me
+page.login.usernamepassword=Username and Password
+page.login.usernamepassword.fail=The username or password is incorrect.
+page.login.usernamepassword.login=Login
+
+page.newaccount.title=New Account Application
+page.newaccount.button=Create Account
+
+page.store.title=Widget Store
+page.store.search=Search in widget store
+page.store.search.button=Search
+page.store.list.noresult=No widgets found
+page.store.list.result.x.to.y=Showing {0} - {1} of {2} widgets
+page.store.list.search.noresult=No widgets found for '{0}'
+page.store.list.search.result.x.to.y=Showing {0} - {1} of {2} widgets that match '{3}'
+
+page.userprofile.title=Update user profile
+page.userprofile.button=Update profile
+page.userprofile.openid.url=OpenID URL:
 
 page.widget.addToPage=Add to Page
 page.widget.backToStore=Back to Store
 page.widget.widgetPreview=Widget Preview
 
-page.addwidget.pagetitle=Add new widget
+page.addwidget.title=Add new widget
 page.addwidget.form.header=Widget
 page.addwidget.form.submit=Add widget
 page.addwidget.result.exists=The widget you submitted already exists.

Modified: incubator/rave/trunk/rave-portal/src/main/webapp/WEB-INF/tags/rave_generic_page.tag
URL: http://svn.apache.org/viewvc/incubator/rave/trunk/rave-portal/src/main/webapp/WEB-INF/tags/rave_generic_page.tag?rev=1162830&r1=1162829&r2=1162830&view=diff
==============================================================================
--- incubator/rave/trunk/rave-portal/src/main/webapp/WEB-INF/tags/rave_generic_page.tag (original)
+++ incubator/rave/trunk/rave-portal/src/main/webapp/WEB-INF/tags/rave_generic_page.tag Mon
Aug 29 14:26:53 2011
@@ -23,13 +23,14 @@
 <%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
 <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
 <%@ attribute name="pageTitle" required="false" description="The title of the page, will
appear in the title bar" %>
+<fmt:setBundle basename="messages"/>
 <%--
 This tag will provide simple template layouts for pages that use it. See for example home.jsp.
 --%>
 <html>
   <head>
      <meta charset="UTF-8"/>
-     <title><c:out value="${pageTitle}"/></title>
+     <title><c:out value="${pageTitle}"/><fmt:message key="page.general.titlesuffix"/></title>
      <link rel="stylesheet" href="//ajax.aspnetcdn.com/ajax/jquery.ui/1.8.13/themes/base/jquery-ui.css"/>
      <link rel="stylesheet" href="<c:url value="/css/default.css" />" />
   </head>

Modified: incubator/rave/trunk/rave-portal/src/main/webapp/WEB-INF/views/addwidget.jsp
URL: http://svn.apache.org/viewvc/incubator/rave/trunk/rave-portal/src/main/webapp/WEB-INF/views/addwidget.jsp?rev=1162830&r1=1162829&r2=1162830&view=diff
==============================================================================
--- incubator/rave/trunk/rave-portal/src/main/webapp/WEB-INF/views/addwidget.jsp (original)
+++ incubator/rave/trunk/rave-portal/src/main/webapp/WEB-INF/views/addwidget.jsp Mon Aug 29
14:26:53 2011
@@ -23,17 +23,16 @@
 <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
 <%@ taglib tagdir="/WEB-INF/tags" prefix="rave" %>
 
-<fmt:bundle basename="messages"/>
-<fmt:message key="page.addwidget.pagetitle" var="pagetitle"/>
-<fmt:message key="page.general.titlesuffix" var="titlesuffix"/>
-<rave:rave_generic_page pageTitle="${pagetitle}${titlesuffix}">
+<fmt:setBundle basename="messages"/>
+<fmt:message key="page.addwidget.title" var="pagetitle"/>
+<rave:rave_generic_page pageTitle="${pagetitle}">
     <div id="header">
         <div class="header-a">
         <span class="backToPage">
             <a href="<spring:url value="/index.html" />"><fmt:message key="page.general.back"/></a>
         </span>
         </div>
-        <h1><fmt:message key="page.addwidget.pagetitle"/></h1>
+        <h1><fmt:message key="page.addwidget.title"/></h1>
     </div>
 
     <div id="content">

Modified: incubator/rave/trunk/rave-portal/src/main/webapp/WEB-INF/views/home.jsp
URL: http://svn.apache.org/viewvc/incubator/rave/trunk/rave-portal/src/main/webapp/WEB-INF/views/home.jsp?rev=1162830&r1=1162829&r2=1162830&view=diff
==============================================================================
--- incubator/rave/trunk/rave-portal/src/main/webapp/WEB-INF/views/home.jsp (original)
+++ incubator/rave/trunk/rave-portal/src/main/webapp/WEB-INF/views/home.jsp Mon Aug 29 14:26:53
2011
@@ -28,17 +28,20 @@
 <jsp:useBean id="pages" type="java.util.List<org.apache.rave.portal.model.Page>"
scope="request"/>
 <jsp:useBean id="openSocialEnv" scope="request" type="org.apache.rave.provider.opensocial.config.OpenSocialEnvironment"/>
 <c:set var="opensocial_engine_url" value="${openSocialEnv.engineProtocol}://${openSocialEnv.engineRoot}${openSocialEnv.engineGadgetPath}"/>
-
-<rave:rave_generic_page pageTitle="Rave - ${page.name}">    
+<fmt:setBundle basename="messages"/>
+<rave:rave_generic_page pageTitle="${page.name}">
     <div id="header">
         <div class="header-a">
-            <a href="<spring:url value="/j_spring_security_logout" htmlEscape="true"
/>">Logout</a>
+            <a href="<spring:url value="/j_spring_security_logout" htmlEscape="true"
/>">
+              <fmt:message key="page.general.logout"/></a>
         </div>
         <div class="widget-a">
-            <a href="<spring:url value="/app/store?referringPageId=${page.id}" />">Widget
Store</a>
+            <a href="<spring:url value="/app/store?referringPageId=${page.id}" />">
+              <fmt:message key="page.store.title"/>
+            </a>
         </div>
-        <h1>Hello <c:out value="${page.owner.username}"/>, welcome to Rave!</h1>
-    </div>    
+      <h1><fmt:message key="page.home.welcome"><fmt:param value="${page.owner.username}"/></fmt:message></h1>
+    </div>
     <input id="currentPageId" type="hidden" value="${page.id}" />
     <div id="tabsHeader">      
         <%-- render the page tabs --%>
@@ -63,16 +66,19 @@
                         <div id="pageMenuWrapper">
                             <span id="pageMenuButton" class="ui-icon ui-icon-circle-triangle-s"
title="Page Actions Menu"></span>
                             <div id="pageMenu" class="page-menu">
-                                <div id="pageMenuEdit" class="page-menu-item">Edit
Page</div>
-                                <div id="pageMenuDelete" class="page-menu-item<c:if
test='${hasOnlyOnePage}'> page-menu-item-disabled</c:if>">Delete Page</div>
-                                <div id="pageMenuMove" class="page-menu-item<c:if test='${hasOnlyOnePage}'>
page-menu-item-disabled</c:if>">Move Page</div>
+                                <div id="pageMenuEdit" class="page-menu-item"><fmt:message
key="page.general.editpage"/></div>
+                                <div id="pageMenuDelete" class="page-menu-item<c:if
test='${hasOnlyOnePage}'> page-menu-item-disabled</c:if>">
+                                  <fmt:message key="page.general.deletepage"/></div>
+                                <div id="pageMenuMove" class="page-menu-item<c:if test='${hasOnlyOnePage}'>
page-menu-item-disabled</c:if>">
+                                  <fmt:message key="page.general.movepage"/></div>
                             </div>
                         </div>
                     </c:if>
                 </div>
             </c:forEach>        
             <%-- display the add page button at the end of the tabs --%>
-            <button id="add_page" title="Add a New Page" style="display: none;"></button>
+            <fmt:message key="page.general.addnewpage" var="addNewPageTitle"/>
+            <button id="add_page" title="${addNewPageTitle}" style="display: none;"></button>
         </div>   
     </div>
     <%--render the main page content (regions/widgets) --%>
@@ -106,35 +112,39 @@
         </c:forEach>
         <div class="clear-float">&nbsp;</div>
     </div>
-    <div id="dialog" title="Add a New Page" class="dialog">
+    <fmt:message key="page.general.addnewpage" var="addNewPageTitle"/>
+    <div id="dialog" title="${addNewPageTitle}" class="dialog">
         <form id="pageForm">
             <div id="pageFormErrors" class="error"></div>
             <fieldset class="ui-helper-reset">
-                <label for="tab_title">Title</label>
+                <label for="tab_title"><fmt:message key="page.general.addpage.title"/></label>
                 <input type="text" name="tab_title" id="tab_title" value="" class="required
ui-widget-content ui-corner-all" />
-                <label for="pageLayout">Select Page Layout:</label>
+                <label for="pageLayout"><fmt:message key="page.general.addpage.selectlayout"/></label>
                 <select name="pageLayout" id="pageLayout">
-                    <option value="columns_1" id="columns_1_id">One Column</option>
-                    <option value="columns_2" id="columns_2_id" selected="selected">Two
Columns</option>
-                    <option value="columns_2wn" id="columns_2wn_id">Two Columns (wide/narrow)</option>
-                    <option value="columns_3" id="columns_3_id">Three Columns</option>
-                    <option value="columns_3nwn" id="columns_3nwn_id">Three Columns
(narrow/wide/narrow)</option>
-                    <option value="columns_4" id="columns_4_id">Four Columns</option>
-                    <option value="columns_3nwn_1_bottom" id="columns_3nwn_1_bottom">Four
Columns (narrow/wide/narrow/bottom)</option>
+                    <option value="columns_1" id="columns_1_id"><fmt:message key="page.general.addpage.layout.columns_1"/></option>
+                    <option value="columns_2" id="columns_2_id" selected="selected"><fmt:message
key="page.general.addpage.layout.columns_2"/></option>
+                    <option value="columns_2wn" id="columns_2wn_id"><fmt:message
key="page.general.addpage.layout.columns_2wn"/></option>
+                    <option value="columns_3" id="columns_3_id"><fmt:message key="page.general.addpage.layout.columns_3"/></option>
+                    <option value="columns_3nwn" id="columns_3nwn_id"><fmt:message
key="page.general.addpage.layout.columns_3nwn"/></option>
+                    <option value="columns_4" id="columns_4_id"><fmt:message key="page.general.addpage.layout.columns_4"/></option>
+                    <option value="columns_3nwn_1_bottom" id="columns_3nwn_1_bottom"><fmt:message
key="page.general.addpage.layout.columns_3nwn_1_bottom"/></option>
                 </select>
             </fieldset>
         </form>
-    </div>    
-    <div id="movePageDialog" title="Move Page" class="dialog">
-        <div>Move this page:</div>
+    </div>
+    <fmt:message key="page.general.movepage" var="movePageTitle"/>
+    <div id="movePageDialog" title="${movePageTitle}" class="dialog">
+        <div><fmt:message key="page.general.movethispage"/></div>
         <form id="movePageForm">
             <select id="moveAfterPageId">
                 <c:if test="${page.renderSequence != 1}">
-                    <option value="-1">To First Tab (Set as Default)</option>
+                    <option value="-1"><fmt:message key="page.general.movethispage.tofirst"/></option>
                 </c:if>
                 <c:forEach var="userPage" items="${pages}">
                     <c:if test="${userPage.id != page.id}">
-                        <option value="${userPage.id}">After <c:out value="${userPage.name}"/></option>
+                        <option value="${userPage.id}">
+                          <fmt:message key="page.general.movethispage.after"><fmt:param
value="${userPage.name}"/></fmt:message>
+                        </option>
                     </c:if>
                 </c:forEach>
             </select>
@@ -158,7 +168,6 @@
            Among other things, the render-widget tag will populate the widgets[] array.
            See the markup text in OpenSocialWidgetRenderer.java, for example.
         --%>
-
         <c:forEach var="region" items="${page.regions}">
             <c:forEach var="regionWidget" items="${region.regionWidgets}">
                 <portal:render-widget regionWidget="${regionWidget}" />

Modified: incubator/rave/trunk/rave-portal/src/main/webapp/WEB-INF/views/newaccount.jsp
URL: http://svn.apache.org/viewvc/incubator/rave/trunk/rave-portal/src/main/webapp/WEB-INF/views/newaccount.jsp?rev=1162830&r1=1162829&r2=1162830&view=diff
==============================================================================
--- incubator/rave/trunk/rave-portal/src/main/webapp/WEB-INF/views/newaccount.jsp (original)
+++ incubator/rave/trunk/rave-portal/src/main/webapp/WEB-INF/views/newaccount.jsp Mon Aug
29 14:26:53 2011
@@ -19,52 +19,56 @@
 <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
 <%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
 <%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
+<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
 <%@ taglib tagdir="/WEB-INF/tags" prefix="rave"%>
-  
-<rave:rave_generic_page pageTitle="New Account Application - Rave">
+
+<fmt:setBundle basename="messages"/>
+<fmt:message key="page.newaccount.title" var="pagetitle"/>
+<rave:rave_generic_page pageTitle="${pagetitle}">
 <div id="content">
-    <h1>Rave Account Application</h1>
+    <h1>${pagetitle}</h1>
     <form:form id="newAccountForm" commandName="newUser" action="newaccount" method="POST">
         <fieldset>
-            <p>All fields are required</p>
+            <p><fmt:message key="form.all.fields.required"/></p>
             <p><form:errors cssClass="error"/></p>
             <p>
-                <label for="userNameField">Username:</label>
+                <label for="userNameField"><fmt:message key="page.general.username"/></label>
                 <form:input id="userNameField" path="username" required="required" autofocus="autofocus"/>
                 <form:errors path="username" cssClass="error" />
             </p>
             <p>
-                <label for="passwordField">Password:</label>
+                <label for="passwordField"><fmt:message key="page.general.password"/></label>
                 <form:password id="passwordField" path="password" required="required"/>
                 <form:errors path="password" cssClass="error" />
             </p>
             <p>
-                <label for="passwordConfirmField">Confirm Password:</label>
+                <label for="passwordConfirmField"><fmt:message key="page.general.confirmpassword"/></label>
                 <form:password id="passwordConfirmField" path="confirmPassword" required="required"/>
                 <form:errors path="confirmPassword" cssClass="error" />
             </p>
             <p>
-              <label for="emailField">Email address:</label>
+              <label for="emailField"><fmt:message key="page.general.email"/></label>
               <spring:bind path="email">
                 <input type="email" name="email" id="emailField" required="required"/>
               </spring:bind>
               <form:errors path="email" cssClass="error"/>
             </p>
             <p>
-                <label for="pageLayoutField">Select Page Layout:</label>
-                <form:select path="pageLayout" id="pageLayoutField">
-                    <form:option value="columns_1" id="columns_1_id">One Column</form:option>
-                    <form:option value="columns_2" id="columns_2_id" selected="selected">Two
Columns</form:option>
-                    <form:option value="columns_2wn" id="columns_2wn_id">Two Columns
(wide/narrow)</form:option>
-                    <form:option value="columns_3" id="columns_3_id">Three Columns</form:option>
-                    <form:option value="columns_3nwn" id="columns_3nwn_id">Three Columns
(narrow/wide/narrow)</form:option>
-                    <form:option value="columns_4" id="columns_4_id">Four Columns</form:option>
-                    <form:option value="columns_3nwn_1_bottom" id="columns_3nwn_1_bottom">Four
Columns (narrow/wide/narrow/bottom)</form:option>
-                </form:select>
+              <label for="pageLayoutField"><fmt:message key="page.general.addpage.selectlayout"/></label>
+              <form:select path="pageLayout" id="pageLayoutField">
+                <form:option value="columns_1" id="columns_1_id"><fmt:message key="page.general.addpage.layout.columns_1"/></form:option>
+                <form:option value="columns_2" id="columns_2_id"><fmt:message key="page.general.addpage.layout.columns_2"/></form:option>
+                <form:option value="columns_2wn" id="columns_2wn_id"><fmt:message
key="page.general.addpage.layout.columns_2wn"/></form:option>
+                <form:option value="columns_3" id="columns_3_id"><fmt:message key="page.general.addpage.layout.columns_3"/></form:option>
+                <form:option value="columns_3nwn" id="columns_3nwn_id"><fmt:message
key="page.general.addpage.layout.columns_3nwn"/></form:option>
+                <form:option value="columns_4" id="columns_4_id"><fmt:message key="page.general.addpage.layout.columns_4"/></form:option>
+                <form:option value="columns_3nwn_1_bottom" id="columns_3nwn_1_bottom"><fmt:message
key="page.general.addpage.layout.columns_3nwn_1_bottom"/></form:option>
+              </form:select>
             </p>
         </fieldset>
         <fieldset>
-             <input type="submit" value="Create Account" />
+          <fmt:message key="page.newaccount.button" var="submitButtonText"/>
+           <input type="submit" value="${submitButtonText}" />
         </fieldset>
     </form:form>
 </div>

Modified: incubator/rave/trunk/rave-portal/src/main/webapp/WEB-INF/views/store.jsp
URL: http://svn.apache.org/viewvc/incubator/rave/trunk/rave-portal/src/main/webapp/WEB-INF/views/store.jsp?rev=1162830&r1=1162829&r2=1162830&view=diff
==============================================================================
--- incubator/rave/trunk/rave-portal/src/main/webapp/WEB-INF/views/store.jsp (original)
+++ incubator/rave/trunk/rave-portal/src/main/webapp/WEB-INF/views/store.jsp Mon Aug 29 14:26:53
2011
@@ -20,22 +20,24 @@
 <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
 <%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
 <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
-<%@ taglib tagdir="/WEB-INF/tags" prefix="rave"%>
 <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
+<%@ taglib tagdir="/WEB-INF/tags" prefix="rave"%>
+<fmt:setBundle basename="messages"/>
 
-<rave:rave_generic_page pageTitle="Widget Store - Rave">
+<fmt:message key="page.store.title" var="pagetitle"/>
+<rave:rave_generic_page pageTitle="${pagetitle}">
 <div id="header">
     <div class="header-a">
         <span class="backToPage">
-            <a href="<spring:url value="/index.html" />">Back to Rave</a>
+            <a href="<spring:url value="/index.html" />"><fmt:message key="page.general.back"/></a>
         </span>
     </div>
     <div class="widget-a">
         <span>
-            <a href="<spring:url value="store/widget/add"/>">Add widget</a>
+            <a href="<spring:url value="/app/store/widget/add"/>"><fmt:message
key="page.addwidget.title"/></a>
         </span>
     </div>
-    <h1>Widget Store</h1>
+    <h1>${pagetitle}</h1>
 </div>
 
 <div id="content">
@@ -45,9 +47,10 @@
             <fieldset>
                 <input type="hidden" name="referringPageId" value="${referringPageId}">
                 <p>
-                    <label for="searchTerm">Search in widget store</label>
-                    <input type="search" id="searchTerm" name="searchTerm" value="<c:out
value="${searchTerm}"/>"/>
-                    <input type="submit" value="Search">
+                  <label for="searchTerm"><fmt:message key="page.store.search"/></label>
+                  <input type="search" id="searchTerm" name="searchTerm" value="<c:out
value="${searchTerm}"/>"/>
+                  <fmt:message key="page.store.search.button" var="searchButtonText"/>
+                  <input type="submit" value="${searchButtonText}">
                 </p>
             </fieldset>
         </form>
@@ -55,18 +58,30 @@
         <c:choose>
             <c:when test="${empty searchTerm and (empty widgets or widgets.totalResults
eq 0)}">
                 <%-- Empty db --%>
-                <h2>No widgets found</h2>
+                <fmt:message key="page.store.list.noresult" var="listheader"/>
             </c:when>
             <c:when test="${empty searchTerm}">
-                <h2>Showing ${offset + 1} - ${offset + fn:length(widgets.resultSet)}
of ${widgets.totalResults} widgets</h2>
+                <fmt:message key="page.store.list.result.x.to.y" var="listheader">
+                    <fmt:param value="${offset + 1}"/>
+                    <fmt:param value="${offset + fn:length(widgets.resultSet)}"/>
+                    <fmt:param value="${widgets.totalResults}"/>
+                </fmt:message>
             </c:when>
             <c:when test="${not empty searchTerm and widgets.totalResults eq 0}">
-                <h2>No widgets found for '<c:out value="${searchTerm}"/>'</h2>
+                <fmt:message key="page.store.list.search.noresult" var="listheader">
+                    <fmt:param value="${searchTerm}"/>
+                </fmt:message>
             </c:when>
             <c:otherwise>
-                <h2>Showing ${offset + 1} - ${offset + fn:length(widgets.resultSet)}
of ${widgets.totalResults} widgets that match '<c:out value="${searchTerm}"/>'</h2>
+                <fmt:message key="page.store.list.search.result.x.to.y" var="listheader">
+                    <fmt:param value="${offset + 1}"/>
+                    <fmt:param value="${offset + fn:length(widgets.resultSet)}"/>
+                    <fmt:param value="${widgets.totalResults}"/>
+                    <fmt:param value="${searchTerm}"/>
+                </fmt:message>
             </c:otherwise>
         </c:choose>
+        <h2>${listheader}</h2>
     </div>
 
     <%--@elvariable id="widgets" type="org.apache.rave.portal.model.util.SearchResult"--%>
@@ -77,7 +92,7 @@
                     <div class="storeItemLeft">
                         <c:if test="${not empty widget.thumbnailUrl}">
                             <img class="storeWidgetThumbnail" src="${widget.thumbnailUrl}"
-                                 title="<c:out value="${widget.title}"/>" alt="Thumbnail
for widget <c:out value="${widget.title}"/>"
+                                 title="<c:out value="${widget.title}"/>" alt=""
                                  width="120" height="60"/>
                         </c:if>
                         <div class="widgetType"><c:out value="${widget.type}"/></div>
@@ -87,7 +102,7 @@
                             <button class="storeItemButton"
                                     id="addWidget_${widget.id}"
                                     onclick="rave.api.rpc.addWidgetToPage({widgetId: ${widget.id},
pageId: ${referringPageId}});">
-                                Add to Page
+                                <fmt:message key="page.widget.addToPage"/>
                             </button>
                         </div>
                         <a class="secondaryPageItemTitle"
@@ -96,7 +111,7 @@
                         </a>
 
                         <c:if test="${not empty widget.author}">
-                            <div class="storeWidgetAuthor">By: <c:out value="${widget.author}"/></div>
+                            <div class="storeWidgetAuthor"><fmt:message key="widget.author"/>:
<c:out value="${widget.author}"/></div>
                         </c:if>
                         <c:if test="${not empty widget.description}">
                             <div class="storeWidgetDesc"><c:out value="${widget.description}"/></div>

Modified: incubator/rave/trunk/rave-portal/src/main/webapp/WEB-INF/views/userProfile.jsp
URL: http://svn.apache.org/viewvc/incubator/rave/trunk/rave-portal/src/main/webapp/WEB-INF/views/userProfile.jsp?rev=1162830&r1=1162829&r2=1162830&view=diff
==============================================================================
--- incubator/rave/trunk/rave-portal/src/main/webapp/WEB-INF/views/userProfile.jsp (original)
+++ incubator/rave/trunk/rave-portal/src/main/webapp/WEB-INF/views/userProfile.jsp Mon Aug
29 14:26:53 2011
@@ -16,46 +16,65 @@
   specific language governing permissions and limitations
   under the License.
   --%>
-<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
-<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
-<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
-<%@ taglib tagdir="/WEB-INF/tags" prefix="rave"%>
-  
+<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
+<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
+<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
+<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
+<%@ taglib tagdir="/WEB-INF/tags" prefix="rave" %>
+<fmt:setBundle basename="messages"/>
+
+<fmt:message key="page.userprofile.title" var="pagetitle"/>
+
 <jsp:useBean id="userProfile" type="org.apache.rave.portal.model.User" scope="request"/>
-<rave:rave_generic_page pageTitle="User Profile Update - Rave">
-  <div id="content">
-	 <h1>Update Rave User Profile</h1>
-	 <form:form id="userProfileForm" commandName="userProfile" action="updateUserProfile"
method="POST">
-		<fieldset>
-		  <p><form:errors cssClass="error"/>
-		  <p>
-			 Username: ${userProfile.username}
-		  </p>
-		  <p>
-			 <label for="passwordField">Password:</label>
-			 <form:input id="passwordField" type="password" path="password" required="required"/>
-			 <form:errors path="password" cssClass="error" />
-		  </p>
-		  <p>
-			 <label for="passwordConfirmField">Confirm Password:</label>
-			 <input id="passwordConfirmField" type="password" path="confirmPassword" required="required"/>
-			 <form:errors path="confirmPassword" cssClass="error" />
-		  </p>
-		  <p>
-			 <label for="openIdField">OpenID URL:</label>
-			 <form:input id="openIdField" type="text" path="openId"/>
-			 <form:errors path="openId" cssClass="error" />
-		  </p>
-		</fieldset>
-		<fieldset>
-		  <input type="submit" value="UpdateProfile" />
-		</fieldset>
-	 </form:form>
-  </div>
-  <script src="//ajax.aspnetcdn.com/ajax/jQuery/jquery-1.6.1.min.js"></script>
-  <script src="//ajax.aspnetcdn.com/ajax/jquery.validate/1.8.1/jquery.validate.min.js"></script>
-  <script src="<spring:url value="/script/rave.js"/>"></script>
-  <script src="<spring:url value="/script/rave_forms.js"/>"></script>
-  
-  <script>$(document).ready(rave.forms.validateUserProfileForm());</script>
+<rave:rave_generic_page pageTitle="${pagetitle}">
+    <div id="content">
+        <h1>${pagetitle}</h1>
+        <form:form id="userProfileForm" commandName="userProfile" action="updateUserProfile"
method="POST">
+            <fieldset>
+                <form:errors cssClass="error" element="p"/>
+                <p>
+                    <fmt:message key="page.general.username"/> <c:out value=" ${userProfile.username}"/>
+                </p>
+                <p>
+                    <label for="passwordField"><fmt:message key="page.general.password"/></label>
+                    <form:password path="password" id="passwordField" required="required"
+                                   showPassword="true"/>
+                    <form:errors path="password" cssClass="error"/>
+                </p>
+
+                <p>
+                    <label for="passwordConfirmField"><fmt:message key="page.general.confirmpassword"/></label>
+                    <form:password path="confirmPassword" id="passwordConfirmField" required="required"
+                                   showPassword="true"/>
+                    <form:errors path="confirmPassword" cssClass="error"/>
+                </p>
+
+                <p>
+                    <label for="emailField"><fmt:message key="page.general.email"/></label>
+                    <spring:bind path="email">
+                        <input type="email" name="email" id="emailField" required="required"
value="<c:out value="${status.value}"/>"/>
+                    </spring:bind>
+                    <form:errors path="email" cssClass="error"/>
+                </p>
+
+                <p>
+                    <label for="openIdField"><fmt:message key="page.userprofile.openid.url"/></label>
+                    <spring:bind path="openId">
+                        <input type="url" id="openIdField" name="openId" value="<c:out
value="${status.value}"/>"/>
+                    </spring:bind>
+                    <form:errors path="openId" cssClass="error"/>
+                </p>
+            </fieldset>
+            <fieldset>
+                <fmt:message key="page.userprofile.button" var="updateButtonText"/>
+                <input type="submit" value="${updateButtonText}"/>
+            </fieldset>
+        </form:form>
+    </div>
+    <script src="//ajax.aspnetcdn.com/ajax/jQuery/jquery-1.6.1.min.js"></script>
+    <script src="//ajax.aspnetcdn.com/ajax/jquery.validate/1.8.1/jquery.validate.min.js"></script>
+    <script src="<spring:url value="/script/rave.js"/>"></script>
+    <script src="<spring:url value="/script/rave_forms.js"/>"></script>
+
+    <script>$(document).ready(rave.forms.validateUserProfileForm());</script>
 </rave:rave_generic_page>

Modified: incubator/rave/trunk/rave-portal/src/main/webapp/WEB-INF/views/widget.jsp
URL: http://svn.apache.org/viewvc/incubator/rave/trunk/rave-portal/src/main/webapp/WEB-INF/views/widget.jsp?rev=1162830&r1=1162829&r2=1162830&view=diff
==============================================================================
--- incubator/rave/trunk/rave-portal/src/main/webapp/WEB-INF/views/widget.jsp (original)
+++ incubator/rave/trunk/rave-portal/src/main/webapp/WEB-INF/views/widget.jsp Mon Aug 29 14:26:53
2011
@@ -22,9 +22,8 @@
 <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
 <%@ taglib tagdir="/WEB-INF/tags" prefix="rave" %>
 <jsp:useBean id="widget" scope="request" class="org.apache.rave.portal.model.Widget"/>
-<fmt:bundle basename="messages"/>
-<fmt:message var="titlesuffix" key="page.general.titlesuffix"/>
-<rave:rave_generic_page pageTitle="${widget.title}${titlesuffix}">
+<fmt:setBundle basename="messages"/>
+<rave:rave_generic_page pageTitle="${widget.title}">
     <div id="header">
         <div class="header-a">
         <span class="backToPage">

Modified: incubator/rave/trunk/rave-portal/src/main/webapp/login.jsp
URL: http://svn.apache.org/viewvc/incubator/rave/trunk/rave-portal/src/main/webapp/login.jsp?rev=1162830&r1=1162829&r2=1162830&view=diff
==============================================================================
--- incubator/rave/trunk/rave-portal/src/main/webapp/login.jsp (original)
+++ incubator/rave/trunk/rave-portal/src/main/webapp/login.jsp Mon Aug 29 14:26:53 2011
@@ -17,75 +17,80 @@
   ~ under the License.
   --%>
 <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
+<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
 <%@ taglib tagdir="/WEB-INF/tags" prefix="rave"%>
-<rave:rave_generic_page pageTitle="Login - Rave">
+<fmt:setBundle basename="messages"/>
+
+<fmt:message key="page.login.title" var="pagetitle"/>
+
+<rave:rave_generic_page pageTitle="${pagetitle}">
 <div id="content">
 
-    <h1>Login</h1>
+    <h1>${pagetitle}</h1>
 
-    <h2>Username and Password</h2>
+    <h2><fmt:message key="page.login.usernamepassword"/></h2>
     <form id="loginForm" name="loginForm" action="j_spring_security_check" method="post">
         <c:if test="${param['authfail'] eq 'form'}">
-            <p class="error">The username or password is incorrect.</p>
+            <p class="error"><fmt:message key="page.login.usernamepassword.fail"/></p>
         </c:if>
         <fieldset>
             <p>
-                <label for="usernameField">Username: </label>
-                <input id="usernameField" type="text" name="j_username"/>
+                <label for="usernameField"><fmt:message key="page.general.username"/></label>
+                <input id="usernameField" type="text" name="j_username" autofocus="autofocus"/>
             </p>
 
             <p>
-                <label for="passwordField">Password: </label>
+                <label for="passwordField"><fmt:message key="page.general.password"/></label>
                 <input id="passwordField" type="password" name="j_password"/>
             </p>
             <p>
                 <label for="remember_me" class="checkboxLabel">
                     <input type='checkbox' name='_spring_security_remember_me' id="remember_me"
                            value="true"/>
-                    Remember me
+                    <fmt:message key="page.login.rememberme"/>
                 </label>
             </p>
         </fieldset>
         <fieldset>
-            <input type="submit" value="Login"/>
+          <fmt:message key="page.login.usernamepassword.login" var="loginButtonText"/>
+            <input type="submit" value="${loginButtonText}"/>
         </fieldset>
     </form>
     
-    <h2>New User</h2>
+    <h2><fmt:message key="page.login.createaccount"/></h2>
     <form id="newAccount" action="<c:url value="/app/newaccount.jsp"/>" method="get">
         <fieldset>
             <p>
-                <label for="createNewAccountButton">Register: </label>
-                <input id="createNewAccountButton" type="submit" value="Create New Account"
/>
+              <label for="createNewAccountButton"><fmt:message key="page.login.createaccount.label"/></label>
+              <fmt:message key="page.login.createaccount.button" var="createAccountButtonText"/>
+              <input id="createNewAccountButton" type="submit" value="${createAccountButtonText}"
/>
             </p>
         </fieldset>
     </form>
     
-    <h2>OpenID Identity</h2>
+    <h2><fmt:message key="page.login.openid"/></h2>
     <form id="oidForm" name='oidf' action='j_spring_openid_security_check' method='POST'>
         <c:if test="${param['authfail'] eq 'openid'}">
-            <p class="error">OpenID identification failed.</p>
+            <p class="error"><fmt:message key="page.login.openid.fail"/></p>
         </c:if>
         <fieldset>
             <p>
-                <label for="openid_identifier">Identity: </label>
+                <label for="openid_identifier"><fmt:message key="page.login.openid.identifier"/></label>
                 <input type='text' id="openid_identifier" name='openid_identifier' class="long"/>
             </p>
             <p>
                 <label for="remember_me_openid" class="checkboxLabel">
                     <input type='checkbox' name='_spring_security_remember_me' id="remember_me_openid"
                            value="true"/>
-                    Remember me
+                  <fmt:message key="page.login.rememberme"/>
                 </label>
             </p>
         </fieldset>
         <fieldset>
-            <input type="submit" value="Login with OpenID"/>
+          <fmt:message key="page.login.openid.button" var="openidButtonText"/>
+            <input type="submit" value="${openidButtonText}"/>
         </fieldset>
 
     </form>
 </div>
-<script>
-document.loginForm.j_username.focus();
-</script>
 </rave:rave_generic_page>

Modified: incubator/rave/trunk/rave-portal/src/main/webapp/script/rave_forms.js
URL: http://svn.apache.org/viewvc/incubator/rave/trunk/rave-portal/src/main/webapp/script/rave_forms.js?rev=1162830&r1=1162829&r2=1162830&view=diff
==============================================================================
--- incubator/rave/trunk/rave-portal/src/main/webapp/script/rave_forms.js (original)
+++ incubator/rave/trunk/rave-portal/src/main/webapp/script/rave_forms.js Mon Aug 29 14:26:53
2011
@@ -35,6 +35,9 @@ rave.forms = rave.forms || (function() {
                     required: true,
                     minlength: 4,
                     equalTo: "#passwordField"
+                },
+                email : {
+                    required: true
                 }
             },
             messages: {



Mime
View raw message