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

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

added more texts

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