# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements.  See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership.  The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License.  You may obtain a copy of the License at
#
#   http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied.  See the License for the
# specific language governing permissions and limitations
# under the License.

## text.vm demo
foo = bar
hello.whoever = Hello {0}!
world = World

appname = Showcase

## Error.vm
error.header = There has been an error!
error.sorry = There has been an error!

## Default.vm
css.name = CSS Layout
css.issuesHeader = Known Issues
css.issues = This layout fails in IE4.5/Mac. That browser has poor support for CSS absolute positioning, yet it recognizes and executes the CSS @import statement used to hide CSS from broken browsers. Currently, there is no known solution.
css.niftyHeader = Nifty Layout Techniques
css.nifty = All sorts of nifty layout can be accomplished using cascading style sheets (CSS). Check out <a href="http://www.bluerobot.com" title="BlueRobot layout Resource">bluerobot.com</a> and the <a href="http://www.bluerobot.com/web/layouts/">Layout Reservoir</A> 

## Print.vm
print.name = Print Layout

## Simple.vm
simple.name = Simple Layout

## Table.vm
table.name = Table Layout

## index.vm
index.greeting = Hi
index.explanation = This is a demo application meant to showcase the abilities of \
the various tools provided by the VelocityTools library, as well \
as some best practices for using them with the VelocityView servlets.
index.start = To begin, choose a tool from the menu.
index.asterisk = With the exception of the way we abuse the RenderTool and \
Velocimacros. They''ve been stretched pretty far in order to allow the content \
to be very rapidly developed and more user-interactive than is usually needed. \
This has entailed the loss of some performance and much clarity.  As such, the \
way we use these two facilities should probably not be considered a best practice. :)

## layoutmenu.vm
layouts.header = Choose a layout
layouts.css = CSS Layout
layouts.simple = Simple Layout
layouts.table = Table Layout
layouts.print = Print Layout

## toolmenu.vm
tools.header = Choose a tool
tools.alternator = AlternatorTool
tools.browser = BrowserTool
tools.class = ClassTool
tools.context = ContextTool
tools.convert = ConversionTool
tools.cookies = CookieTool
tools.date = DateTool
tools.display = DisplayTool
tools.esc = EscapeTool
tools.field = FieldTool
tools.include = IncludeTool
tools.import = ImportTool
tools.link = LinkTool
tools.lists = ListTool
tools.math = MathTool
tools.loop = LoopTool
tools.number = NumberTool
tools.pager = PagerTool
tools.params = ParameterTool
tools.render = RenderTool
tools.text = ResourceTool
tools.search = SearchTool
tools.sorter = SortTool
tools.xml = XmlTool

## demo common resources
demo.function = Function
demo.result = Demo Result
demo.nullResult = null
demo.clear = Clear All
demo.description = Description
demo.descriptionMissing = TODO: add {0} = [description] to resources.properties
demo.try = Go
demo.tryAgain = Go
demo.tryAnything = Try any code out here.
demo.thisPage = This page demonstrates functions of the {0}
demo.mainExampleHeader = Example Display
demo.mainResultsIntro = Your code returned the following results
demo.toString = Returns a customized string representation of the tool.

# alternator.vm resources
alternator.intro = The <a href="#fullDemo">example</a> at the bottom is a good \
    demonstration of the difference between an automatic {0} and a manual one. \
    <br><br>Please see the javadoc for {0} to understand how they work and the methods \
    you can call on them. \
    <br><br>Also note that the varargs methods here only work fully with Velocity 1.6 \
    (which supports vararg method calls).  The old non-vararg versions are still \
    available (as seen in the <a href="#fullDemo">demo below</a>).  But they are \
    deprecated (and thus not listed below) to discourage those extending this \
    tool or using it outside Velocity templates from depending on those methods.
