roller-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gango...@apache.org
Subject svn commit: r1519237 - in /roller/trunk/app/src: main/java/org/apache/roller/weblogger/ui/struts2/admin/ main/java/org/apache/roller/weblogger/ui/struts2/common/ main/java/org/apache/roller/weblogger/ui/struts2/editor/ main/java/org/apache/roller/weblo...
Date Sun, 01 Sep 2013 00:35:31 GMT
Author: gangolli
Date: Sun Sep  1 00:35:30 2013
New Revision: 1519237

URL: http://svn.apache.org/r1519237
Log:
Internationalization cleanup for cases where addError and addMessage were being used with
directly concatenated strings.  Added properties for strings where required, and removed some
duplicated properties.  Fixed up UIAction.cleanText to handle %{} expressions as well.  [Note:
my IDE also indicates several unreferenced ApplicationResources property keys, but I have
not cleaned them up in this revision.]

Modified:
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/admin/CommonPingTargets.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/admin/GlobalCommentManagement.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/common/PingTargetEditBase.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/common/PingTargetsBase.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/MediaFileAdd.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/MediaFileBase.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/MediaFileEdit.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/Members.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/TemplateRemove.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/WeblogRemove.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/util/UIAction.java
    roller/trunk/app/src/main/resources/ApplicationResources.properties
    roller/trunk/app/src/test/java/org/apache/roller/weblogger/ui/struts2/util/UIActionTest.java

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/admin/CommonPingTargets.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/admin/CommonPingTargets.java?rev=1519237&r1=1519236&r2=1519237&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/admin/CommonPingTargets.java
(original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/admin/CommonPingTargets.java
Sun Sep  1 00:35:30 2013
@@ -65,8 +65,7 @@ public class CommonPingTargets extends P
             setPingTargets(pingTargetMgr.getCommonPingTargets());
         } catch (WebloggerException ex) {
             log.error("Error loading common ping targets", ex);
-            // TODO: i18n
-            addError("Error loading common ping targets");
+            addError("commonPingTargets.error.loading");
         }
     }
     
@@ -85,12 +84,10 @@ public class CommonPingTargets extends P
                 WebloggerFactory.getWeblogger().flush();
             } catch (Exception ex) {
                 getLogger().error("Error saving ping target", ex);
-                // TODO: i18n
-                addError("Error saving ping target.");
+                addError("commonPingTargets.error.saving");
             }
         } else {
-            // TODO: i18n
-            addError("Cannot enable ping target - "+getPingTargetId());
+            addError("commonPingTargets.error.enabling");
         }
         
         return LIST;
@@ -111,12 +108,10 @@ public class CommonPingTargets extends P
                 WebloggerFactory.getWeblogger().flush();
             } catch (Exception ex) {
                 getLogger().error("Error saving ping target", ex);
-                // TODO: i18n
-                addError("Error saving ping target.");
+                addError("commonPingTargets.error.saving");
             }
         } else {
-            // TODO: i18n
-            addError("Cannot disable ping target - "+getPingTargetId());
+            addError("commonPingTargets.error.disabling");
         }
         
         return LIST;

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/admin/GlobalCommentManagement.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/admin/GlobalCommentManagement.java?rev=1519237&r1=1519236&r2=1519237&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/admin/GlobalCommentManagement.java
(original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/admin/GlobalCommentManagement.java
Sun Sep  1 00:35:30 2013
@@ -122,8 +122,7 @@ public class GlobalCommentManagement ext
             }
         } catch (WebloggerException ex) {
             log.error("Error looking up comments", ex);
-            // TODO: i18n
-            addError("Error looking up comments");
+            addError("commentManagement.lookupError");
         }
         
         // build comments pager
@@ -201,8 +200,7 @@ public class GlobalCommentManagement ext
             
         } catch (WebloggerException ex) {
             log.error("Error looking up comments", ex);
-            // TODO: i18n
-            addError("Error looking up comments");
+            addError("commentManagement.lookupError");
         }
         
         return LIST;
@@ -224,8 +222,7 @@ public class GlobalCommentManagement ext
                     getBean().getEndDate(),
                     getBean().getStatus());
             
-            // TODO: i18n
-            addMessage("Successfully deleted "+deleted+" comments");
+            addMessage("commentManagement.deleteSuccess",Integer.toString(deleted));
             
             // reset form and load fresh comments list
             setBean(new GlobalCommentManagementBean());
