summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'modeling/org.eclipse.stardust.modeling.diagramexport.servlet.nl/build_mergePropsToNLS.xml')
-rw-r--r--modeling/org.eclipse.stardust.modeling.diagramexport.servlet.nl/build_mergePropsToNLS.xml57
1 files changed, 57 insertions, 0 deletions
diff --git a/modeling/org.eclipse.stardust.modeling.diagramexport.servlet.nl/build_mergePropsToNLS.xml b/modeling/org.eclipse.stardust.modeling.diagramexport.servlet.nl/build_mergePropsToNLS.xml
new file mode 100644
index 0000000..f679695
--- /dev/null
+++ b/modeling/org.eclipse.stardust.modeling.diagramexport.servlet.nl/build_mergePropsToNLS.xml
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<project name="mergeProps" default="localizeProperties">
+
+ <property environment="env"/>
+ <property name="cm.home" value="${env.CM_HOME}"/>
+ <property file="${cm.home}/etc/global.properties"/>
+
+ <property name="locale" value="en" />
+ <property name="rootdir" value="${basedir}/../" />
+ <property name="antdir" value="${rootdir}ag.carnot.scm.ant/bin"/>
+
+ <property name="package" value="org.eclipse.stardust.modeling.diagramexport.servlet.nl" />
+ <property name="srcpath" value="src/org/eclipse/stardust/modeling/diagramexport/servlet" />
+ <property name="tempfile" value="${srcpath}/tempfile.properties"/>
+
+ <property name="localize.jar" value="$localizeproperties.jar" />
+
+ <taskdef name="foreach" classname="ag.carnot.scm.ant.ForEachTask"
+ classpath="${antdir}"/>
+
+ <taskdef name="localizeProps" classname="ag.carnot.scm.ant.LocalizeProperties"
+ description="adds new entries in internationalized property-files"
+ classpath="${antdir}"/>
+
+ <target name="localizeProperties">
+ <localizeProps sourcepath="${srcpath}" locale="${locale}">
+ <fileset dir="${rootdir}${package}/${srcpath}" casesensitive="yes">
+ <include name="**/*messages.properties" />
+ </fileset>
+ </localizeProps>
+ <localizeProps sourcepath="${basedir}" locale="${locale}">
+ <fileset dir="${rootdir}${package}" casesensitive="yes">
+ <include name="**/*plugin.properties" />
+ </fileset>
+ </localizeProps>
+ <foreach target="toUnicode">
+ <param name="f">
+ <fileset dir="." casesensitive="yes">
+ <include name="**/*messages_${locale}.properties" />
+ </fileset>
+ <fileset dir="${basedir}" casesensitive="yes">
+ <include name="**/*plugin_${locale}.properties" />
+ </fileset>
+ </param>
+ </foreach>
+ </target>
+
+ <target name="toUnicode">
+ <exec executable="cmd">
+ <arg value="/c ${env.JAVA_HOME}\bin\native2ascii.exe ${f} ${tempfile}"/>
+ </exec>
+ <copy file="${tempfile}" tofile="${f}" overwrite="on"/>
+ <delete file="${tempfile}"/>
+ </target>
+
+</project> \ No newline at end of file