alternator.getAutoAlternateDefault = Returns <code>true</code> if Alternators created by this tool will auto-alternate by default.
alternator.make = Returns a new, default Alternator that alternates over the specified values.
alternator.make_booleanObjectVarArgs = Returns a new Alternater that alternates of the specified values using the specified auto-alternate setting.
alternator.auto = Returns a new, automatically alternating Alternator that alternates over the specified values.
alternator.auto_ObjectVarArgs.param1 = [''b'',''c'',''a'']
alternator.manual = Returns a new, manually alternating Alternator that alternates over the specified values.
alternator.manual_ObjectVarArgs.param1 = [''red'',''green'']
alternator.custom = $alternator.make([''b'',''c'',''a''])

# class.vm resources
class.intro = By default, the ClassTool is set to inspect \
    <code>java.lang.Object</code>, though you may set the "inspect" \
    property in your ClassTool configuration to point to any class on the classpath. \
    Also, a new ClassTool instance can be created for any class you wish \
    by a call to one of the inspect() methods. \
    By default, the <code>safeMode</code> property is set to <code>true</code> unless you \
    configure it to be <code>false</code>. \
    When <code>true</code>, safeMode will restrict ClassTool (or any instances it creates) to \
    only inspecting classes, methods, fields and constructors that were declared <code>public</code>.
class.getAnnotations = Returns a list of the <code>Annotations</code> of the class being inspected.
class.getConstructors = Returns a list of <code>ConstructorSub</code>s for each constructor declared in the inspected class.
class.getFields = Returns a list of <code>FieldSub</code>s for each field declared in the inspected class.
class.getFullName = Returns the fully qualified name of the class being inspected.
class.getMethods = Returns a list of <code>MethodSub</code>s for each method declared in the inspected class.
class.getName = Returns the simple name of the class being inspected.
class.getPackage = Returns the package name of the class being inspected.
class.getShowDeprecated = Returns the current showDeprecated setting.
class.getSafeMode = Returns the current safeMode setting.
class.getType = Returns the actual <code>Class</code> being inspected.
class.getTypes = Returns a <code>Set</code> of all <code>Class</code>es that are part of the signatures (i.e. parameters or return types) of the inspected Class''s methods, constructors and fields.
class.getSuper = Returns a new ClassTool instance that inspects the immediate superclass of the class being inspected.
class.inspect_Class = Returns a new ClassTool instance that inspects the specified Class.
class.inspect_Class.param1 = $class.class
class.inspect_Object = Returns a new ClassTool instance that inspects the Class of the specified object.
class.inspect_Object.param1 = $class
class.inspect_String = Returns a new ClassTool instance that inspects the Class for the specified class name \
    or <code>null</code> if no class can be found for the specified name.
class.inspect_String.param1 = ''org.apache.velocity.tools.generic.ClassTool''
class.isAbstract = Returns <code>true</code> if the class being inspected is abstract.
class.isFinal = Returns <code>true</code> if the class being inspected is final.
class.isInterface = Returns <code>true</code> if the class being inspected is an interface.
class.isPrivate = Returns <code>true</code> if the class being inspected is private.
class.isProtected = Returns <code>true</code> if the class being inspected is protected.
class.isPublic = Returns <code>true</code> if the class being inspected is public.
class.isStatic = Returns <code>true</code> if the class being inspected is static.
class.isStrict = Returns <code>true</code> if the class being inspected is declared strict.
class.supportsNewInstance = Returns <code>true</code> if a new instance of the class being inspected can be created via $class.type.newInstance().
class.toString = Returns the result of $class.type.toString().

# context.vm resources
context.intro = This tool exists to provide access to the current context and various attributes of it.
context.getThis = Returns the <code>ViewContext</code> currently being analyzed by this tool.
context.contains = Returns <code>true</code> if there is a value available in the current request context for the specified key.
context.get = Returns the value for the specified key in the current request context.
context.getKeys = Returns a java.util.Set of the keys available in the current request context
context.getToolbox = Returns a java.util.Map of the tools available in the current request context and their context keys.
context.getValues = Returns a java.util.Set of the values available in the current request context.

