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

Last change on this file since 22063 was 20716, checked in by stoecker, 15 years ago

i18n update

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