[1497] | 1 | <project name="lang" default="install-all" basedir=".">
|
---|
| 2 |
|
---|
[5017] | 3 | <!-- compilation properties -->
|
---|
[5153] | 4 | <property name="josm.build.dir" value="../../core"/>
|
---|
[8486] | 5 | <property name="josm.presets" value="../../core/presets/presets.xml"/>
|
---|
[5153] | 6 | <property name="josm.home.dir" value="${user.home}/.josm"/>
|
---|
| 7 | <property name="josm" location="../../core/dist/josm-custom.jar" />
|
---|
[9732] | 8 | <property name="validator.tagfile" value="../validator/tagchecker.cfg"/>
|
---|
[5153] | 9 | <property name="plugin.build.dir" value="build"/>
|
---|
[6100] | 10 | <property name="plugin.dist.dir" value="../../dist"/>
|
---|
[5153] | 11 | <property name="plugin.name" value="${ant.project.name}"/>
|
---|
[6100] | 12 | <property name="plugin.jar" value="../../dist/${plugin.name}.jar"/>
|
---|
[5153] | 13 |
|
---|
[5197] | 14 | <property name="ant.build.javac.target" value="1.5"/>
|
---|
[5017] | 15 |
|
---|
[5153] | 16 | <target name="dist" depends="install-all">
|
---|
| 17 | </target>
|
---|
| 18 |
|
---|
[5147] | 19 | <target name="install-all" depends="josm-build,keys.pot">
|
---|
| 20 | <ant target="install"><property name="language" value="de"/></ant>
|
---|
| 21 | <ant target="install"><property name="language" value="fr"/></ant>
|
---|
| 22 | <ant target="install"><property name="language" value="ro"/></ant>
|
---|
| 23 | <ant target="install"><property name="language" value="en_GB"/></ant>
|
---|
| 24 | </target>
|
---|
[1497] | 25 |
|
---|
[5147] | 26 | <target name="install">
|
---|
[5153] | 27 | <mkdir dir="${language}/build"/>
|
---|
[6100] | 28 | <mkdir dir="../../dist"/>
|
---|
[5153] | 29 | <javac srcdir="${language}/src" classpath="${josm.build.dir}/dist/josm-custom.jar" destdir="${language}/build" />
|
---|
[1497] | 30 |
|
---|
[5147] | 31 | <exec executable="msgmerge">
|
---|
| 32 | <arg line="-U ${language}/${language}.po keys.pot"/>
|
---|
| 33 | </exec>
|
---|
[1497] | 34 |
|
---|
[5147] | 35 | <exec executable="msgfmt">
|
---|
[6110] | 36 | <arg line="--verbose --java2 -d${language}/build -rorg.openstreetmap.josm.Translation -l${language} ${language}/${language}.po"/>
|
---|
[5147] | 37 | </exec>
|
---|
[1497] | 38 |
|
---|
[5153] | 39 | <copy file="i18n.properties" todir="${language}/build/org/openstreetmap/josm" />
|
---|
[1498] | 40 |
|
---|
[7812] | 41 | <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
|
---|
| 42 | <env key="LANG" value="C"/>
|
---|
| 43 | <arg value="info"/>
|
---|
| 44 | <arg value="--xml"/>
|
---|
| 45 | <arg value="${language}/${language}.po"/>
|
---|
| 46 | </exec>
|
---|
| 47 | <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
|
---|
| 48 | <delete file="REVISION"/>
|
---|
[6100] | 49 | <jar destfile="../../dist/lang-${language}.jar" basedir="${language}/build">
|
---|
[5147] | 50 | <manifest>
|
---|
| 51 | <attribute name="Plugin-Class" value="org.openstreetmap.josm.TranslationLoader_${language}" />
|
---|
| 52 | <attribute name="Plugin-Description" value="Translation to locale ${language}" />
|
---|
[7812] | 53 | <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
|
---|
| 54 | <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
|
---|
[5147] | 55 | <attribute name="Plugin-Early" value="true" />
|
---|
| 56 | </manifest>
|
---|
| 57 | </jar>
|
---|
| 58 | </target>
|
---|
[1497] | 59 |
|
---|
| 60 |
|
---|
| 61 |
|
---|
[5147] | 62 | <target name="josm-build">
|
---|
| 63 | <ant dir="${josm.build.dir}" />
|
---|
| 64 | </target>
|
---|
[8486] | 65 |
|
---|
[5147] | 66 | <target name="keys.pot">
|
---|
[8486] | 67 | <exec executable="perl" output="presets.java">
|
---|
| 68 | <arg line="convpreset.pl ${josm.presets}"/>
|
---|
| 69 | </exec>
|
---|
[9732] | 70 | <exec executable="perl" output="validator.java">
|
---|
| 71 | <arg line="convvalidator.pl ${validator.tagfile}"/>
|
---|
| 72 | </exec>
|
---|
[8486] | 73 |
|
---|
[5147] | 74 | <exec executable="find" output="alljava.txt">
|
---|
[6110] | 75 | <arg line="${josm.build.dir}/src .. -name '*.java'"/>
|
---|
[5147] | 76 | </exec>
|
---|
[1497] | 77 |
|
---|
[5147] | 78 | <exec executable="xgettext">
|
---|
[6110] | 79 | <arg line="-ktr -ktrn:1,2 -ktrc -kmarktr -Ljava --from-code=UTF-8 -okeys.pot -falljava.txt"/>
|
---|
[5147] | 80 | </exec>
|
---|
| 81 | </target>
|
---|
[5017] | 82 |
|
---|
[5147] | 83 | <target name="clean">
|
---|
[5153] | 84 | <ant target="clean_lang"><property name="language" value="de"/></ant>
|
---|
| 85 | <ant target="clean_lang"><property name="language" value="fr"/></ant>
|
---|
| 86 | <ant target="clean_lang"><property name="language" value="ro"/></ant>
|
---|
| 87 | <ant target="clean_lang"><property name="language" value="en_GB"/></ant>
|
---|
| 88 | <delete dir="${plugin.build.dir}" />
|
---|
[5147] | 89 | </target>
|
---|
[5017] | 90 |
|
---|
[5153] | 91 | <target name="clean_lang">
|
---|
[6100] | 92 | <delete file="../../dist/lang-${language}.jar" />
|
---|
[5153] | 93 | <delete dir="${language}/build"/>
|
---|
[7821] | 94 | <delete file="keys.pot"/>
|
---|
[8486] | 95 | <delete file="presets.java"/>
|
---|
[9732] | 96 | <delete file="validator.java"/>
|
---|
[5153] | 97 | </target>
|
---|
| 98 |
|
---|
[1497] | 99 | </project>
|
---|