# convert.vm resources
convert.intro = This tool aids in converting Strings (or other objects) to more useful types.
convert.getDateFormat = The default configured Date format string.
convert.getNumberFormat = The default configured Number format string.
convert.getStringsDelimiter = The delimiter used to identify separate values in any of the pluralized methods below.
convert.getStringsTrim = Whether or not whitespace is trimmed off of Strings passed in before they are used.
convert.toString = Converts an object to an instance of String if the object is not already an instance of String.
convert.toString.param1 = $convert
convert.toStrings = Converts an array, Collection, delimited String, or object to an array of Strings.
convert.toStrings.Object = [true,false]
convert.toBoolean = Converts an object to an instance of Boolean if the object is not already an instance of Boolean.
convert.toBoolean.Object = ''true''
convert.toBooleans = Converts an array, Collection, delimited String, or object to an array of Booleans.
convert.toBooleans.Object = ''false,true''
convert.toLocale = Converts an object to an instance of Locale if the object is not already an instance of Locale.
convert.toLocale.Object = ''en_US''
convert.toLocales = Converts an array, Collection, delimited String, or object to an array of Locales.
convert.toLocales.Object = ''en_US,fr''
convert.toInteger = Converts an object to an instance of Integer using the format returned by $convert.numberFormat and the Locale returned by $convert.locale if the object is not already an instance of Integer.
convert.toInteger.Object = 1.2
convert.toInts = Converts an array, Collection, delimited String, or object to an array of Ints.
convert.toInts.Object = ''1.2,2.3,3.4''
convert.toDouble = Converts an object to an instance of Double using the format returned by $convert.numberFormat and the Locale returned by $convert.locale if the object is not already an instance of Double.
convert.toDouble.Object = 1
convert.toDoubles = Converts an array, Collection, delimited String, or object to an array of Doubles.
convert.toDoubles.Object = ''1,2.3''
convert.toNumber = Converts an object to an instance of Number using the format returned by $convert.numberFormat and the Locale returned by $convert.locale if the object is not already an instance of Number.
convert.toNumber.Object = $date.date
convert.toNumbers = Converts an array, Collection, delimited String, or object to an array of Numbers.
convert.toNumbers.Object = ''1,2.3''
convert.parseNumber_String = Parses the specified String to an instance of Number using the default Locale (as returned by $convert.locale).
convert.parseNumber_String.param1 = ''10.2''
convert.parseNumber_StringObject = Parses a String to an instance of Number using the specified format and the Locale returned by $convert.locale.
convert.parseNumber.String =
convert.parseNumber_StringStringObject = Parses a String to an instance of Number using the specified format and Locale.
convert.toDate = Converts an object to an instance of Date using the format returned by $convert.dateFormat and the Locale returned by $convert.locale.
convert.toDate.Object = ''2009-01-31''
convert.toDates = Converts an array, Collection, delimited String, or object to an array of Dates.
convert.toDates.Object = ''2009-01-31,2006-07-17''
convert.parseDate_String = Parses the specified String to an instance of Date using the default format and Locale.
convert.parseDate_String.param1 = ''2006-07-17''
convert.parseDate_StringObject = Parses a String to an instance of Date using the specified format and the Locale returned by $convert.locale.
convert.parseDate_StringObject.param1 = ''8-1-79''
convert.parseDate_StringObject.param2 = ''M-d-yy''
convert.parseDate_StringStringObject = Parses a String to an instance of Date using the specified format and Locale
convert.parseDate.String = 
convert.parseDate_StringStringObjectTimeZone = Parses a String to an instance of Date using the specified format, Locale and TimeZone
convert.toCalendar = Converts an object to an instance of Calendar using the format returned by $convert.dateFormat and the Locale returned by $convert.locale.
convert.toCalendar.Object = $date
convert.toCalendars = Converts an array, Collection, delimited String, or object to an array of Calendars.
convert.toCalendars.Object = ''2009-01-31,2006-07-17''

