source: subversion/applications/editors/josm/i18n/build.xml @ 13619

Last change on this file since 13619 was 13619, checked in by Dirk Stoecker, 11 years ago

updated, added ja

File size: 4.9 KB
Line 
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="bg"/></ant>
52    <ant target="build-lang"><property name="language" value="cs"/></ant>
53    <ant target="build-lang"><property name="language" value="da"/></ant>
54    <ant target="build-lang"><property name="language" value="de"/></ant>
55    <ant target="build-lang"><property name="language" value="el"/></ant>
56    <ant target="build-lang"><property name="language" value="en_GB"/></ant>
57    <ant target="build-lang"><property name="language" value="es"/></ant>
58    <ant target="build-lang"><property name="language" value="fi"/></ant>
59    <ant target="build-lang"><property name="language" value="fr"/></ant>
60    <ant target="build-lang"><property name="language" value="he"/><property name="jlanguage" value="iw_IL"/></ant>
61    <ant target="build-lang"><property name="language" value="ja"/></ant>
62    <ant target="build-lang"><property name="language" value="it"/></ant>
63    <ant target="build-lang"><property name="language" value="nl"/></ant>
64    <ant target="build-lang"><property name="language" value="pl"/></ant>
65    <ant target="build-lang"><property name="language" value="ro"/></ant>
66    <ant target="build-lang"><property name="language" value="ru"/></ant>
67    <ant target="build-lang"><property name="language" value="sk"/></ant>
68    <ant target="build-lang"><property name="language" value="sl"/></ant>
69    <ant target="build-lang"><property name="language" value="sv"/></ant>
70    <ant target="build-lang"><property name="language" value="tr"/></ant>
71
72    <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
73      <env key="LANG" value="C"/>
74      <arg value="info"/>
75      <arg value="--xml"/>
76      <arg value="po"/>
77    </exec>
78    <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
79    <delete file="REVISION"/>
80
81    <jar destfile="${i18n.jar}" basedir="build">
82      <manifest>
83        <attribute name="Extension-Name" value="JOSM Translation into various languages" />
84        <attribute name="Translation-Version" value="${version.entry.commit.revision}"/>
85        <attribute name="Translation-Date" value="${version.entry.commit.date}"/>
86      </manifest>
87    </jar>
88
89  </target>
90
91  <target name="build-lang">
92    <property name="jlanguage" value="${language}"/>
93    <exec executable="msgmerge">
94      <arg line="-U po/${language}.po po/josm.pot"/>
95    </exec>
96
97    <exec executable="msgfmt">
98      <arg line="--verbose --java2 -dbuild -rorg.openstreetmap.josm.i18n.Translation -l${jlanguage} po/${language}.po"/>
99    </exec>
100  </target>
101
102  <target name="clean">
103    <delete dir="${i18n.build.dir}" />
104    <delete file="po/josm.pot"/>
105    <delete>
106      <fileset dir="po" includes="*.po~" defaultexcludes="false"/>
107      <fileset dir="." includes="trans_*.java"/>
108    </delete>
109    <delete file="java_sourcefiles.txt"/>
110  </target>
111
112</project>
Note: See TracBrowser for help on using the repository browser.