Changeset 111 in josm
- Timestamp:
- 2006-07-16T23:48:40+02:00 (19 years ago)
- Files:
-
- 8 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
.classpath
r104 r111 2 2 <classpath> 3 3 <classpathentry kind="src" path="src"/> 4 <classpathentry including="images/" kind="src" path=""/> 4 <classpathentry including="images/" excluding="po/org/|po/" kind="src" path=""/> 5 5 <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> 6 6 <classpathentry sourcepath="JUNIT_SRC_HOME/junitsrc.zip" kind="var" path="JUNIT_HOME/junit.jar"/> … … 8 8 <classpathentry kind="lib" path="lib/metadata-extractor-2.3.1.jar"/> 9 9 <classpathentry kind="lib" path="lib/gettext-commons-0.9.jar"/> 10 <classpathentry exported="true" kind="lib" path="po"/> 10 11 <classpathentry kind="output" path="bin"/> 11 12 </classpath> -
/
- Property svn:ignore
-
old new 1 1 2 2 bin 3 dist 4 build
-
- Property svn:ignore
-
build.xml
r109 r111 1 1 <project name="openstreetmap" default="dist" basedir="."> 2 2 3 <property name="src" location="src"/> 4 <property name="build" location="build"/> 5 <property name="dist" location="dist"/> 6 <property name="lib" location="lib"/> 3 <property name="src" location="src" /> 4 <property name="po" location="po" /> 5 <property name="build" location="build" /> 6 <property name="dist" location="dist" /> 7 <property name="lib" location="lib" /> 8 9 <path id="classpath"> 10 <fileset dir="${lib}"> 11 <include name="**/*.jar"/> 12 </fileset> 13 </path> 7 14 8 <target name="init"> 9 <tstamp/> 10 <mkdir dir="${build}"/> 11 <mkdir dir="${dist}"/> 12 </target> 15 <path id="srcfiles"> 16 <fileset dir="${src}"> 17 <include name="**/*.java"/> 18 </fileset> 19 </path> 20 21 <target name="init"> 22 <mkdir dir="${build}" /> 23 <mkdir dir="${dist}" /> 24 </target> 25 26 <target name="compile" depends="init"> 27 <javac srcdir="${src}" classpathref="classpath" destdir="${build}"> 28 <include name="org/openstreetmap/josm/gui/MainApplication.java"/> 29 <include name="org/openstreetmap/josm/gui/MainApplet.java"/> 30 </javac> 31 </target> 32 33 <target name="dist" depends="compile,gettext"> 34 <!-- jars --> 35 <unjar src="${lib}/MinML2.jar" dest="${build}" /> 36 <unjar src="${lib}/gettext-commons-0.9.jar" dest="${build}" /> 37 <unjar src="${lib}/metadata-extractor-2.3.1.jar" dest="${build}" /> 38 39 <!-- images --> 40 <copy todir="${build}/images"> 41 <fileset dir="images" /> 42 </copy> 43 44 <jar destfile="${dist}/josm-custom.jar" basedir="${build}"> 45 <manifest> 46 <attribute name="Main-class" value="org.openstreetmap.josm.gui.MainApplication" /> 47 </manifest> 48 </jar> 49 </target> 50 51 <target name="clean"> 52 <delete dir="${build}" /> 53 <delete dir="${dist}" /> 54 </target> 13 55 14 56 15 <target name="compile" depends="init"> 16 <javac srcdir="${src}" 17 classpath="${lib}/MinML2.jar:${lib}/gettext-commons-0.9.jar:${lib}/metadata-extractor-2.3.1.jar" 18 debug="true" 19 optimize="off" 20 destdir="${build}" 21 /> 22 </target> 57 <target name="gettext" depends="init"> 58 <exec executable="find" output="${build}/alljava.txt"> 59 <arg line="${src} -name '*.java'"/> 60 </exec> 61 <exec executable="xgettext"> 62 <arg line="-ktr -ktrn:1,2 -ktrc -kmarktr -Ljava -o${build}/keys.pot -f${build}/alljava.txt"/> 63 </exec> 64 <apply executable="msgmerge"> 65 <arg line="-U ${build}/keys.pot"/> 66 <fileset dir="${po}"> 67 <include name="*.po"/> 68 </fileset> 69 </apply> 23 70 24 <target name="dist" depends="compile"> 25 26 <!-- jars --> 27 <unjar src="${lib}/MinML2.jar" dest="${build}"/> 28 <unjar src="${lib}/gettext-commons-0.9.jar" dest="${build}"/> 29 <unjar src="${lib}/metadata-extractor-2.3.1.jar" dest="${build}"/> 30 31 <!-- images --> 32 <copy todir="${build}/images"> 33 <fileset dir="images"/> 34 </copy> 35 36 <jar destfile="${dist}/josm-custom.jar" basedir="${build}"> 37 <manifest> 38 <attribute name="Main-class" value="org.openstreetmap.josm.gui.MainApplication" /> 39 </manifest> 40 </jar> 41 </target> 42 43 <target name="clean"> 44 <delete dir="${build}"/> 45 <delete dir="${dist}"/> 46 </target> 71 <!-- FIXME: somehow iterate the po-directory and create the java files --> 72 <exec executable="msgfmt"> 73 <arg line="--java2 -d${po} -rorg.openstreetmap.josm.Translation -lde ${po}/de.po"/> 74 </exec> 75 </target> 47 76 48 77 </project> -
src/org/openstreetmap/josm/actions/DownloadIncompleteAction.java
r104 r111 2 2 3 3 import static org.openstreetmap.josm.tools.I18n.tr; 4 import static org.openstreetmap.josm.tools.I18n.trn; 4 5 5 6 import java.awt.event.ActionEvent; … … 44 45 45 46 private DownloadTask(Collection<OsmPrimitive> toDownload) { 46 super(tr("Downloading {0} segments", toDownload.size())); 47 super(trn("Downloading {0} segments", "Downloading {0} segment", toDownload.size(), toDownload.size())); 47 48 reader = new ObjectListDownloader(toDownload); 48 49 reader.setProgressInformation(currentAction, progress); -
src/org/openstreetmap/josm/gui/PleaseWaitRunnable.java
r108 r111 23 23 import org.openstreetmap.josm.Main; 24 24 import org.openstreetmap.josm.tools.GBC; 25 import org.openstreetmap.josm.tools.I18n; 25 26 import org.xml.sax.SAXException; 26 27 … … 39 40 private boolean closeDialogCalled = false; 40 41 41 protected final JLabel currentAction = new JLabel(tr("Contacting the OSM server...")); 42 protected final JLabel currentAction = new JLabel(I18n.tr("Contacting the OSM server...")); 42 43 protected final BoundedRangeModel progress = progressBar.getModel(); 43 44 -
src/org/openstreetmap/josm/io/OsmReader.java
r110 r111 6 6 import java.io.InputStream; 7 7 import java.io.InputStreamReader; 8 import java.text.DateFormat;9 8 import java.text.ParseException; 10 import java.text.SimpleDateFormat;11 9 import java.util.Collection; 12 10 import java.util.HashMap; -
src/org/openstreetmap/josm/tools/I18n.java
r104 r111 1 1 package org.openstreetmap.josm.tools; 2 2 3 import java.text.MessageFormat; 3 import org.openstreetmap.josm.Main; 4 import org.xnap.commons.i18n.I18nFactory; 4 5 5 6 /** … … 9 10 */ 10 11 public class I18n { 12 private static org.xnap.commons.i18n.I18n i18n = I18nFactory.getI18n(Main.class); 13 11 14 public static String tr(String text, Object... objects) { 12 MessageFormat mf = new MessageFormat(text); 13 return mf.format(objects); 15 return i18n.tr(text, objects); 14 16 } 15 17 16 18 public static String tr(String text) { 17 return text;19 return i18n.tr(text); 18 20 } 19 21 20 22 public static String trn(String text, String pluralText, long n, Object... objects) { 21 return n==1 ? tr(text,objects) : tr(pluralText,objects);23 return i18n.trn(text, pluralText, n, objects); 22 24 } 23 25 24 26 public static String trn(String text, String pluralText, long n) { 25 return n==1 ? text :pluralText;27 return i18n.trn(text, pluralText, n); 26 28 } 27 29 }
Note:
See TracChangeset
for help on using the changeset viewer.