@@ -234,8 +231,7 @@ public class GlobalCommentManagement ext
             
         } catch (WebloggerException ex) {
             log.error("Error doing bulk delete", ex);
-            // TODO: i18n
-            addError("Bulk delete failed due to unexpected error");
+            addError("commentManagement.deleteError");
         }
         
         return LIST;

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/common/PingTargetEditBase.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/common/PingTargetEditBase.java?rev=1519237&r1=1519236&r2=1519237&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/common/PingTargetEditBase.java
(original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/common/PingTargetEditBase.java
Sun Sep  1 00:35:30 2013
@@ -58,13 +58,11 @@ public abstract class PingTargetEditBase
             }
             
             if(getPingTarget() == null) {
-                // TODO: i18n
-                addError("No such ping target id: " + getBean().getId());
+                addError("pingTarget.notFound", getBean().getId());
             }
             
         } else {
-            // TODO: i18n
-            addError("Missing ping target id: " + getBean().getId());
+            addError("pingTarget.unspecified");
         }
     }
     

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/common/PingTargetsBase.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/common/PingTargetsBase.java?rev=1519237&r1=1519236&r2=1519237&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/common/PingTargetsBase.java
(original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/common/PingTargetsBase.java
Sun Sep  1 00:35:30 2013
@@ -88,8 +88,7 @@ public abstract class PingTargetsBase ex
             
             return "confirm";
         } else {
-            // TODO: i18n
-            addError("Cannot delete ping target: " + getPingTargetId());
+            addError("pingTarget.notFound",getPingTargetId());
         }
         
         return LIST;
@@ -111,17 +110,14 @@ public abstract class PingTargetsBase ex
                 // remove deleted target from list
                 getPingTargets().remove(getPingTarget());
                 
-                // TODO: i18n
-                addMessage("Successfully deleted ping target: "+getPingTarget().getName());
+                addMessage("pingTarget.successfullyDeleted", getPingTarget().getName());
                 
             } catch (WebloggerException ex) {
                 getLogger().error("Error deleting ping target - "+getPingTargetId(), ex);
-                // TODO: i18n
-                addError("Error deleting ping target - "+getPingTargetId());
+                addError("pingTarget.errorDeleting", getPingTargetId());
             }
         } else {
-            // TODO: i18n
-            addError("Cannot delete ping target: " + getPingTargetId());
+            addError("pingTarget.notFound", getPingTargetId());
         }
         
         return LIST;

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/MediaFileAdd.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/MediaFileAdd.java?rev=1519237&r1=1519236&r2=1519237&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/MediaFileAdd.java
(original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/MediaFileAdd.java
Sun Sep  1 00:35:30 2013
@@ -186,9 +186,9 @@ public class MediaFileAdd extends MediaF
                         uploaded.add(mediaFile);
 
                     } catch (Exception e) {
-                        log.error("Error saving new entry", e);
+                        log.error("Error uploading media file", e);
                         // TODO: i18n
-                        addError("Error reading uploaded file - " + bean.getName());
+                        addError("mediaFileAdd.errorUploading", bean.getName());
                     }
                 }
 

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/MediaFileBase.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/MediaFileBase.java?rev=1519237&r1=1519236&r2=1519237&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/MediaFileBase.java
(original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/MediaFileBase.java
Sun Sep  1 00:35:30 2013
@@ -62,8 +62,7 @@ public class MediaFileBase extends UIAct
             addMessage("mediaFile.delete.success");
         } catch (WebloggerException e) {
             log.error("Error deleting media file", e);
-            // TODO: i18n
-            addError("Error deleting media file - " + this.mediaFileId);
+            addError("mediaFile.delete.error",this.mediaFileId);
         }
     }
 
@@ -83,8 +82,7 @@ public class MediaFileBase extends UIAct
             addMessage("mediaFile.includeInGallery.success");
         } catch (WebloggerException e) {
             log.error("Error including media file in gallery", e);
-            // TODO: i18n
-            addError("Error including media file in gallery - " + this.mediaFileId);
+            addError("mediaFile.includeInGallery.error",this.mediaFileId);
         }
     }
 
@@ -124,8 +122,7 @@ public class MediaFileBase extends UIAct
 
         } catch (WebloggerException e) {
             log.error("Error deleting selected media files", e);
-            // TODO: i18n
-            addError("Error deleting selected media files");
+            addError("mediaFile.delete.error");
         }
     }
 