# cookies.vm resources
cookies.intro = Remember, when adding a cookie, it is <b>not</b> added \
to the same request which does the adding.  This means to see a cookie \
you''ve added, you must add it, and then refresh the page again.
cookies.getAll = Returns a list of Cookies for this request.
cookies.get = Returns the Cookie with the specified name, if it exists.
cookies.add_Cookie = Adds the cookie to the HttpServletResponse.  This does <b>NOT</b> add it to the current request.
cookies.add_Cookie.param1 = $cookies.create(''test'',''test'')
cookies.add_StringString = Adds a new Cookie with the specified name and value to the HttpServletResponse.  This does <b>not</b> add a Cookie to the current request.
cookies.add_StringStringObject = Convenience method to add a new Cookie to the response and set an expiry time for it.
cookies.create_StringString = Creates a new Cookie with the specified name and value. This does <b>not</b> add the Cookie to the response, so the created Cookie will not be set unless you do <code>$cookies.add($myCookie)</code>
cookies.create_StringStringObject = Convenience method to create a new Cookie and set an expiry time for it. The created cookie must then be manually added.
cookies.delete_String = Instructs the browser to remove the specified cookie by setting it with a Max-Age of 0.
cookies.toString = If there are no Cookies in the request, this returns the standard Object.toString output; otherwise, it returns a pretty printed list of cookie names and values.
cookies.custom = $cookies.JSESSIONID
cookies.Object = 10

# display.vm resources
display.intro = This tool provides a variety of methods for controlling the output \
    displayed by various references in your templates.
display.list = Formats a collection or array into the form "A, B and C".
display.list_Object.param1 = [''A'',''B'',''C'']
display.list_ObjectString = Formats a collection or array into a string delimited by the second argument
display.list_ObjectStringString = Formats a collection or array into a string delimited by the second argument, except the last two arguments are delimited by the third argument
display.truncate = Limits the string output of the specified value to the configured max length in characters (default is 30 characters). If the string gets curtailed, the configured suffix (default is "...") is used as the ending of the truncated string.
display.truncate_Objectint = Limits the string output of the second argument to the specified number of characters.  If the string gets curtailed, the configured suffix (default is "...") is used as the ending of the truncated string.
display.truncate_ObjectString = Limits the string output of the first argument to the configured max length in characters (default is 30 characters). If the string gets curtailed, the specified suffix is used as the ending of the truncated string.
display.truncate_ObjectintString = Limits the string output of the second argument to the specified number of characters. If the string gets curtailed, the specified suffix is used as the ending of the truncated string.
display.alt = Returns the configured default value ("null" by default) if the specified value is null.
display.alt_ObjectObject = Returns the second argument if first argument specified is null.
display.br_Object = Inserts HTML line break tag (&lt;br /&gt;) in front of all newline characters of the string value of the specified object and returns the resulting string.
display.cell = Truncates or pads the string value of the specified object as necessary to ensure that the returned string''s length equals the default cell size.
display.cell_Objectint = Truncates or pads the string value of the specified object as necessary to ensure that the returned string''s length equals the specified cell size.
display.cell_ObjectString = Truncates or pads the string value of the specified object as necessary to ensure that the returned string''s length equals the default cell size. If truncation is necessary, the specified suffix will replace the end of the string value to indicate that.
display.cell_ObjectintString = Truncates or pads the string value of the specified object as necessary to ensure that the returned string''s length equals the specified cell size. If truncation is necessary, the specified suffix will replace the end of the string value to indicate that.
display.message = Uses <code>java.text.MessageFormat</code> to format the specified String with the specified arguments. If there are no arguments, then the String is returned directly.
display.message_StringObjectVarArgs.param1 = ''foo {1} {0}''
display.message_StringObjectVarArgs.param2 = [''bar'', 2]
display.plural_intString = Builds plural form of a passed word if ''value'' is plural, otherwise returns ''singular''. Plural form is built using some basic English language rules for nouns which does not guarantee correct syntax of a result in all cases.
display.plural_intStringString = Returns ''plural'' parameter if passed 'value' is plural, otherwise ''singular'' is returned.
display.printf_StringObjectVarArgs = Uses String.format(Locale,String,Object...) to format the specified String with the specified arguments.  Please note that the format required here is quite different from that of message(String,Object...).
display.space = Returns a string of spaces of the specified length.
display.space_int.param1 = 4
display.stripTags_Object = Removes HTML tags from the string value of the specified object and returns the resulting string.
display.stripTags_ObjectStringVarArgs = Removes all not allowed HTML tags from the string value of the specified object and returns the resulting string.
display.capitalize = Changes the first character of the string value of the specified object to upper case and returns the resulting string.
display.uncapitalize = Changes the first character of the string value of the specified object to lower case and returns the resulting string.
display.measure = Returns the measurements of the string value of the specified object.
display.getAllowedTags = Returns the configured tags allowed to remain by stripTags(Object).
display.getCellLength = Returns the configured default cell size.
display.getCellSuffix = Returns the configured default suffix used when cell contents need truncating.
display.getDefaultAlternate = Returns the configured default alternate used by alt(Object).
display.getListDelimiter = Returns the configured default delimiter used between items by the list formatting methods.
display.getListFinalDelimiter = Returns the configured default delimiter used between the last two items by the list formatting methods.
display.getTruncateLength = Returns the configured default length used by truncate(Object).
display.getTruncateSuffix = Returns the configured default suffix used by the truncate methods.
display.getTruncateAtWord = Returns the configured default setting for whether to truncate at a precise character or the last fitting word.
display.Object = ''string''

