source: osm/applications/editors/josm/plugins/lang/build.xml@ 7822

Last change on this file since 7822 was 7821, checked in by stoecker, 17 years ago

fixed plugin versioning a bit, removed autogenerated file from svn, updated german translation

File size: 3.3 KB
Line 
1<project name="lang" default="install-all" basedir=".">
2
3 <!-- compilation properties -->
4 <property name="josm.build.dir" value="../../core"/>
5 <property name="josm.home.dir" value="${user.home}/.josm"/>
6 <property name="josm" location="../../core/dist/josm-custom.jar" />
7 <property name="plugin.build.dir" value="build"/>
8 <property name="plugin.dist.dir" value="../../dist"/>
9 <property name="plugin.name" value="${ant.project.name}"/>
10 <property name="plugin.jar" value="../../dist/${plugin.name}.jar"/>
11
12 <property name="ant.build.javac.target" value="1.5"/>
13
14 <target name="dist" depends="install-all">
15 </target>
16
17 <target name="install-all" depends="josm-build,keys.pot">
18 <ant target="install"><property name="language" value="de"/></ant>
19 <ant target="install"><property name="language" value="fr"/></ant>
20 <ant target="install"><property name="language" value="ro"/></ant>
21 <ant target="install"><property name="language" value="en_GB"/></ant>
22 </target>
23
24 <target name="install">
25 <mkdir dir="${language}/build"/>
26 <mkdir dir="../../dist"/>
27 <javac srcdir="${language}/src" classpath="${josm.build.dir}/dist/josm-custom.jar" destdir="${language}/build" />
28
29 <exec executable="msgmerge">
30 <arg line="-U ${language}/${language}.po keys.pot"/>
31 </exec>
32
33 <exec executable="msgfmt">
34 <arg line="--verbose --java2 -d${language}/build -rorg.openstreetmap.josm.Translation -l${language} ${language}/${language}.po"/>
35 </exec>
36
37 <copy file="i18n.properties" todir="${language}/build/org/openstreetmap/josm" />
38
39 <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
40 <env key="LANG" value="C"/>
41 <arg value="info"/>
42 <arg value="--xml"/>
43 <arg value="${language}/${language}.po"/>
44 </exec>
45 <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
46 <delete file="REVISION"/>
47 <jar destfile="../../dist/lang-${language}.jar" basedir="${language}/build">
48 <manifest>
49 <attribute name="Plugin-Class" value="org.openstreetmap.josm.TranslationLoader_${language}" />
50 <attribute name="Plugin-Description" value="Translation to locale ${language}" />
51 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
52 <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
53 <attribute name="Plugin-Early" value="true" />
54 </manifest>
55 </jar>
56 </target>
57
58
59
60 <target name="josm-build">
61 <ant dir="${josm.build.dir}" />
62 </target>
63
64 <target name="keys.pot">
65 <exec executable="find" output="alljava.txt">
66 <arg line="${josm.build.dir}/src .. -name '*.java'"/>
67 </exec>
68
69 <exec executable="xgettext">
70 <arg line="-ktr -ktrn:1,2 -ktrc -kmarktr -Ljava --from-code=UTF-8 -okeys.pot -falljava.txt"/>
71 </exec>
72 </target>
73
74 <target name="clean">
75 <ant target="clean_lang"><property name="language" value="de"/></ant>
76 <ant target="clean_lang"><property name="language" value="fr"/></ant>
77 <ant target="clean_lang"><property name="language" value="ro"/></ant>
78 <ant target="clean_lang"><property name="language" value="en_GB"/></ant>
79 <delete dir="${plugin.build.dir}" />
80 </target>
81
82 <target name="clean_lang">
83 <delete file="../../dist/lang-${language}.jar" />
84 <delete dir="${language}/build"/>
85 <delete file="keys.pot"/>
86 </target>
87
88</project>
Note: See TracBrowser for help on using the repository browser.