@@ -166,8 +163,7 @@ public class MediaFileBase extends UIAct
 
         } catch (WebloggerException e) {
             log.error("Error moving selected media files", e);
-            // TODO: i18n
-            addError("Error moving selected media files");
+            addError("mediaFile.move.errors");
         }
     }
 

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/MediaFileEdit.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/MediaFileEdit.java?rev=1519237&r1=1519236&r2=1519237&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/MediaFileEdit.java
(original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/MediaFileEdit.java
Sun Sep  1 00:35:30 2013
@@ -102,9 +102,8 @@ public class MediaFileEdit extends Media
             addError("uploadFiles.error.upload", bean.getName());
 
         } catch (Exception e) {
-            log.error("Error saving new entry", e);
-            // TODO: i18n
-            addError("Error reading uploaded file - " + bean.getName());
+            log.error("Error uploading file " + bean.getName(), e);
+            addError("uploadFiles.error.upload", bean.getName());
         }
 
         return INPUT;
@@ -151,9 +150,8 @@ public class MediaFileEdit extends Media
                 addError("uploadFiles.error.upload", bean.getName());
 
             } catch (Exception e) {
-                log.error("Error saving new entry", e);
-                // TODO: i18n
-                addError("Error reading uploaded file - " + bean.getName());
+                log.error("Error uploading file " + bean.getName(), e);
+                addError("uploadFiles.error.upload", bean.getName());
             }
 
         }

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/Members.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/Members.java?rev=1519237&r1=1519236&r2=1519237&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/Members.java
(original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/Members.java
Sun Sep  1 00:35:30 2013
@@ -130,15 +130,14 @@ public class Members extends UIAction im
             
         } catch (Exception ex) {
             log.error("Error saving permissions on weblog - "+getActionWeblog().getHandle(),
ex);
-            // TODO: i18n
-            addError("Error saving permissions");
+            addError("memberPermissions.saveError");
         }
         
         if (removed > 0) {
-            addMessage("memberPermissions.membersRemoved", ""+removed);
+            addMessage("memberPermissions.membersRemoved", Integer.toString(removed));
         }
         if (changed > 0) {
-            addMessage("memberPermissions.membersChanged", ""+changed);
+            addMessage("memberPermissions.membersChanged", Integer.toString(changed));
         }
         
         return LIST;

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/TemplateRemove.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/TemplateRemove.java?rev=1519237&r1=1519236&r2=1519237&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/TemplateRemove.java
(original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/TemplateRemove.java
Sun Sep  1 00:35:30 2013
@@ -66,8 +66,7 @@ public class TemplateRemove extends UIAc
 			} catch (WebloggerException ex) {
 				log.error("Error looking up template by id - " + getRemoveId(),
 						ex);
-				// TODO: i18n
-				addError("Could not find template to remove - " + getRemoveId());
+				addError("editPages.remove.notFound", getRemoveId());
 			}
 	}
 
