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