Ignore:
Timestamp:
2008-12-31T00:36:58+01:00 (15 years ago)
Author:
stoecker
Message:

fixed relation handling, applied language patches

Location:
trunk/src/org/openstreetmap/josm/gui/dialogs
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/dialogs/RelationEditor.java

    r1169 r1195  
    1414import java.beans.PropertyChangeListener;
    1515import java.io.IOException;
    16 import java.lang.reflect.Array;
    1716import java.text.Collator;
    1817import java.util.ArrayList;
     
    304303            upDownPanel.setLayout(new BoxLayout(upDownPanel, BoxLayout.Y_AXIS));
    305304
    306 
    307 
    308             upDownPanel.add(createButton(null, "moveup", tr("Move the currently selected member(s) up"),
     305            upDownPanel.add(createButton(null, "moveup", tr("Move the currently selected members up"),
    309306                    KeyEvent.VK_U, new ActionListener() {
    310307                public void actionPerformed(ActionEvent e) {
     
    312309                }
    313310            }));
    314             upDownPanel.add(createButton(null, "movedown", tr("Move the currently selected member(s) down"),
     311            upDownPanel.add(createButton(null, "movedown", tr("Move the currently selected members down"),
    315312                    KeyEvent.VK_N, new ActionListener() {
    316313                public void actionPerformed(ActionEvent e) {
  • trunk/src/org/openstreetmap/josm/gui/dialogs/SelectionListDialog.java

    r1084 r1195  
    44import static org.openstreetmap.josm.tools.I18n.marktr;
    55import static org.openstreetmap.josm.tools.I18n.tr;
     6import static org.openstreetmap.josm.tools.I18n.trn;
    67
    78import java.awt.BorderLayout;
     
    3738import org.openstreetmap.josm.data.osm.Node;
    3839import org.openstreetmap.josm.data.osm.OsmPrimitive;
     40import org.openstreetmap.josm.data.osm.Relation;
    3941import org.openstreetmap.josm.data.osm.Way;
    4042import org.openstreetmap.josm.data.osm.visitor.BoundingXYVisitor;
     
    286288            int ways = 0;
    287289            int nodes = 0;
     290            int relations = 0;
    288291            for (OsmPrimitive o : sel) {
    289292                if (o instanceof Way)
     
    291294                else if (o instanceof Node)
    292295                    nodes++;
    293             }
    294             setText(String.format(tr("Selection: %d way(s) and %d node(s)"), new Object[] { ways, nodes }));
     296                else if (o instanceof Relation)
     297                    relations++;
     298            }
     299            String text = "";
     300            if(ways != 0)
     301                text += (text.length() > 0 ? ", " : "")
     302                + trn("{0} way", "{0} ways", ways, ways);
     303            if(nodes != 0)
     304                text += (text.length() > 0 ? ", " : "")
     305                + trn("{0} node", "{0} nodes", nodes, nodes);
     306            if(relations != 0)
     307                text += (text.length() > 0 ? ", " : "")
     308                + trn("{0} relation", "{0} relations", relations, relations);
     309            setText(tr("Selection: {0}", text));
    295310            addActionListener(this);
    296311        }
Note: See TracChangeset for help on using the changeset viewer.