public class OptimizeBundlesTask
extends org.apache.tools.ant.Task
<taskdef name="optbundles"
classname="de.viaboxx.nlstools.tasks.OptimizeBundlesTask">
<classpath refid="maven.test.classpath"/>
</taskdef>
<optbundles masterFile="allBundles.txt"
commonBundleFile="Common.xml"
commonBundleBaseName="/Common"
commonEntryKeyPrefix="common"
/>
Transformation examples:
order.address.city => common.city
customer.firstName => common.firstName
Removes the specific text from the bundles, where the common text is equal.
If "commonEntryKeyPrefix" not set, replace equal keys in bundles.
If "deleteEmptyEntries" is true, remove text and entries without equal translations in bundles.
------------------------------
file allBundles.txt (example):
common.xml
customer.xml
orders.xml
------------------------------
| Constructor and Description |
|---|
OptimizeBundlesTask() |
| Modifier and Type | Method and Description |
|---|---|
void |
execute() |
String |
getCommonBundleBaseName() |
String |
getCommonBundleFile() |
String |
getCommonEntryKeyPrefix() |
File |
getMasterFile() |
boolean |
isDeleteEmptyEntries() |
void |
setCommonBundleBaseName(String commonBundleBaseName) |
void |
setCommonBundleFile(String commonBundleFile) |
void |
setCommonEntryKeyPrefix(String commonEntryKeyPrefix) |
void |
setDeleteEmptyEntries(boolean deleteEmptyEntries) |
void |
setMasterFile(File masterFile) |
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskTypepublic boolean isDeleteEmptyEntries()
public void setDeleteEmptyEntries(boolean deleteEmptyEntries)
public File getMasterFile()
public void setMasterFile(File masterFile)
public String getCommonBundleFile()
public void setCommonBundleFile(String commonBundleFile)
public String getCommonBundleBaseName()
public void setCommonBundleBaseName(String commonBundleBaseName)
public String getCommonEntryKeyPrefix()
public void setCommonEntryKeyPrefix(String commonEntryKeyPrefix)
public void execute()
execute in class org.apache.tools.ant.TaskCopyright © 2018. All rights reserved.