[
https://issues.apache.org/jira/browse/VELTOOLS-113?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12672524#action_12672524
]
Sergiy Kovalchuk commented on VELTOOLS-113:
-------------------------------------------
I thought plural method could be used like this for example:
You have: $item_count $display.plural($item_count, "item") in your shopping cart
or
This article has $comment_count $display.plural($comment_count, "comment")
So you don't have to write something like this for all your counters:
You have: $item_count #if($item_count == 1) item #else items #end in your
shopping cart
I will create unit tests, just I can't figure out how to run them... If I go
"Run as">"Maven test" it says "There are no tests to run." I would appreciate
if someone can point out how to launch them (I am using Eclipse with Maven
plugin under windows). Also package declarations look wrong in test files
(package org.apache.velocity.tools.generic; instead of package
org.apache.velocity.tools;)
> new DisplayTool features
> ------------------------
>
> Key: VELTOOLS-113
> URL: https://issues.apache.org/jira/browse/VELTOOLS-113
> Project: Velocity Tools
> Issue Type: New Feature
> Components: GenericTools
> Reporter: Nathan Bubna
> Priority: Minor
>
> More ideas from the dev list:
> ----------------------------------------------------------------------------------------------
> On Sat, Feb 7, 2009 at 3:41 PM, <[email protected]> wrote:
> Hello,
> I wanted to share with you a few ideas I have about new simple
> improvements for DisplayTools. I should be able to make patches for
> them if you are interested.
> #snip
> 2. Add new "property" parameter to
> list(Object list, String delim, String finaldelim, String property)
> method that will format an array or collection of objects on selected
> property (similar to SortTools).
> 3. Add new method:
> stripTags(Object obj, String... allowedTags)
> that will strip all (html) tags from the text except those listed in
> allowedTags (allowed tags are passed like this: "br","img","p").
> 4. Add new method:
> br(Object obj)
> that will replace \n with "<br />\n"
> 5. Add new "preserveWords" parameter to:
> truncate(Object truncateMe, int maxLength, String suffix, boolean
> preserveWords)
> that will truncate a string to a last complete word within maxLength
> instead of exact character.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]