source: osm/applications/editors/josm/i18n/build.xml@ 18656

Last change on this file since 18656 was 17952, checked in by stoecker, 15 years ago

added marktrc

File size: 6.5 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 <property name="gettexttasks.jar" value="lib/gettext-ant-tasks-0.9.6.jar"/>
19
20 <target name="init.gettext" description="Loads the Ant gettext tasks">
21 <taskdef name="gettext-extract" classname="org.xnap.commons.ant.gettext.GettextExtractKeysTask" classpath="${gettexttasks.jar}"/>
22 <taskdef name="gettext-merge" classname="org.xnap.commons.ant.gettext.GettextMergeKeysTask" classpath="${gettexttasks.jar}"/>
23 <taskdef name="gettext-dist" classname="org.xnap.commons.ant.gettext.GettextDistTask" classpath="${gettexttasks.jar}"/>
24 </target>
25
26 <target name="trans_.java">
27 <mkdir dir="${i18n.build.dir}"/>
28 <exec executable="perl" output="${i18n.build.dir}/trans_presets.java">
29 <arg line="convpreset.pl ${josm.presets}"/>
30 </exec>
31 <exec executable="perl" output="${i18n.build.dir}/trans_style.java">
32 <arg line="convstyle.pl ${josm.style}"/>
33 </exec>
34 <exec executable="perl" output="${i18n.build.dir}/trans_validator.java">
35 <arg line="convvalidator.pl ${validator.tagfile}"/>
36 </exec>
37 <exec executable="perl" output="${i18n.build.dir}/trans_wms.java">
38 <arg line="convwms.pl ${wms.srcfile}"/>
39 </exec>
40 <exec executable="perl" output="${i18n.build.dir}/trans_surveyor.java">
41 <arg line="convsurveyor.pl ${surveyor.srcfile}"/>
42 </exec>
43 <exec executable="perl" output="${i18n.build.dir}/trans_plugins.java">
44 <arg line="convplugins.pl ${plugin.dir}/*/build.xml"/>
45 </exec>
46 <copy file="specialmessages.java" todir="${i18n.build.dir}" />
47 </target>
48
49 <target name="po/josm.pot"
50 description="Extracts message keys from the source code"
51 depends="trans_.java,init.gettext">
52 <gettext-extract keysFile="josm.pot" poDirectory="po"
53 keywords="-k -ktrc:1c,2 -kmarktrc:1c,2 -ktr -kmarktr -ktrn:1,2 -ktrnc:1c,2,3">
54 <fileset dir="${josm.build.dir}/src" includes="**/*.java"/>
55 <fileset dir="${plugin.dir}" includes="**/*.java"/>
56 <fileset dir="${i18n.build.dir}" includes="specialmessages.java"/>
57 <fileset dir="${i18n.build.dir}" includes="trans_*.java"/>
58 </gettext-extract>
59 </target>
60
61 <target name="build" depends="po/josm.pot,init.gettext">
62 <copy file="i18n.properties" todir="build/org/openstreetmap/josm" />
63
64 <gettext-merge keysFile="josm.pot" poDirectory="po"/>
65
66 <!--<gettext-dist targetBundle="org.openstreetmap.josm.i18n.Translation"
67 poDirectory="po" outputDirectory="build"/>-->
68 <ant target="build-lang"><property name="language" value="ar"/></ant>
69 <ant target="build-lang"><property name="language" value="bg"/></ant>
70 <ant target="build-lang"><property name="language" value="cs"/></ant>
71 <ant target="build-lang"><property name="language" value="da"/></ant>
72 <ant target="build-lang"><property name="language" value="de"/></ant>
73 <ant target="build-lang"><property name="language" value="el"/></ant>
74 <ant target="build-lang"><property name="language" value="en_GB"/></ant>
75 <ant target="build-lang"><property name="language" value="es"/></ant>
76 <ant target="build-lang"><property name="language" value="et"/></ant>
77 <ant target="build-lang"><property name="language" value="fi"/></ant>
78 <ant target="build-lang"><property name="language" value="fr"/></ant>
79 <ant target="build-lang"><property name="language" value="gl"/></ant>
80 <ant target="build-lang"><property name="language" value="he"/><property name="jlanguage" value="iw_IL"/></ant>
81 <ant target="build-lang"><property name="language" value="ja"/></ant>
82 <ant target="build-lang"><property name="language" value="is"/></ant>
83 <ant target="build-lang"><property name="language" value="it"/></ant>
84 <ant target="build-lang"><property name="language" value="nb"/></ant>
85 <ant target="build-lang"><property name="language" value="nl"/></ant>
86 <ant target="build-lang"><property name="language" value="pl"/></ant>
87 <ant target="build-lang"><property name="language" value="pt_BR"/></ant>
88 <ant target="build-lang"><property name="language" value="ro"/></ant>
89 <ant target="build-lang"><property name="language" value="ru"/></ant>
90 <ant target="build-lang"><property name="language" value="sk"/></ant>
91 <ant target="build-lang"><property name="language" value="sl"/></ant>
92 <ant target="build-lang"><property name="language" value="sv"/></ant>
93 <ant target="build-lang"><property name="language" value="tr"/></ant>
94 <ant target="build-lang"><property name="language" value="zh_TW"/></ant>
95
96 <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
97 <env key="LANG" value="C"/>
98 <arg value="info"/>
99 <arg value="--xml"/>
100 <arg value="po"/>
101 </exec>
102 <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
103 <delete file="REVISION"/>
104
105 <jar destfile="${i18n.jar}" basedir="build" excludes="**/*.java">
106 <manifest>
107 <attribute name="Extension-Name" value="JOSM Translation into various languages" />
108 <attribute name="Translation-Version" value="${version.entry.commit.revision}"/>
109 <attribute name="Translation-Date" value="${version.entry.commit.date}"/>
110 </manifest>
111 </jar>
112 </target>
113
114 <target name="build-lang">
115 <property name="jlanguage" value="${language}"/>
116 <exec executable="msgfmt">
117 <arg line="--verbose --java2 -dbuild -rorg.openstreetmap.josm.i18n.Translation -l${jlanguage} po/${language}.po"/>
118 </exec>
119 </target>
120
121 <target name="clean">
122 <delete dir="${i18n.build.dir}" />
123 <delete file="po/josm.pot"/>
124 <delete>
125 <fileset dir="po" includes="*.*~" defaultexcludes="false"/>
126 </delete>
127 </target>
128
129</project>
Note: See TracBrowser for help on using the repository browser.