# field.vm resources
field.intro = This tool allows easy access to public static fields in classes,  such as string constants.
field.get_String = Returns the value of the field with the specified name, if found.
field.get_String.param1 = ''java.lang.Boolean.FALSE''
field.in_Class = Loads all public static fields in the specified class.
field.in_Class.param1 = $date.class
field.in_Object = Loads all public static fields in the Class of the specified object.
field.in_Object.param1 = 1
field.in_String = Looks for a class with the specified name; if found, loads all public static fields.
field.in_String.param1 = ''java.lang.Float''
field.custom = $field.in($field).INCLUDE_KEY

# include.vm resources
include.intro = Allows for transparent content negotiation in a manner mimicking Apache httpd''s \
<a href="http://httpd.apache.org/docs-2.0/content-negotiation.html">MultiViews</a>. \
Reads the default language out of the ViewToolContext as \
<code>org.apache.velocity.tools.view.i18n.defaultLanguage</code>. \
This is the successor to the MultiViewsTool in VelocityTools 1.x. \
Please note that it does NOT do the actual #include or #parse for you, \
but is merely to aid in include content negotiation.
include.exists_String = Checks whether or not a resource with the specified name is available.
include.exists_String.param1 = ''include.vm''
include.exists_StringString = Checks whether or not a resource is available with the specified name and language suffix.
include.exists_StringString.param1 = ''include.vm''
include.exists_StringString.param2 = ''de''
include.find_String = Returns the localized name for the specified resource.
include.find_String.param1 = ''demo.vm''
include.find_StringLocale = Returns the localized name for the specified resource, \
with the specified Locale's language suffix. If one for that language is unavailable, \
then it will "widen" the langauge until one is found.  If none is found at all, \
the name parameter is returned.
include.find_StringLocale.param1 = ''demo.vm''
include.find_StringLocale.param2 = $text.locale
include.find_StringString = Returns the localized name for the specified resource, \
with the requested language suffix. If one for that language is unavailable, \
then it will "widen" the langauge until one is found.  If none is found at all, \
the name parameter is returned.
include.find_StringString.param1 = ''demo.vm''
include.find_StringString.param2 = ''fr''

# loop.vm resources
loop.intro = This tool is a convenience tool to use with #foreach loops. It wraps a \
list to let you prematurely stop iterating, skip iterations, sync iteration over \
multiple lists in the same loop, easily \
determine if you are on the first or last iteration, get the number of iterations \
completed, automatically stop before or exclude particular elements and easily \
do all the above even with complex, nested loops.

