Ignore:
Timestamp:
2009-08-23T19:34:25+02:00 (15 years ago)
Author:
Gubaer
Message:

fixed #3281: OsmPrimitiveType fails for fusional and/or agglutinative languages

Location:
trunk/src/org/openstreetmap/josm/io
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/io/MultiFetchServerObjectReader.java

    r1938 r1989  
    365365        for (long id : pkg) {
    366366            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);
    368374                singleGetId(type, id, progressMonitor);
    369375            } catch(OsmApiException e) {
     
    397403     */
    398404    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);
    400412        Set<Long> toFetch = new HashSet<Long>(ids);
    401413        toFetch.addAll(ids);
  • trunk/src/org/openstreetmap/josm/io/OsmServerWriter.java

    r1894 r1989  
    33
    44import static org.openstreetmap.josm.tools.I18n.tr;
     5import static org.openstreetmap.josm.tools.I18n.marktr;
    56
    67import java.util.Collection;
     
    9596                int progress = progressMonitor.getTicks();
    9697                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                }
    97104                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,
    102110                                NAME_FORMATTER.getName(osm),
    103111                                osm.id));
Note: See TracChangeset for help on using the changeset viewer.