Ignore:
Timestamp:
2009-08-23T22:37:39+02:00 (15 years ago)
Author:
Gubaer
Message:

fixed #3261: Use the "name:$CURRENT_LOCALE" name in the JOSM UI instead of "name" when it exists
new: new checkbox in LAF preferences for enabling/disabling localized names for primitives

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

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/corrector/RoleCorrectionTableModel.java

    r1930 r1990  
    66import java.util.List;
    77
    8 import org.openstreetmap.josm.gui.PrimitiveNameFormatter;
     8import org.openstreetmap.josm.gui.DefaultNameFormatter;
    99
    1010public class RoleCorrectionTableModel extends
    1111CorrectionTableModel<RoleCorrection> {
    12     private static final PrimitiveNameFormatter NAME_FORMATTER = new PrimitiveNameFormatter();
    1312
    1413    public RoleCorrectionTableModel(List<RoleCorrection> roleCorrections) {
     
    4039        switch (colIndex) {
    4140        case 0:
    42             return NAME_FORMATTER.getName(roleCorrection.relation);
     41            return roleCorrection.relation.getDisplayName(DefaultNameFormatter.getInstance());
    4342        case 1:
    4443            return roleCorrection.member.getRole();
  • trunk/src/org/openstreetmap/josm/corrector/TagCorrector.java

    r1857 r1990  
    2828import org.openstreetmap.josm.data.osm.Relation;
    2929import org.openstreetmap.josm.data.osm.Way;
     30import org.openstreetmap.josm.gui.DefaultNameFormatter;
    3031import org.openstreetmap.josm.gui.JMultilineLabel;
    3132import org.openstreetmap.josm.gui.OptionPaneUtil;
    32 import org.openstreetmap.josm.gui.PrimitiveNameFormatter;
    3333import org.openstreetmap.josm.tools.GBC;
    3434import org.openstreetmap.josm.tools.ImageProvider;
    3535
    3636public abstract class TagCorrector<P extends OsmPrimitive> {
    37     private static final PrimitiveNameFormatter NAME_FORMATTER = new PrimitiveNameFormatter();
    3837
    3938    public abstract Collection<Command> execute(P primitive, P oldprimitive)
     
    101100
    102101                final JLabel primitiveLabel = new JLabel(
    103                         NAME_FORMATTER.getName(primitive) + ":",
     102                        primitive.getDisplayName(DefaultNameFormatter.getInstance()) + ":",
    104103                        ImageProvider.get(OsmPrimitiveType.from(primitive)),
    105104                        JLabel.LEFT
     
    127126
    128127                final JLabel primitiveLabel = new JLabel(
    129                         NAME_FORMATTER.getName(primitive),
     128                        primitive.getDisplayName(DefaultNameFormatter.getInstance()),
    130129                        ImageProvider.get(OsmPrimitiveType.from(primitive)),
    131130                        JLabel.LEFT
Note: See TracChangeset for help on using the changeset viewer.