Ignore:
Timestamp:
2014-04-10T20:59:12+02:00 (12 years ago)
Author:
stoecker
Message:

also store untranslated imagery name

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/imagery/ImageryInfo.java

    r6830 r6968  
    11// License: GPL. For details, see LICENSE file.
    22package org.openstreetmap.josm.data.imagery;
     3
     4import static org.openstreetmap.josm.tools.I18n.tr;
    35
    46import java.awt.Image;
     
    145147    }
    146148
     149    /** name of the imagery entry (gets translated by josm usually) */
    147150    private String name;
     151    /** original name of the imagery entry in case of translation call */
     152    private String origName;
    148153    private String url = null;
    149154    private boolean defaultEntry = false;
     
    562567
    563568    /**
     569     * Returns the entry name.
     570     * @return The entry name
     571     * @since 6968
     572     */
     573    public String getOriginalName() {
     574        return this.origName != null ? this.origName : this.name;
     575    }
     576
     577    /**
    564578     * Sets the entry name.
    565579     * @param name The entry name
     
    567581    public void setName(String name) {
    568582        this.name = name;
     583    }
     584
     585    /**
     586     * Sets the entry name and translates it.
     587     * @param name The entry name
     588     * @since 6968
     589     */
     590    public void setTranslatedName(String name) {
     591        this.name = tr(name);
     592        this.origName = name;
    569593    }
    570594
Note: See TracChangeset for help on using the changeset viewer.