source: subversion/applications/editors/josm/i18n/build.xml @ 13334

Last change on this file since 13334 was 13334, checked in by Dirk Stoecker, 11 years ago

updated, added sk

File size: 4.7 KB
Line 
1<project name="JOSM i18n" default="build" basedir=".">
2
3  <!-- compilation properties -->
4  <property name="josm.build.dir"    value="../core"/>
5  <property name="josm.presets"      value="${josm.build.dir}/presets/presets.xml"/>
6  <property name="josm.style"        value="${josm.build.dir}/styles/standard/elemstyles.xml"/>
7  <property name="plugin.dir"        value="../plugins"/>
8  <property name="validator.tagfile" value="${plugin.dir}/validator/tagchecker.cfg"/>
9  <property name="wms.srcfile"       value="${plugin.dir}/wmsplugin/sources.cfg"/>
10  <property name="surveyor.srcfile"  value="${plugin.dir}/surveyor/resources/surveyor.xml"/>
11  <property name="i18n.build.dir"    value="build"/>
12  <property name="i18n.install.dir"  value="${josm.build.dir}/lib"/>
13  <property name="i18n.name"         value="josm-translation"/>
14  <property name="i18n.jar"          value="${i18n.install.dir}/${i18n.name}.jar"/>
15
16  <property name="ant.build.javac.target" value="1.5"/>
17
18  <target name="josm.pot">
19    <exec executable="perl" output="trans_presets.java">
20      <arg line="convpreset.pl ${josm.presets}"/>
21    </exec>
22    <exec executable="perl" output="trans_style.java">
23      <arg line="convstyle.pl ${josm.style}"/>
24    </exec>
25    <exec executable="perl" output="trans_validator.java">
26      <arg line="convvalidator.pl ${validator.tagfile}"/>
27    </exec>
28    <exec executable="perl" output="trans_wms.java">
29      <arg line="convwms.pl ${wms.srcfile}"/>
30    </exec>
31    <exec executable="perl" output="trans_surveyor.java">
32      <arg line="convsurveyor.pl ${surveyor.srcfile}"/>
33    </exec>
34
35    <exec executable="find" output="java_sourcefiles.txt" osfamily="unix">
36      <arg value="${josm.build.dir}/src" />
37      <arg value="${plugin.dir}"/>
38      <arg value="."/>
39      <arg value="-name"/>
40      <arg value="*.java"/>
41    </exec>
42
43    <exec executable="xgettext">
44      <arg line="-ktr -ktrn:1,2 -ktrc -kmarktr -Ljava --from-code=UTF-8 -opo/josm.pot -fjava_sourcefiles.txt"/>
45    </exec>
46  </target>
47
48  <target name="build" depends="josm.pot">
49    <copy file="i18n.properties" todir="build/org/openstreetmap/josm" />
50
51    <ant target="build-lang"><property name="language" value="cs"/></ant>
52    <ant target="build-lang"><property name="language" value="da"/></ant>
53    <ant target="build-lang"><property name="language" value="de"/></ant>
54    <ant target="build-lang"><property name="language" value="el"/></ant>
55    <ant target="build-lang"><property name="language" value="en_GB"/></ant>
56    <ant target="build-lang"><property name="language" value="es"/></ant>
57    <ant target="build-lang"><property name="language" value="fi"/></ant>
58    <ant target="build-lang"><property name="language" value="fr"/></ant>
59    <ant target="build-lang"><property name="language" value="he"/><property name="jlanguage" value="iw_IL"/></ant>
60    <ant target="build-lang"><property name="language" value="it"/></ant>
61    <ant target="build-lang"><property name="language" value="nl"/></ant>
62    <ant target="build-lang"><property name="language" value="pl"/></ant>
63    <ant target="build-lang"><property name="language" value="ro"/></ant>
64    <ant target="build-lang"><property name="language" value="ru"/></ant>
65    <ant target="build-lang"><property name="language" value="sk"/></ant>
66    <ant target="build-lang"><property name="language" value="sl"/></ant>
67    <ant target="build-lang"><property name="language" value="sv"/></ant>
68
69    <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
70      <env key="LANG" value="C"/>
71      <arg value="info"/>
72      <arg value="--xml"/>
73      <arg value="po"/>
74    </exec>
75    <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
76    <delete file="REVISION"/>
77
78    <jar destfile="${i18n.jar}" basedir="build">
79      <manifest>
80        <attribute name="Extension-Name" value="JOSM Translation into various languages" />
81        <attribute name="Translation-Version" value="${version.entry.commit.revision}"/>
82        <attribute name="Translation-Date" value="${version.entry.commit.date}"/>
83      </manifest>
84    </jar>
85
86  </target>
87
88  <target name="build-lang">
89    <property name="jlanguage" value="${language}"/>
90    <exec executable="msgmerge">
91      <arg line="-U po/${language}.po po/josm.pot"/>
92    </exec>
93
94    <exec executable="msgfmt">
95      <arg line="--verbose --java2 -dbuild -rorg.openstreetmap.josm.i18n.Translation -l${jlanguage} po/${language}.po"/>
96    </exec>
97  </target>
98
99  <target name="clean">
100    <delete dir="${i18n.build.dir}" />
101    <delete file="po/josm.pot"/>
102    <delete>
103      <fileset dir="po" includes="*.po~" defaultexcludes="false"/>
104      <fileset dir="." includes="trans_*.java"/>
105    </delete>
106    <delete file="java_sourcefiles.txt"/>
107  </target>
108
109</project>
Note: See TracBrowser for help on using the repository browser.