public class MergeLocaleTask
extends org.apache.tools.ant.Task
<taskdef name="mergeLocale"> classname="de.viaboxx.nlstools.tasks.MergeLocaleTask"> <classpath refid="maven.test.classpath"/> </taskdef> <mergeLocale from="src/main/bundles/Common.xml" with="src/main/bundles/Common_de_DE.xml" locales="de_DE;en,it" (if empty, process ALL locales) to="src/main/bundles/Common_de_DE.xml"/>
| Modifier and Type | Field and Description |
|---|---|
protected MBBundles |
loadedBundles |
protected MBBundles |
translatedBundles |
| Constructor and Description |
|---|
MergeLocaleTask() |
| Modifier and Type | Method and Description |
|---|---|
void |
execute() |
protected MBText |
findMBTextForLocale(String key,
String locale,
MBBundles bundles) |
String |
getBundleNames()
merge specific bundles only. if empty (default), merge all bundles.
|
File |
getFrom()
The xml file with path name to read from
|
String |
getLocales()
semicolon separated locale names
|
File |
getTo()
The xml file with the path name to write into
|
File |
getWith()
The xml file with new translated locales
|
protected boolean |
isBundleToProcess(MBBundle bundle) |
protected void |
loadExecute() |
static String |
localesString(MBBundles bundles,
String locales) |
static String |
localesString(Set<String> locales) |
protected void |
outputExecute() |
protected void |
processExecute() |
void |
setBundleNames(String bundleNames) |
void |
setFrom(File from) |
void |
setLocales(String locales) |
void |
setTo(File to) |
void |
setWith(File xmlWithNewLocale) |
static StringTokenizer |
tokenize(String input) |
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskTypeprotected MBBundles loadedBundles
protected MBBundles translatedBundles
public File getFrom()
public void setFrom(File from)
public File getTo()
public void setTo(File to)
public File getWith()
public void setWith(File xmlWithNewLocale)
public String getBundleNames()
public void setBundleNames(String bundleNames)
public String getLocales()
public void setLocales(String locales)
public void execute()
execute in class org.apache.tools.ant.Taskpublic static StringTokenizer tokenize(String input)
protected boolean isBundleToProcess(MBBundle bundle)
protected void processExecute()
Copyright © 2018. All rights reserved.