@@ -129,14 +128,12 @@ public class TemplateRemove extends UIAc
 
 					return SUCCESS;
 				} else {
-					// TODO: i18n
-					addError("Cannot remove required template");
+					addError("editPages.remove.requiredTemplate");
 				}
 
 			} catch (Exception ex) {
 				log.error("Error removing page - " + getRemoveId(), ex);
-				// TODO: i18n
-				addError("Error removing page");
+				addError("editPages.remove.error");
 			}
 
 		return "confirm";

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/WeblogRemove.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/WeblogRemove.java?rev=1519237&r1=1519236&r2=1519237&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/WeblogRemove.java
(original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/WeblogRemove.java
Sun Sep  1 00:35:30 2013
@@ -66,14 +66,12 @@ public class WeblogRemove extends UIActi
 
             CacheManager.invalidate(getActionWeblog());
 
-            // TODO: i18n
-            addMessage("Successfully removed weblog - " + getActionWeblog().getName());
+            addMessage("websiteRemove.success", getActionWeblog().getName());
 
             return SUCCESS;
         } catch (Exception ex) {
             log.error("Error removing weblog - " + getActionWeblog().getHandle(), ex);
-            // TODO: i18n
-            addError("Error removing weblog");
+            addError("websiteRemove.error", getActionWeblog().getName());
         }
 
         return "confirm";

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/util/UIAction.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/util/UIAction.java?rev=1519237&r1=1519236&r2=1519237&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/util/UIAction.java
(original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/util/UIAction.java
Sun Sep  1 00:35:30 2013
@@ -35,9 +35,12 @@ import org.apache.struts2.interceptor.Re
 import java.text.DateFormat;
 import java.text.SimpleDateFormat;
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.Collections;
 import java.util.List;
 import java.util.Map;
+import java.util.Set;
+import java.util.HashSet;
 
 /**
  * Extends the Struts2 ActionSupport class to add in support for handling an
@@ -387,19 +390,21 @@ public abstract class UIAction extends A
         return opts;
     }
 
-    private static String cleanDollarExpressions(String s) {
-        // Remove ${ } expressions; handcoded automaton
+    private static Set OPEN_CHARS = new HashSet(Arrays.asList('$', '%'));
+
+    private static String cleanExpressions(String s) {
         StringBuilder cleaned = new StringBuilder(s.length());
         boolean skipping = false;
         int braceDepth = 0;
         int p = 0;
-        char prior = ' ';
+        Character prior = ' ';
         while (p < s.length()) {
+            boolean priorIsOpenChar = OPEN_CHARS.contains(prior);
             char c = s.charAt(p);
             switch (c) {
                 case '{':
                     ++braceDepth;
-                    skipping = skipping || (prior == '$');
+                    skipping = skipping || priorIsOpenChar;
                     break;
                 case '}':
                     if (braceDepth > 0) --braceDepth;
@@ -407,20 +412,20 @@ public abstract class UIAction extends A
                 default:
             }
             if (!skipping) {
-                if (prior == '$') cleaned.append(prior);
-                if (c != '$')  cleaned.append(c);
+                if (priorIsOpenChar) cleaned.append(prior);
+                if (!OPEN_CHARS.contains(c))  cleaned.append(c);
             }
             skipping = skipping && (braceDepth > 0);
             prior = c;
             ++p;
         }
-        if (prior == '$') cleaned.append(prior);  // string had final $ held in prior
+        if (OPEN_CHARS.contains(prior)) cleaned.append(prior);  // string had final open
character held in prior
         return cleaned.toString();
     }
 
     public static String cleanText(String s) {
         if (s == null || s.isEmpty()) return s;
         // escape HTML
-        return StringEscapeUtils.escapeHtml(cleanDollarExpressions(s));
+        return StringEscapeUtils.escapeHtml(cleanExpressions(s));
     }
 }

Modified: roller/trunk/app/src/main/resources/ApplicationResources.properties
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/resources/ApplicationResources.properties?rev=1519237&r1=1519236&r2=1519237&view=diff
==============================================================================
--- roller/trunk/app/src/main/resources/ApplicationResources.properties (original)
+++ roller/trunk/app/src/main/resources/ApplicationResources.properties Sun Sep  1 00:35:30
2013
@@ -250,7 +250,6 @@ comment.validator.akismetMessage=Akismet
 # -------------------------------------------------------- comments-preview.jsp
 
 comments.preview.title=Comment
-comments.preview=PREVIEW
 comments.preview.edit=Edit your comment
 
 # -------------------------------------------------------- comments-display.jsp
@@ -300,7 +299,9 @@ commentManagement.startDate=Start date
 commentManagement.bulkDeletePrompt1=Your query matched {0} comments, 
 commentManagement.bulkDeletePrompt2=delete them all?
 commentManagement.confirmBulkDelete=Are you sure you want to delete all {0} selected by your
query?
+commentManagement.lookupError=Error looking up comments
 commentManagement.deleteSuccess=Successfully deleted {0} comments
+commentManagement.deleteError=Bulk delete failed due to unexpected error
 
 commentManagement.pendingStatus=Pending status
 commentManagement.onlyPending=Pending only
@@ -984,7 +985,6 @@ directory.
 mediaFileAdd.title=Add new media file(s)
 mediaFileAdd.pageTip=Use this page to upload up to five new media files. \
 Form fields that you set below will be applied to all files uploaded.
-mediaFileAdd.multipleNames
 mediaFileAdd.fileLocation=Choose file to upload
 mediaFileAdd.name=Name
 mediaFileAdd.description=Description
@@ -994,7 +994,7 @@ mediaFileAdd.directory=Directory
 mediaFileAdd.includeGallery=Include in Gallery?
 mediaFileAdd.upload=Upload
 mediaFileAdd.multipleNames=(Multiple names)
-
+mediaFileAdd.errorUploading=Error uploading file {0}
 
 #--- Media File Success
 
@@ -1007,8 +1007,7 @@ them in your post as thumbnails. For oth
 be attached to the new post as an enclosure (i.e. a podcast).
 mediaFileSuccess.uploaded=Uploaded Successfully
 mediaFileSuccess.createPost=Create a weblog post using your new upload
-mediaFileSuccess.addAnother=Add another media file
-mediaFileSuccess.createPost=Create Post
+mediaFileSuccess.addAnother=Upload another media file
 mediaFileSuccess.createPostPrompt=Once you have selected the file(s) you want, \
 click the button to create your new weblog entry.
 mediaFileSuccess.noEnclosure=No enclosure
@@ -1025,7 +1024,6 @@ mediaFileSuccess.pixels=pixels
 mediaFileSuccess.bytes=bytes
 
 mediaFileSuccess.noThanks=<b>Not interested?</b> Here are some other options:
-mediaFileSuccess.addAnother=Upload another media file
 mediaFileSuccess.mediaFileView=Return to Media File View
 
 
@@ -1058,7 +1056,6 @@ mediaFile.createPodcastPost=Post in webl
 mediaFileEdit.permalink=Link (URL)
 mediaFileEdit.linkTitle=Link to Media File, opens in new window
 mediaFileEdit.copyToClipboard=Copy Link (URL) to Clipboard
-
 mediaFileEdit.includesEnclosure=This weblog entry includes the following media file enclosure:
 
 
@@ -1124,7 +1121,6 @@ mediaFileView.filesTagged=Files with tag
 mediaFileView.noFiles=No files in this directory.
 
 mediaFileView.path=Path:
-mediaFileView.search=Search
 mediaFileView.reset=Reset
 
 
@@ -1140,10 +1136,14 @@ mediaFile.search.title=Search media file
 mediaFile.delete.confirm=Delete selected media files and/or directories?
 mediaFile.move.confirm=Move selected media files?
 mediaFile.directoryCreate.success=New directory successfully created.
-mediaFile.includeInGallery.success = Media file(s) successfully included in gallery.
-mediaFile.delete.success = Media file(s) successfully deleted.
-mediaFile.move.success = Media file(s) successfully moved.
-mediaFile.update.success = Media file successfully updated.
+mediaFile.includeInGallery.success=Media file(s) successfully included in gallery.
+mediaFile.includeInGallery.error=Error including media file {0} in gallery.
+mediaFile.delete.success=Media file(s) successfully deleted.
+mediaFile.delete.error=Error deleting media file {0}.
+mediaFile.delete.errors=Error deleting media files.
+mediaFile.move.success=Media file(s) successfully moved.
+mediaFile.move.errors=Error moving media files.
+mediaFile.update.success=Media file successfully updated.
 
 
 
@@ -1187,6 +1187,7 @@ memberPermissions.confirmRemove=Are you 
 weblog?
 
 memberPermissions.button.save=Save
+memberPermissions.saveError=Error saving permissions
 
 memberPermissions.inviteMember=Invite new member
 memberPermissions.whyInvite=Invite somebody to help you write your weblog.
@@ -1288,6 +1289,9 @@ pagesForm.emptyPage=Empty template...
 pagesForm.themesReminder=<b>Reminder:</b> You are currently using the {0} shared
\
 theme, so some template edits may not effect how your blog looks.
 editPages.title.removeOK=Confirm remove of template
+editPages.remove.notFound=Template id {0} was not found
+editPages.remove.requiredTemplate=You cannot remove a required template
+editPages.remove.error=Error removing template
 
 pagesForm.launch=preview
 pagesForm.outputContentType=Type
@@ -1358,10 +1362,16 @@ Template.error.actionNull=The Action is 
 
 # ---------------------------------------------------- Ping Target Admin/Editing
 
+
+
 commonPingTargets.subtitle=Manage common weblog ping targets for all weblogs.
 commonPingTargets.commonPingTargets=Common Weblog Ping Targets
 commonPingTargets.explanation=These target sites are available to all weblogs \
 for weblog update pings.
+commonPingTargets.error.loading=Error loading common ping targets
+commonPingTargets.error.saving=Error saving common ping targets
+commonPingTargets.error.enabling=Error enabling ping target
+commonPingTargets.error.disabling=Error disabling ping target
 
 customPingTargets.customPingTargets=Custom Weblog Ping Targets
 customPingTargets.subtitle=Manage custom ping targets for weblog <span>{0}</span>
@@ -1442,6 +1452,10 @@ pingTarget.nameNotUnique=The name of thi
 the same set of targets.
 pingTarget.malformedUrl=The URL is not properly formed.
 pingTarget.unknownHost=The hostname in this URL doesn''t seem to exist.
+pingTarget.unspecified=No ping target id was specified in the request
+pingTarget.notFound=Ping target id {0} was not found
+pingTarget.errorDeleting=Error deleting ping target id {0}
+pingTarget.successfullyDeleted=Successfully deleted ping target {0}
 
 # --------------------------------------------------------------- Planet Roller
 
@@ -2359,6 +2373,8 @@ websiteRemove.subtitle=Weblog removal is
 websiteRemove.youSure=Are you sure you want to remove weblog [{0}]?
 websiteRemove.websiteId=Weblog ID
 websiteRemove.websiteName=Weblog Name
+websiteRemove.success=Successfully removed weblog [{0}]
+websiteRemove.error=Error removing weblog [{0}]
 
 websiteSettings.label1=Default Entry Formatters 
 websiteSettings.label2=(applied in the listed order)

Modified: roller/trunk/app/src/test/java/org/apache/roller/weblogger/ui/struts2/util/UIActionTest.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/test/java/org/apache/roller/weblogger/ui/struts2/util/UIActionTest.java?rev=1519237&r1=1519236&r2=1519237&view=diff
==============================================================================
--- roller/trunk/app/src/test/java/org/apache/roller/weblogger/ui/struts2/util/UIActionTest.java
(original)
+++ roller/trunk/app/src/test/java/org/apache/roller/weblogger/ui/struts2/util/UIActionTest.java
Sun Sep  1 00:35:30 2013
@@ -38,21 +38,29 @@ public class UIActionTest extends TestCa
         assertEquals("",UIAction.cleanText(""));
     }
 
-    public void testCleanTextDollarExpressions() {
+    public void testCleanExpressions() {
         assertEquals(null,UIAction.cleanText(null));
         assertEquals("",UIAction.cleanText(""));
         assertEquals("a",UIAction.cleanText("a"));
         assertEquals("$",UIAction.cleanText("$"));
+        assertEquals("%",UIAction.cleanText("%"));
+        assertEquals("%$",UIAction.cleanText("%$"));
         assertEquals("{",UIAction.cleanText("{"));
         assertEquals("}",UIAction.cleanText("}"));
         assertEquals("",UIAction.cleanText("${"));
+        assertEquals("",UIAction.cleanText("%{"));
         assertEquals("text$",UIAction.cleanText("text$"));
+        assertEquals("text%",UIAction.cleanText("text%"));
         assertEquals("text something   more", UIAction.cleanText("text something ${ more
} ${ and more } more"));
-        assertEquals("text  more", UIAction.cleanText("text ${ something ${ more } ${ and
more } } more"));
-        assertEquals("text %{1} text %{2} more", UIAction.cleanText("text %{1} text${2} %{2}
more"));
+        assertEquals("text something   more", UIAction.cleanText("text something %{ more
} %{ and more } more"));
+        assertEquals("text  more", UIAction.cleanText("text %{ something ${ more } ${ and
more } } more"));
+        assertEquals("text {1} text {2} more", UIAction.cleanText("text {1} text${2} {2}
more"));
+        assertEquals("text  text {2} more", UIAction.cleanText("text %{1} text${2} {2} more"));
         assertEquals("already { clean }", UIAction.cleanText("already { clean }"));
         assertEquals("$signs but not immediately followed by { braces }", UIAction.cleanText("$signs
but not immediately followed by { braces }"));
-        assertEquals("clean", UIAction.cleanText("${part { } }clean${anything}"));
+        assertEquals("%signs but not immediately followed by { braces }", UIAction.cleanText("%signs
but not immediately followed by { braces }"));
+        assertEquals("clean", UIAction.cleanText("${part %{ } }clean${%anything}"));
+        assertEquals("clean", UIAction.cleanText("%{part ${} }clean${%anything}"));
     }
 
     public void testCleanTextHtml() {



Mime
View raw message