Ticket #8645: 8645_build.patch
| File 8645_build.patch, 6.1 KB (added by , 12 years ago) |
|---|
-
i18n/.tx/config
diff --git a/i18n/.tx/config b/i18n/.tx/config index d7146be..3695b70 100644
a b 2 2 host = https://www.transifex.com 3 3 4 4 [josm.core] 5 file_filter = po/<lang> .po5 file_filter = po/<lang>/core.po 6 6 source_file = po/core.pot 7 7 source_lang = en 8 8 type = PO 9 9 10 10 [josm.data] 11 file_filter = po/<lang> .po11 file_filter = po/<lang>/data.po 12 12 source_file = po/data.pot 13 13 source_lang = en 14 14 type = PO 15 15 16 16 [josm.plugins] 17 file_filter = po/<lang> .po17 file_filter = po/<lang>/plugins.po 18 18 source_file = po/plugins.pot 19 19 source_lang = en 20 20 type = PO -
i18n/build.xml
diff --git a/i18n/build.xml b/i18n/build.xml index 48200c7..f3c4c3f 100644
a b 1 1 <?xml version="1.0" encoding="utf-8"?> 2 2 <project name="JOSM i18n" default="build" basedir="."> 3 3 <!-- compilation properties --> 4 <property name="languages" value="bg,ca,cs,da,de,el,en_AU,en_GB,es,et,eu,fi,fr,gl,hu,id,it,ja,nb,nl,pl,pt,pt_BR,ru,sk,sv,tr,uk,zh_CN,zh_TW"/> 5 <property name="transifex.bin" value="tx"/> 4 6 <property name="josm.build.dir" value="../core"/> 5 7 <property name="josm.presets" value="${josm.build.dir}/data/defaultpresets.xml"/> 6 8 <property name="josm.style" value="${josm.build.dir}/styles/standard/elemstyles.xml"/> … … 44 46 </exec> 45 47 <copy file="specialmessages.java" todir="${i18n.build.dir}"/> 46 48 </target> 47 <target name="po/josm.pot" description="Extracts message keys from the source code" depends="trans_.java,init">48 <gettext-extract keysFile="josm.pot" poDirectory="po" keywords="-k -ktrc:1c,2 -kmarktrc:1c,2 -ktr -kmarktr -ktrn:1,2 -ktrnc:1c,2,3">49 <fileset dir="${josm.build.dir}/src" includes="**/*.java"/>50 <fileset dir="${i18n.build.dir}" includes="specialmessages.java"/>51 <fileset dir="${i18n.build.dir}" includes="trans_*.java"/>52 <fileset dir="${josm.build.dir}/data/validator" includes="*.mapcss"/>53 <fileset dir="${plugin.dir}" includes="**/*.java"/>54 </gettext-extract>55 </target>56 49 <target name="po/core.pot" description="Extracts message keys from the JOSM core source code" depends="builddir,init"> 57 50 <gettext-extract keysFile="core.pot" poDirectory="po" keywords="-k -ktrc:1c,2 -kmarktrc:1c,2 -ktr -kmarktr -ktrn:1,2 -ktrnc:1c,2,3"> 58 51 <fileset dir="${josm.build.dir}/src" includes="**/*.java"/> … … 79 72 <arg line="--unique po/core.pot ${i18n.build.dir}/core.2.pot ${i18n.build.dir}/plugins.raw.pot"/> 80 73 </exec> 81 74 </target> 82 <target name="build" depends=" po/josm.pot,init">75 <target name="build" depends="init"> 83 76 <gettext-merge keysFile="josm.pot" poDirectory="po"/> 84 77 <antcall target="coretrans"/> 85 78 <foreach param="path" target="plugintrans"> … … 88 81 </path> 89 82 </foreach> 90 83 </target> 91 <target name="singleplugintrans" depends=" po/josm.pot,init">84 <target name="singleplugintrans" depends="init"> 92 85 <antcall target="plugintrans"> 93 86 <param name="path" value="${plugin}"/> 94 87 </antcall> 95 88 </target> 96 <target name="buildcore" depends="po/josm.pot,init"> 97 <gettext-merge keysFile="josm.pot" poDirectory="po"/> 89 <target name="buildcore" depends="init"> 98 90 <antcall target="coretrans"/> 99 91 </target> 100 92 <target name="coretrans"> … … 106 98 <fileset dir="${josm.build.dir}/data/validator" includes="*.mapcss"/> 107 99 </gettext-extract> 108 100 <copy todir="${po.build.dir}/core"> 109 <fileset dir="po" />101 <fileset dir="po" includes="*.po"/> 110 102 </copy> 111 103 <gettext-merge keysFile="josm.pot" poDirectory="${po.build.dir}/core"/> 112 104 <exec executable="perl"> … … 127 119 <available file="${po.build.dir}/plugin_${dir}/josm.pot"/> 128 120 <then> 129 121 <copy todir="${po.build.dir}/plugin_${dir}"> 130 <fileset dir="po" />122 <fileset dir="po" includes="*.po"/> 131 123 </copy> 132 124 <gettext-merge keysFile="josm.pot" poDirectory="${po.build.dir}/plugin_${dir}"/> 133 125 <exec executable="perl"> … … 139 131 </target> 140 132 <target name="clean"> 141 133 <delete dir="${i18n.build.dir}"/> 142 <delete file="po/josm.pot"/> 143 <delete> 144 <fileset dir="po" includes="*.*~" defaultexcludes="false"/> 145 </delete> 146 <delete> 147 <fileset dir="po" includes="*.po" defaultexcludes="false"/> 148 </delete> 134 <delete dir="po"/> 135 <mkdir dir="po"/> 149 136 </target> 150 137 <target name="test"> 151 138 <mkdir dir="${i18n.build.dir}/test"/> … … 153 140 <arg line="i18n.pl ${i18n.build.dir}/test/ po/*.po"/> 154 141 </exec> 155 142 </target> 156 <target name="pot" depends=" po/josm.pot" />143 <target name="pot" depends="transifex" /> 157 144 <target name="transifex" depends="po/core.pot,po/plugins.pot,po/data.pot" /> 158 <target name="update"> 159 <exec executable="perl"> 160 <arg line="launchpad.pl bzronly"/> 145 <target name="fetch-po" depends="init"> 146 <exec executable="${transifex.bin}"> 147 <arg line="pull"/> 148 <arg line="--language=${languages}"/> 161 149 </exec> 150 <foreach param="path" target="concatenate-po"> 151 <path> 152 <dirset dir="po" includes="*"/> 153 </path> 154 </foreach> 155 </target> 156 <target name="concatenate-po"> 157 <basename file="${path}" property="lang"/> 158 <echo message="Combining ${lang} language files"/> 159 <exec executable="msgcat"> 160 <arg line="${path}/core.po"/> 161 <arg line="${path}/data.po"/> 162 <arg line="${path}/plugins.po"/> 163 <arg line="--output-file=po/${lang}.po"/> 164 </exec> 165 </target> 166 <target name="update" depends="fetch-po"> 162 167 <antcall target="build"/> 163 168 </target> 164 <target name="updatecore"> 165 <exec executable="perl"> 166 <arg line="launchpad.pl bzronly"/> 167 </exec> 169 <target name="updatecore" depends="fetch-po"> 168 170 <antcall target="buildcore"/> 169 171 </target> 170 172 </project>
