From c8e12c306929730d9c0e9b4db03b47fd64999f3c Mon Sep 17 00:00:00 2001
From: Greg DiCristofaro <gregd@basistech.com>
Date: Thu, 17 Sep 2020 09:21:02 -0400
Subject: [PATCH] compiles properties files to properties-MERGED in sleuthkit

---
 bindings/java/build.xml | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/bindings/java/build.xml b/bindings/java/build.xml
index 99ac0c26d..43db6ff19 100644
--- a/bindings/java/build.xml
+++ b/bindings/java/build.xml
@@ -129,15 +129,19 @@
 		<javac debug="on" srcdir="${src}" destdir="${build}" classpathref="libraries" includeantruntime="false">
 			<compilerarg value="-Xlint"/>
 		</javac>
+
 		<!-- Copy Bundle*.properties files into DataModel build directory, so they are included in the .jar -->
 		<copy todir="${build-datamodel}">
 			<fileset dir="${src}" includes="**/*.properties"/>
 		</copy>
-
+		
 		<!-- Verify sample compiles -->
 		<javac debug="on" srcdir="${sample}" destdir="${build}" includeantruntime="false">
 			<classpath refid="libraries"/>
 		</javac>
+		
+		<!--Copy .properties to .properties-MERGED -->
+		<antcall target="copy-bundle" />
 	</target>
 
 	<target name="dist" depends="check-build, init-ivy, compile, copyLibs" unless="up-to-date" description="generate the distribution">
@@ -202,4 +206,16 @@
 		</exec>
 	</target>
 
+    <target name="copy-bundle">
+        <!-- the externalized strings in 'src' are in both the java files as annotations and in the Bundle.property files.
+        The strings get merged during compilation.  This target copies that merged file into src so that it can be checked
+        in and used as a basis for translation efforts -->
+        <copy todir="src">
+            <fileset dir="build">
+                <include name="**/Bundle.properties"/>
+            </fileset>
+            <globmapper from="*" to="*-MERGED"/>
+        </copy>
+    </target>
+
 </project>
-- 
GitLab