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="sl"/></ant>
|
---|
66 | <ant target="build-lang"><property name="language" value="sv"/></ant>
|
---|
67 |
|
---|
68 | <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
|
---|
69 | <env key="LANG" value="C"/>
|
---|
70 | <arg value="info"/>
|
---|
71 | <arg value="--xml"/>
|
---|
72 | <arg value="po"/>
|
---|
73 | </exec>
|
---|
74 | <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
|
---|
75 | <delete file="REVISION"/>
|
---|
76 |
|
---|
77 | <jar destfile="${i18n.jar}" basedir="build">
|
---|
78 | <manifest>
|
---|
79 | <attribute name="Extension-Name" value="JOSM Translation into various languages" />
|
---|
80 | <attribute name="Translation-Version" value="${version.entry.commit.revision}"/>
|
---|
81 | <attribute name="Translation-Date" value="${version.entry.commit.date}"/>
|
---|
82 | </manifest>
|
---|
83 | </jar>
|
---|
84 |
|
---|
85 | </target>
|
---|
86 |
|
---|
87 | <target name="build-lang">
|
---|
88 | <property name="jlanguage" value="${language}"/>
|
---|
89 | <exec executable="msgmerge">
|
---|
90 | <arg line="-U po/${language}.po po/josm.pot"/>
|
---|
91 | </exec>
|
---|
92 |
|
---|
93 | <exec executable="msgfmt">
|
---|
94 | <arg line="--verbose --java2 -dbuild -rorg.openstreetmap.josm.i18n.Translation -l${jlanguage} po/${language}.po"/>
|
---|
95 | </exec>
|
---|
96 | </target>
|
---|
97 |
|
---|
98 | <target name="clean">
|
---|
99 | <delete dir="${i18n.build.dir}" />
|
---|
100 | <delete file="po/josm.pot"/>
|
---|
101 | <delete>
|
---|
102 | <fileset dir="po" includes="*.po~" defaultexcludes="false"/>
|
---|
103 | <fileset dir="." includes="trans_*.java"/>
|
---|
104 | </delete>
|
---|
105 | <delete file="java_sourcefiles.txt"/>
|
---|
106 | </target>
|
---|
107 |
|
---|
108 | </project>
|
---|