de.viaboxx.nlstools.tasks
Class Property2XMLConverterTask
java.lang.Object
org.apache.tools.ant.ProjectComponent
org.apache.tools.ant.Task
de.viaboxx.nlstools.tasks.Property2XMLConverterTask
- All Implemented Interfaces:
- Cloneable
public class Property2XMLConverterTask
- extends org.apache.tools.ant.Task
Description: Create a bundles-xml (or excel) file fromProperty some plain property (or xml) files
example:
convert grails-app/i18n/messages_en.properties, messages_de.properties and messages_zh.properties
to i18n/messages.xml, where the properties files are stored in UTF-8 encoding:
<prop2xml locales="en;de;zh" fromProperty="grails-app/i18n/messages"
to="i18n/messages.xml" fromCharset="UTF-8"
interfaceName="MyMessages"/>
- Author:
- Roman Stumm
| Fields inherited from class org.apache.tools.ant.Task |
target, taskName, taskType, wrapper |
| Fields inherited from class org.apache.tools.ant.ProjectComponent |
description, location, project |
| Methods inherited from class org.apache.tools.ant.Task |
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType |
| Methods inherited from class org.apache.tools.ant.ProjectComponent |
clone, getDescription, getLocation, getProject, setDescription, setLocation, setProject |
Property2XMLConverterTask
public Property2XMLConverterTask()
getFromCharset
public String getFromCharset()
setFromCharset
public void setFromCharset(String fromCharset)
isXml
public boolean isXml()
setXml
public void setXml(boolean xml)
getInterfaceName
public String getInterfaceName()
- name of the interface for writing into the xml error-sections file
setInterfaceName
public void setInterfaceName(String aInterfaceName)
getFromProperty
public String getFromProperty()
- path/filename without _de_DE.properties /
each locale + .properties will be added to this string to find the properties source file to convert
- Returns:
setFromProperty
public void setFromProperty(String aFromProperty)
getTo
public String getTo()
- path/filename of the xml error-section file to be created
- Returns:
setTo
public void setTo(String aToXML)
getLocales
public String getLocales()
- all locales for which a resource bundle exists, separated by ;
- Returns:
setLocales
public void setLocales(String aLocales)
execute
public void execute()
throws org.apache.tools.ant.BuildException
- Overrides:
execute in class org.apache.tools.ant.Task
- Throws:
org.apache.tools.ant.BuildException
getPropertyBaseName
protected String getPropertyBaseName()
getInterfacePackage
protected String getInterfacePackage()
Copyright © 2014. All Rights Reserved.