# xml.vm resources
xml.intro = Tool for reading/navigating XML files.  This uses dom4j under the \
covers to provide complete XPath support for traversing XML files.  \
Most of the methods below will do nothing, as the default tool does not \
have any XML content to work with.  For demo''s sake, there is a <code>file.xml</code> \
in the classpath that is automatically loaded for you to work with, \
and we have turned off safe mode, so you can do things like \
<code>$xml.read(''tools.xml'')</code>. \
Still, the full demo at the bottom will likely be the most useful for you.
xml.read_Object.param1 = ''file.xml''
xml.read_Object = Returns <code>null</code> if safe mode is on; otherwise \
this will accept url pointing to an XML document.  It will then parse that document \
and return a new instance with that document''s root element as its node.
xml.parse_Object.param1 = ''<test><this>that</this></test>''
xml.parse_Object = Accepts XML strings.  If the XML is valid, it will return a \
new XmlTool instance with the XML''s root as its internal node.
xml.get_Object.param1 = ''bar[2]''
xml.get_Object = This will first attempt to find an attribute with the \
specified name and return its value.  If no such attribute \
exists or its value is <code>null</code>, this will attempt to convert \
the given value to a Number and get the result of get(Number).  If the number conversion fails, \
then this will convert the object to a string. If that string \
does not start contain a ''/'', it appends the result of getPath() and a ''/'' to the front of it. \
Finally, it delegates the string to the find(String) method and returns the result of that.
xml.getName = Asks <code>get(Object)</code> for "name". If none, this will return the result of getNodeName().
xml.getNodeName = Returns the name of the root node. If the internal Node \
list has more than one Node, it will only return the name of the first node in the list.
xml.attr_Object.param1 = ''x''
xml.attr_Object = Returns the value of the specified attribute for the first/sole \
Node in the internal Node list for this instance, if that Node is an Element.  If it is a non-Element node type or \
there is no value for that attribute in this element, then this will return <code>null</code>.
xml.attributes = Returns a Map of all attributes for the first/sole \
Node held internally by this instance.  If that Node is not an Element, this will return null.
xml.isEmpty = Returns <code>true</code> if there are no Nodes internally held by this instance. 
xml.size = Returns the number of Nodes internally held by this instance. 
xml.iterator = Returns an Iterator that returns new XmlTool instances for each Node held internally by this instance.
xml.getFirst = Returns a new instance that wraps only the first Node from this instance''s internal Node list.
xml.getLast = Returns a new instance that wraps only the last Node from this instance''s internal Node list.
xml.get_Number.param1 = 0
xml.get_Number = Returns a new instance that wraps the specified Node from this instance''s internal Node list.
xml.node = Returns the first/sole Node from this instance''s internal Node list, if any.
xml.find_Object.param1 = ''/*/a[@*]''
xml.find_Object = Converts the specified object to a String and calls <code>find(String)</code> with that.
xml.find_String.param1 = ''@baz''
xml.find_String = Performs an XPath selection on the current set of \
Nodes held by this instance and returns a new instance that wraps those results. \
If the specified value is null or this instance does not currently hold any nodes, then this will return  \
<code>null</code>.  If the specified value, when converted to a string, does not contain a ''/'' character, then \
it has "//" prepended to it.  This means that a call to <code>$xml.find("a")</code> is equivalent to calling \
<code>$xml.find("//a")</code>.  The full range of XPath selectors is supported here.
xml.getParent = Returns a new XmlTool instance that wraps the parent Element of the first/sole Node \
being wrapped by this instance.
xml.getPath = Returns the XPath that identifies the first/sole Node represented by this instance.
xml.parents = Returns a new XmlTool instance that wraps the parent Elements of each of the Nodes \
being wrapped by this instance.  This does not return all ancestors, just the immediate parents.
xml.children = Returns a new XmlTool instance that wraps all the \
child Elements of all the current internally held nodes that are Elements themselves.
xml.getText = Returns the concatenated text content of all the internally held \
nodes.  Obviously, this is most useful when only one node is held.
xml.toString = If this instance has no XML Nodes, then this returns the result of <code>super.toString()</code>.  Otherwise, \
it returns the XML (as a string) of all the internally held nodes \
that are not Attributes. For attributes, only the value is used.
xml.custom = $xml.find(''*[@name]'').attributes()

