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

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

added some translations

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