Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
da297e5d6f
42
build.xml
42
build.xml
@ -4,6 +4,7 @@
|
|||||||
<property name="tools-folder" value="${root-folder}/tools/"/>
|
<property name="tools-folder" value="${root-folder}/tools/"/>
|
||||||
<property name="target-folder" value="${root-folder}/deploy/plugins"/>
|
<property name="target-folder" value="${root-folder}/deploy/plugins"/>
|
||||||
<property name="server-folder" value="${root-folder}/server"/>
|
<property name="server-folder" value="${root-folder}/server"/>
|
||||||
|
<property name="language-folder" value="${basedir}/language"/>
|
||||||
|
|
||||||
<import file="${tools-folder}/antutil.xml"/>
|
<import file="${tools-folder}/antutil.xml"/>
|
||||||
|
|
||||||
@ -156,8 +157,47 @@
|
|||||||
</exec>
|
</exec>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
|
<!-- Generate language files -->
|
||||||
|
<target name="language">
|
||||||
|
<if>
|
||||||
|
<available file="msgfmt" filepath="${env.PATH}" />
|
||||||
|
<then>
|
||||||
|
<foreach target="msgfmt" param="file">
|
||||||
|
<path>
|
||||||
|
<fileset dir="${language-folder}">
|
||||||
|
<include name="**/LC_MESSAGES/*.po"/>
|
||||||
|
</fileset>
|
||||||
|
</path>
|
||||||
|
</foreach>
|
||||||
|
</then>
|
||||||
|
<else>
|
||||||
|
<echo message="WARNING: msgfmt not available, not generating *.mo files for translations"/>
|
||||||
|
<!-- just copy files -->
|
||||||
|
<copy todir="${target-folder}/${plugin-folder}">
|
||||||
|
<fileset dir=".">
|
||||||
|
<include name="language/**/*.mo"/>
|
||||||
|
<include name="language/**/*.txt"/>
|
||||||
|
</fileset>
|
||||||
|
</copy>
|
||||||
|
</else>
|
||||||
|
</if>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="msgfmt">
|
||||||
|
<propertyregex property="outfile" input="${file}" regexp=".*\/(language\/.*)\.po" replace="${target-folder}/${plugin-folder}/\1\.mo"/>
|
||||||
|
<echo message="Converting ${file} to ${outfile}"/>
|
||||||
|
<dirname property="outdir" file="${outfile}"/>
|
||||||
|
<mkdir dir="${outdir}"/>
|
||||||
|
<exec executable="msgfmt" failonerror="true" logError="true">
|
||||||
|
<arg value="-v"/>
|
||||||
|
<arg value="-o"/>
|
||||||
|
<arg value="${outfile}"/>
|
||||||
|
<arg value="${file}"/>
|
||||||
|
</exec>
|
||||||
|
</target>
|
||||||
|
|
||||||
<!-- Install all files into the target folder -->
|
<!-- Install all files into the target folder -->
|
||||||
<target name="deploy" depends="compress, validate">
|
<target name="deploy" depends="compress, validate, language">
|
||||||
<mkdir dir="${target-folder}/${plugin-folder}"/>
|
<mkdir dir="${target-folder}/${plugin-folder}"/>
|
||||||
|
|
||||||
<!-- Copy (and validate) manifest.xml -->
|
<!-- Copy (and validate) manifest.xml -->
|
||||||
|
Loading…
Reference in New Issue
Block a user