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

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

i18n update

File size: 6.9 KB
RevLine 
[11529]1<project name="JOSM i18n" default="build" basedir=".">
2
3 <!-- compilation properties -->
[11540]4 <property name="josm.build.dir" value="../core"/>
[19494]5 <property name="josm.presets" value="${josm.build.dir}/data/defaultpresets.xml"/>
[13140]6 <property name="josm.style" value="${josm.build.dir}/styles/standard/elemstyles.xml"/>
[12484]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"/>
[11540]11 <property name="i18n.build.dir" value="build"/>
[19319]12 <property name="i18n.install.dir" value="${josm.build.dir}/data"/>
13 <property name="i18n.oldinstall.dir" value="${josm.build.dir}/lib"/>
[11540]14 <property name="i18n.name" value="josm-translation"/>
[19319]15 <property name="i18n.jar" value="${i18n.oldinstall.dir}/${i18n.name}.jar"/>
[11540]16
[11529]17 <property name="ant.build.javac.target" value="1.5"/>
18
[19496]19 <property name="gettexttasks.jar" value="lib/gettext-ant-tasks-0.9.7.jar"/>
[14020]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
[13964]27 <target name="trans_.java">
28 <mkdir dir="${i18n.build.dir}"/>
29 <exec executable="perl" output="${i18n.build.dir}/trans_presets.java">
[11529]30 <arg line="convpreset.pl ${josm.presets}"/>
31 </exec>
[13964]32 <exec executable="perl" output="${i18n.build.dir}/trans_style.java">
[13140]33 <arg line="convstyle.pl ${josm.style}"/>
34 </exec>
[13964]35 <exec executable="perl" output="${i18n.build.dir}/trans_validator.java">
[11529]36 <arg line="convvalidator.pl ${validator.tagfile}"/>
37 </exec>
[13964]38 <exec executable="perl" output="${i18n.build.dir}/trans_wms.java">
[12334]39 <arg line="convwms.pl ${wms.srcfile}"/>
40 </exec>
[13964]41 <exec executable="perl" output="${i18n.build.dir}/trans_surveyor.java">
[12484]42 <arg line="convsurveyor.pl ${surveyor.srcfile}"/>
43 </exec>
[14124]44 <exec executable="perl" output="${i18n.build.dir}/trans_plugins.java">
45 <arg line="convplugins.pl ${plugin.dir}/*/build.xml"/>
46 </exec>
[14020]47 <copy file="specialmessages.java" todir="${i18n.build.dir}" />
[13964]48 </target>
[11529]49
[13964]50 <target name="po/josm.pot"
51 description="Extracts message keys from the source code"
[14020]52 depends="trans_.java,init.gettext">
53 <gettext-extract keysFile="josm.pot" poDirectory="po"
[17952]54 keywords="-k -ktrc:1c,2 -kmarktrc:1c,2 -ktr -kmarktr -ktrn:1,2 -ktrnc:1c,2,3">
[14020]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>
[11529]60 </target>
[11540]61
[19319]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">
[11540]73 <copy file="i18n.properties" todir="build/org/openstreetmap/josm" />
74
[14020]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>
[13998]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>
[20716]83 <ant target="build-lang"><property name="language" value="en_AU"/></ant>
[13998]84 <ant target="build-lang"><property name="language" value="en_GB"/></ant>
85 <ant target="build-lang"><property name="language" value="es"/></ant>
[14951]86 <ant target="build-lang"><property name="language" value="et"/></ant>
[13998]87 <ant target="build-lang"><property name="language" value="fi"/></ant>
88 <ant target="build-lang"><property name="language" value="fr"/></ant>
[14951]89 <ant target="build-lang"><property name="language" value="gl"/></ant>
[13998]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>
[14020]92 <ant target="build-lang"><property name="language" value="is"/></ant>
[13998]93 <ant target="build-lang"><property name="language" value="it"/></ant>
[14951]94 <ant target="build-lang"><property name="language" value="nb"/></ant>
[13998]95 <ant target="build-lang"><property name="language" value="nl"/></ant>
96 <ant target="build-lang"><property name="language" value="pl"/></ant>
[16407]97 <ant target="build-lang"><property name="language" value="pt_BR"/></ant>
[13998]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>
[16179]104 <ant target="build-lang"><property name="language" value="zh_TW"/></ant>
[11540]105
[11529]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"/>
[11540]114
[14020]115 <jar destfile="${i18n.jar}" basedir="build" excludes="**/*.java">
[11529]116 <manifest>
117 <attribute name="Extension-Name" value="JOSM Translation into various languages" />
[11540]118 <attribute name="Translation-Version" value="${version.entry.commit.revision}"/>
119 <attribute name="Translation-Date" value="${version.entry.commit.date}"/>
[11529]120 </manifest>
[11540]121 </jar>
[11529]122 </target>
[11540]123
[13998]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
[11529]131 <target name="clean">
132 <delete dir="${i18n.build.dir}" />
133 <delete file="po/josm.pot"/>
[12547]134 <delete>
[14020]135 <fileset dir="po" includes="*.*~" defaultexcludes="false"/>
[12547]136 </delete>
[11529]137 </target>
138
139</project>
Note: See TracBrowser for help on using the repository browser.