Merge branch '2015.11-develop' into 2016.03
[tine20] / tine20 / build.xml
index effaebe..e2d9128 100644 (file)
         </copy>
 
         <!-- translations -->
-        <translation-build appName="${name}" />
-        <jsMin targetDir="${builddir}/${name}/js" failOnError="false">
-            <fileset dir="${builddir}/${name}/js">
-                <include name="*-lang-*-debug.js"/>
-            </fileset>
-        </jsMin>
-
-        <copy toDir="${project.basedir}/${name}/js">
-            <fileset dir="${builddir}/${name}/js">
-                <include name="*-lang-*-debug.js" />
-            </fileset>
-        </copy>
-
-        <copy toDir="${project.basedir}/${name}/js">
-            <fileset dir="${builddir}/${name}/js">
-                <include name="*-lang-*-debug-min.js" />
-            </fileset>
-
-            <mapper type="regexp" from="^(.*)-debug-min.js" to="\1.js"/>
-        </copy>
-
+        <if>
+            <available file="${builddir}/${name}/js" type="dir" property="has_jsdir"/>
+            <then>
+                <echo message="Building translations..." />
+                <translation-build appName="${name}" />
+                <jsMin targetDir="${builddir}/${name}/js" failOnError="false">
+                    <fileset dir="${builddir}/${name}/js">
+                        <include name="*-lang-*-debug.js"/>
+                    </fileset>
+                </jsMin>
+
+                <copy toDir="${project.basedir}/${name}/js">
+                    <fileset dir="${builddir}/${name}/js">
+                        <include name="*-lang-*-debug.js" />
+                    </fileset>
+                </copy>
+
+                <copy toDir="${project.basedir}/${name}/js">
+                    <fileset dir="${builddir}/${name}/js">
+                        <include name="*-lang-*-debug-min.js" />
+                    </fileset>
+
+                    <mapper type="regexp" from="^(.*)-debug-min.js" to="\1.js"/>
+                </copy>
+            </then>
+        </if>
     </target>
 
     <!-- ============================================  -->