1 | <project name="lang" default="install-all" basedir=".">
|
---|
2 |
|
---|
3 | <property name="josm" value="../../core" />
|
---|
4 | <property name="plugins" value=".."/>
|
---|
5 |
|
---|
6 | <target name="install-all" depends="josm-build,keys.pot">
|
---|
7 | <ant target="install"><property name="language" value="de"/></ant>
|
---|
8 | <ant target="install"><property name="language" value="fr"/></ant>
|
---|
9 | <ant target="install"><property name="language" value="ro"/></ant>
|
---|
10 | <ant target="install"><property name="language" value="en_GB"/></ant>
|
---|
11 | </target>
|
---|
12 |
|
---|
13 | <target name="install">
|
---|
14 | <mkdir dir="${language}/bin"/>
|
---|
15 | <mkdir dir="dist"/>
|
---|
16 | <javac srcdir="${language}/src" classpath="${josm}/dist/josm-custom.jar" destdir="${language}/bin" />
|
---|
17 |
|
---|
18 | <exec executable="msgmerge">
|
---|
19 | <arg line="-U ${language}/${language}.po keys.pot"/>
|
---|
20 | </exec>
|
---|
21 |
|
---|
22 | <exec executable="msgfmt">
|
---|
23 | <arg line="--java2 -d${language}/bin -rorg.openstreetmap.josm.Translation -l${language} ${language}/${language}.po"/>
|
---|
24 | </exec>
|
---|
25 |
|
---|
26 | <copy file="i18n.properties" todir="${language}/bin/org/openstreetmap/josm" />
|
---|
27 |
|
---|
28 | <jar destfile="dist/lang-${language}.jar" basedir="${language}/bin">
|
---|
29 | <manifest>
|
---|
30 | <attribute name="Plugin-Class" value="org.openstreetmap.josm.TranslationLoader_${language}" />
|
---|
31 | <attribute name="Plugin-Description" value="Translation to locale ${language}" />
|
---|
32 | <attribute name="Plugin-Early" value="true" />
|
---|
33 | </manifest>
|
---|
34 | </jar>
|
---|
35 | </target>
|
---|
36 |
|
---|
37 |
|
---|
38 |
|
---|
39 | <target name="josm-build">
|
---|
40 | <ant dir="${josm}" />
|
---|
41 | </target>
|
---|
42 |
|
---|
43 | <target name="keys.pot">
|
---|
44 | <exec executable="find" output="alljava.txt">
|
---|
45 | <arg line="${josm}/src ${plugins} -name '*.java'"/>
|
---|
46 | </exec>
|
---|
47 |
|
---|
48 | <exec executable="xgettext">
|
---|
49 | <arg line="-ktr -ktrn:1,2 -ktrc -kmarktr -Ljava -okeys.pot -falljava.txt"/>
|
---|
50 | </exec>
|
---|
51 | </target>
|
---|
52 | </project>
|
---|