Changeset 34023 in osm for applications
- Timestamp:
- 2018-01-21T00:37:28+01:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/i18n/build.xml
r33756 r34023 45 45 <copy file="specialmessages.java" todir="${i18n.build.dir}"/> 46 46 </target> 47 <target name="po/josm.pot" description="Extracts message keys from the source code" depends="trans_.java,init"> 47 <!-- Create the file build/pluginSrc.txt, which contains a list of include patterns for all *.java files that should be translated relative to "${plugin.dir}" --> 48 <target name="filterpluginsources" depends="init"> 49 <delete file="${po.build.dir}/pluginSrc.txt"/> 50 <foreach param="path" target="filterpluginsource"> 51 <path> 52 <dirset dir="${plugin.dir}" includes="*" excludes="00_*" /> 53 </path> 54 </foreach> 55 </target> 56 <!-- Helper task for `filterpluginsources`: Appends an include pattern to the file `build/pluginSrc.txt` if there is no file `.tx/config` for a plugin --> 57 <target name="filterpluginsource"> 58 <if> 59 <not> 60 <available file="${path}/.tx/config" type="file" /> 61 </not> 62 <then> 63 <basename file="${path}" property="dir"/> 64 <echo file="${po.build.dir}/pluginSrc.txt" append="true" message="${dir}/**/*.java
"></echo> 65 </then> 66 </if> 67 </target> 68 <target name="po/josm.pot" description="Extracts message keys from the source code" depends="trans_.java,init,filterpluginsources"> 48 69 <gettext-extract keysFile="josm.raw.pot" poDirectory="po" keywords="-k -ktrc:1c,2 -kmarktrc:1c,2 -ktr -kmarktr -ktrn:1,2 -ktrnc:1c,2,3"> 49 70 <!-- core.port --> … … 58 79 <!-- <fileset dir="${i18n.build.dir}/josmfiles" includes="trans_*.*"/> disable for now --> 59 80 <!-- plugins.pot --> 60 <fileset dir="${plugin.dir}" includes ="**/*.java"/>81 <fileset dir="${plugin.dir}" includesfile="${po.build.dir}/pluginSrc.txt"/> 61 82 <fileset dir="${i18n.build.dir}" includes="trans_surveyor.java"/> 62 83 <fileset dir="${i18n.build.dir}" includes="trans_tag2link.java"/> … … 94 115 <target name="po/plugins.pot" description="Extracts message keys from the plugins source code (minus core and data strings)" depends="trans_.java,po/core.pot,po/data.pot,init"> 95 116 <gettext-extract keysFile="plugins.raw.pot" poDirectory="${i18n.build.dir}" keywords="-k -ktrc:1c,2 -kmarktrc:1c,2 -ktr -kmarktr -ktrn:1,2 -ktrnc:1c,2,3"> 96 <fileset dir="${plugin.dir}" includes ="**/*.java"/>117 <fileset dir="${plugin.dir}" includesfile="${po.build.dir}/pluginSrc.txt"/> 97 118 <fileset dir="${i18n.build.dir}" includes="trans_surveyor.java"/> 98 119 <fileset dir="${i18n.build.dir}" includes="trans_tag2link.java"/> … … 139 160 </exec> 140 161 </target> 162 <!-- If the file `josm.pot` is present and the plugin has a `data/` directory, update its *.po files based on the ones in the `po/` directory. --> 141 163 <target name="plugintrans"> 142 164 <basename file="${path}" property="dir"/> … … 151 173 </gettext-extract> 152 174 <if> 153 <available file="${po.build.dir}/plugin_${dir}/josm.pot"/> 175 <and> 176 <available file="${po.build.dir}/plugin_${dir}/josm.pot" type="file"/> 177 <available file="${plugin.dir}/${dir}/data/" type="dir"/> 178 </and> 154 179 <then> 155 180 <exec executable="perl" failonerror="true"> … … 182 207 <arg line="launchpad.pl bzronly"/> 183 208 </exec> 184 <antcall target="build"/> 209 <antcall target="build"/> 185 210 </target> 186 211 <target name="updatecore"> … … 188 213 <arg line="launchpad.pl bzronly"/> 189 214 </exec> 190 <antcall target="buildcore"/> 215 <antcall target="buildcore"/> 191 216 </target> 192 217 </project>
Note:
See TracChangeset
for help on using the changeset viewer.