Changeset 1989 in josm for trunk/src/org/openstreetmap/josm/io
- Timestamp:
- 2009-08-23T19:34:25+02:00 (15 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/io
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/io/MultiFetchServerObjectReader.java
r1938 r1989 365 365 for (long id : pkg) { 366 366 try { 367 progressMonitor.setCustomText(tr("Fetching {0} with id {1} from ''{2}''", type.getLocalizedDisplayNameSingular(), id, OsmApi.getOsmApi().getBaseUrl())); 367 String msg = ""; 368 switch(type) { 369 case NODE: msg = tr("Fetching node with id {0} from ''{1}''", id, OsmApi.getOsmApi().getBaseUrl()); break; 370 case WAY: msg = tr("Fetching way with id {0} from ''{1}''", id, OsmApi.getOsmApi().getBaseUrl()); break; 371 case RELATION: msg = tr("Fetching relation with id {0} from ''{1}''", id, OsmApi.getOsmApi().getBaseUrl()); break; 372 } 373 progressMonitor.setCustomText(msg); 368 374 singleGetId(type, id, progressMonitor); 369 375 } catch(OsmApiException e) { … … 397 403 */ 398 404 protected void fetchPrimitives(Set<Long> ids, OsmPrimitiveType type, ProgressMonitor progressMonitor) throws OsmTransferException{ 399 progressMonitor.setCustomText(tr("Fetching a package of {0} from ''{1}''", type.getLocalizedDisplayNameSingular(), OsmApi.getOsmApi().getBaseUrl())); 405 String msg = ""; 406 switch(type) { 407 case NODE: msg = tr("Fetching a package of nodes from ''{0}''", OsmApi.getOsmApi().getBaseUrl()); break; 408 case WAY: msg = tr("Fetching a package of ways from ''{0}''", OsmApi.getOsmApi().getBaseUrl()); break; 409 case RELATION: msg = tr("Fetching a package of relations from ''{0}''", OsmApi.getOsmApi().getBaseUrl()); break; 410 } 411 progressMonitor.setCustomText(msg); 400 412 Set<Long> toFetch = new HashSet<Long>(ids); 401 413 toFetch.addAll(ids); -
trunk/src/org/openstreetmap/josm/io/OsmServerWriter.java
r1894 r1989 3 3 4 4 import static org.openstreetmap.josm.tools.I18n.tr; 5 import static org.openstreetmap.josm.tools.I18n.marktr; 5 6 6 7 import java.util.Collection; … … 95 96 int progress = progressMonitor.getTicks(); 96 97 String time_left_str = timeLeft(progress, primitives.size()); 98 String msg = ""; 99 switch(OsmPrimitiveType.from(osm)) { 100 case NODE: msg = marktr("{0}% ({1}/{2}), {3} left. Uploading node ''{4}'' (id: {5})"); break; 101 case WAY: msg = marktr("{0}% ({1}/{2}), {3} left. Uploading way ''{4}'' (id: {5})"); break; 102 case RELATION: msg = marktr("{0}% ({1}/{2}), {3} left. Uploading relation ''{4}'' (id: {5})"); break; 103 } 97 104 progressMonitor.subTask( 98 tr("{0}% ({1}/{2}), {3} left. Uploading {4}: {5} (id: {6})", 99 Math.round(100.0*progress/primitives.size()), progress, 100 primitives.size(), time_left_str, 101 OsmPrimitiveType.from(osm).getLocalizedDisplayNameSingular(), 105 tr(msg, 106 Math.round(100.0*progress/primitives.size()), 107 progress, 108 primitives.size(), 109 time_left_str, 102 110 NAME_FORMATTER.getName(osm), 103 111 osm.id));
Note:
See TracChangeset
for help on using the changeset viewer.