Made build report action messages localizable.

git-svn-id: https://svn.apache.org/repos/asf/continuum/trunk@1677505 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/continuum-webapp/src/main/java/org/apache/continuum/web/action/ViewBuildsReportAction.java b/continuum-webapp/src/main/java/org/apache/continuum/web/action/ViewBuildsReportAction.java
index f70c3f5..73be6ee 100644
--- a/continuum-webapp/src/main/java/org/apache/continuum/web/action/ViewBuildsReportAction.java
+++ b/continuum-webapp/src/main/java/org/apache/continuum/web/action/ViewBuildsReportAction.java
@@ -151,8 +151,9 @@
             return REQUIRES_AUTHORIZATION;
         }
 
-        if (permittedGroups.isEmpty()) {
-            addActionError( "You are not authorized to view any project groups." );
+        if ( permittedGroups.isEmpty() )
+        {
+            addActionError( getText( "projectBuilds.report.noGroupsAuthorized" ) );
             return REQUIRES_AUTHORIZATION;
         }
 
@@ -172,8 +173,9 @@
             return REQUIRES_AUTHORIZATION;
         }
 
-        if (permittedGroups.isEmpty()) {
-            addActionError( "You are not authorized to view any project groups." );
+        if ( permittedGroups.isEmpty() )
+        {
+            addActionError( getText( "projectBuilds.report.noGroupsAuthorized" ) );
             return REQUIRES_AUTHORIZATION;
         }
 
@@ -187,13 +189,13 @@
         }
         catch ( ParseException e )
         {
-            addActionError( "Error parsing date(s): " + e.getMessage() );
+            addActionError( getText( "projectBuilds.report.badDates", new String[] { e.getMessage() } ) );
             return ERROR;
         }
 
         if ( fromDate != null && toDate != null && fromDate.after( toDate ) )
         {
-            addFieldError( "startDate", "Start Date must be earlier than the End Date" );
+            addFieldError( "startDate", getText( "projectBuilds.report.endBeforeStartDate" ) );
             return INPUT;
         }
 
@@ -225,8 +227,7 @@
 
         if ( filteredResults.size() == MAX_BROWSE_SIZE )
         {
-            addActionMessage( "Results may have been limited due to size."
-                                  + " Refine your search criteria or try exporting." );
+            addActionMessage( getText( "projectBuilds.report.limitedResults" ) );
         }
 
         int resultSize = filteredResults.size();
@@ -234,7 +235,7 @@
 
         if ( page < 1 || page > pageTotal )
         {
-            addActionError( "Specified page does not exist" );
+            addActionError( getText( "projectBuilds.report.invalidPage" ) );
             return ERROR;
         }
 
@@ -261,8 +262,9 @@
             return REQUIRES_AUTHORIZATION;
         }
 
-        if (permittedGroups.isEmpty()) {
-            addActionError( "You are not authorized to view any project groups." );
+        if ( permittedGroups.isEmpty() )
+        {
+            addActionError( getText( "projectBuilds.report.noGroupsAuthorized" ) );
             return REQUIRES_AUTHORIZATION;
         }
 
@@ -276,13 +278,13 @@
         }
         catch ( ParseException e )
         {
-            addActionError( "Error parsing date(s): " + e.getMessage() );
+            addActionError( getText( "projectBuilds.report.badDates", new String[] { e.getMessage() } ) );
             return ERROR;
         }
 
         if ( fromDate != null && toDate != null && fromDate.after( toDate ) )
         {
-            addFieldError( "startDate", "Start Date must be earlier than the End Date" );
+            addFieldError( "startDate", getText( "projectBuilds.report.endBeforeStartDate" ) );
             return INPUT;
         }
 
@@ -384,7 +386,7 @@
         }
         catch ( IOException e )
         {
-            addActionError( "Error occurred while generating CSV file." );
+            addActionError( getText( "projectBuilds.report.exportIOError", new String[] { e.getMessage() } ) );
             return ERROR;
         }
 
diff --git a/continuum-webapp/src/main/resources/localization/Continuum.properties b/continuum-webapp/src/main/resources/localization/Continuum.properties
index 470bb9e..5615683 100644
--- a/continuum-webapp/src/main/resources/localization/Continuum.properties
+++ b/continuum-webapp/src/main/resources/localization/Continuum.properties
@@ -1327,6 +1327,12 @@
 projectBuilds.report.project=Project Name
 projectBuilds.report.buildDate=Build Date
 projectBuilds.report.noResult=No Results Found
+projectBuilds.report.noGroupsAuthorized=You are not authorized to view any project groups.
+projectBuilds.report.limitedResults=Results may have been limited due to size. Refine your search criteria or use export.
+projectBuilds.report.invalidPage=Specified page does not exist.
+projectBuilds.report.exportIOError=There was an input/output error during export: {0}
+projectBuilds.report.badDates=Failed to parse date(s): {0}
+projectBuilds.report.endBeforeStartDate=Invalid date range: start date must be earlier than the end date.
 
 build.project.success=successfully queued build
 build.projects.success=successfully queued builds