- Timestamp:
- 2006-07-16T23:48:40+02:00 (19 years ago)
- Location:
- src/org/openstreetmap/josm
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
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.