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

Last change on this file since 10922 was 10922, checked in by mfloryan, 16 years ago

[i18n] josm/lang/pl: New translation into Polish. Based partly on translations via launchpad by nabuchodonozor-2nd and Paweł Madej

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