Index: /trunk/src/org/openstreetmap/josm/actions/AutoScaleAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/AutoScaleAction.java	(revision 14220)
+++ /trunk/src/org/openstreetmap/josm/actions/AutoScaleAction.java	(revision 14221)
@@ -15,4 +15,5 @@
 import java.util.HashSet;
 import java.util.List;
+import java.util.Objects;
 import java.util.concurrent.TimeUnit;
 
@@ -45,4 +46,5 @@
  * Toggles the autoScale feature of the mapView
  * @author imi
+ * @since 17
  */
 public class AutoScaleAction extends JosmAction {
@@ -50,5 +52,67 @@
     /**
      * A list of things we can zoom to. The zoom target is given depending on the mode.
-     */
+     * @since 14221
+     */
+    public enum AutoScaleMode {
+        /** Zoom the window so that all the data fills the window area */
+        DATA(marktr(/* ICON(dialogs/autoscale/) */ "data")),
+        /** Zoom the window so that all the data on the currently selected layer fills the window area */
+        LAYER(marktr(/* ICON(dialogs/autoscale/) */ "layer")),
+        /** Zoom the window so that only data which is currently selected fills the window area */
+        SELECTION(marktr(/* ICON(dialogs/autoscale/) */ "selection")),
+        /** Zoom to the first selected conflict */
+        CONFLICT(marktr(/* ICON(dialogs/autoscale/) */ "conflict")),
+        /** Zoom the view to last downloaded data */
+        DOWNLOAD(marktr(/* ICON(dialogs/autoscale/) */ "download")),
+        /** Zoom the view to problem */
+        PROBLEM(marktr(/* ICON(dialogs/autoscale/) */ "problem")),
+        /** Zoom to the previous zoomed to scale and location (zoom undo) */
+        PREVIOUS(marktr(/* ICON(dialogs/autoscale/) */ "previous")),
+        /** Zoom to the next zoomed to scale and location (zoom redo) */
+        NEXT(marktr(/* ICON(dialogs/autoscale/) */ "next"));
+
+        private final String label;
+
+        AutoScaleMode(String label) {
+            this.label = label;
+        }
+
+        /**
+         * Returns the English label. Used for retrieving icons.
+         * @return the English label
+         */
+        public String getEnglishLabel() {
+            return label;
+        }
+
+        /**
+         * Returns the localized label. Used for display
+         * @return the localized label
+         */
+        public String getLocalizedLabel() {
+            return tr(label);
+        }
+
+        /**
+         * Returns {@code AutoScaleMode} for a given English label
+         * @param englishLabel English label
+         * @return {@code AutoScaleMode} for given English label
+         * @throws IllegalArgumentException if Engligh label is unknown
+         */
+        public static AutoScaleMode of(String englishLabel) {
+            for (AutoScaleMode v : values()) {
+                if (Objects.equals(v.label, englishLabel)) {
+                    return v;
+                }
+            }
+            throw new IllegalArgumentException(englishLabel);
+        }
+    }
+
+    /**
+     * A list of things we can zoom to. The zoom target is given depending on the mode.
+     * @deprecated Use {@link AutoScaleMode} enum instead
+     */
+    @Deprecated
     public static final Collection<String> MODES = Collections.unmodifiableList(Arrays.asList(
         marktr(/* ICON(dialogs/autoscale/) */ "data"),
@@ -62,7 +126,7 @@
 
     /**
-     * One of {@link #MODES}. Defines what we are zooming to.
-     */
-    private final String mode;
+     * One of {@link AutoScaleMode}. Defines what we are zooming to.
+     */
+    private final AutoScaleMode mode;
 
     /** Time of last zoom to bounds action */
@@ -112,7 +176,18 @@
      * Performs the auto scale operation of the given mode without the need to create a new action.
      * @param mode One of {@link #MODES}.
-     */
+     * @since 14221
+     */
+    public static void autoScale(AutoScaleMode mode) {
+        new AutoScaleAction(mode, false).autoScale();
+    }
+
+    /**
+     * Performs the auto scale operation of the given mode without the need to create a new action.
+     * @param mode One of {@link #MODES}.
+     * @deprecated Use {@link #autoScale(AutoScaleMode)} instead
+     */
+    @Deprecated
     public static void autoScale(String mode) {
-        new AutoScaleAction(mode, false).autoScale();
+        autoScale(AutoScaleMode.of(mode));
     }
 
@@ -140,8 +215,8 @@
     /**
      * Constructs a new {@code AutoScaleAction}.
-     * @param mode The autoscale mode (one of {@link AutoScaleAction#MODES})
+     * @param mode The autoscale mode (one of {@link AutoScaleMode})
      * @param marker Must be set to false. Used only to differentiate from default constructor
      */
-    private AutoScaleAction(String mode, boolean marker) {
+    private AutoScaleAction(AutoScaleMode mode, boolean marker) {
         super(marker);
         this.mode = mode;
@@ -151,35 +226,49 @@
      * Constructs a new {@code AutoScaleAction}.
      * @param mode The autoscale mode (one of {@link AutoScaleAction#MODES})
-     */
+     * @deprecated Use {@link #AutoScaleAction(AutoScaleMode)} instead
+     */
+    @Deprecated
     public AutoScaleAction(final String mode) {
-        super(tr("Zoom to {0}", tr(mode)), "dialogs/autoscale/" + mode, tr("Zoom the view to {0}.", tr(mode)),
-                Shortcut.registerShortcut("view:zoom" + mode, tr("View: {0}", tr("Zoom to {0}", tr(mode))),
-                        getModeShortcut(mode), Shortcut.DIRECT), true, null, false);
-        String modeHelp = Character.toUpperCase(mode.charAt(0)) + mode.substring(1);
+        this(AutoScaleMode.of(mode));
+    }
+
+    /**
+     * Constructs a new {@code AutoScaleAction}.
+     * @param mode The autoscale mode (one of {@link AutoScaleAction#MODES})
+     * @since 14221
+     */
+    public AutoScaleAction(final AutoScaleMode mode) {
+        super(tr("Zoom to {0}", mode.getLocalizedLabel()), "dialogs/autoscale/" + mode.getEnglishLabel(),
+              tr("Zoom the view to {0}.", mode.getLocalizedLabel()),
+              Shortcut.registerShortcut("view:zoom" + mode.getEnglishLabel(),
+                        tr("View: {0}", tr("Zoom to {0}", mode.getLocalizedLabel())),
+                        getModeShortcut(mode.getEnglishLabel()), Shortcut.DIRECT), true, null, false);
+        String label = mode.getEnglishLabel();
+        String modeHelp = Character.toUpperCase(label.charAt(0)) + label.substring(1);
         putValue("help", "Action/AutoScale/" + modeHelp);
         this.mode = mode;
         switch (mode) {
-        case "data":
+        case DATA:
             putValue("help", ht("/Action/ZoomToData"));
             break;
-        case "layer":
+        case LAYER:
             putValue("help", ht("/Action/ZoomToLayer"));
             break;
-        case "selection":
+        case SELECTION:
             putValue("help", ht("/Action/ZoomToSelection"));
             break;
-        case "conflict":
+        case CONFLICT:
             putValue("help", ht("/Action/ZoomToConflict"));
             break;
-        case "problem":
+        case PROBLEM:
             putValue("help", ht("/Action/ZoomToProblem"));
             break;
-        case "download":
+        case DOWNLOAD:
             putValue("help", ht("/Action/ZoomToDownload"));
             break;
-        case "previous":
+        case PREVIOUS:
             putValue("help", ht("/Action/ZoomToPrevious"));
             break;
-        case "next":
+        case NEXT:
             putValue("help", ht("/Action/ZoomToNext"));
             break;
@@ -197,8 +286,8 @@
             MapView mapView = MainApplication.getMap().mapView;
             switch (mode) {
-            case "previous":
+            case PREVIOUS:
                 mapView.zoomPrevious();
                 break;
-            case "next":
+            case NEXT:
                 mapView.zoomNext();
                 break;
@@ -241,14 +330,14 @@
     private BoundingXYVisitor getBoundingBox() {
         switch (mode) {
-        case "problem":
+        case PROBLEM:
             return modeProblem(new ValidatorBoundingXYVisitor());
-        case "data":
+        case DATA:
             return modeData(new BoundingXYVisitor());
-        case "layer":
+        case LAYER:
             return modeLayer(new BoundingXYVisitor());
-        case "selection":
-        case "conflict":
+        case SELECTION:
+        case CONFLICT:
             return modeSelectionOrConflict(new BoundingXYVisitor());
-        case "download":
+        case DOWNLOAD:
             return modeDownload(new BoundingXYVisitor());
         default:
@@ -286,5 +375,5 @@
     private BoundingXYVisitor modeSelectionOrConflict(BoundingXYVisitor v) {
         Collection<IPrimitive> sel = new HashSet<>();
-        if ("selection".equals(mode)) {
+        if (AutoScaleMode.SELECTION == mode) {
             OsmData<?, ?, ?, ?> dataSet = getLayerManager().getActiveData();
             if (dataSet != null) {
@@ -303,5 +392,5 @@
             JOptionPane.showMessageDialog(
                     MainApplication.getMainFrame(),
-                    "selection".equals(mode) ? tr("Nothing selected to zoom to.") : tr("No conflicts to zoom to"),
+                    AutoScaleMode.SELECTION == mode ? tr("Nothing selected to zoom to.") : tr("No conflicts to zoom to"),
                     tr("Information"),
                     JOptionPane.INFORMATION_MESSAGE);
@@ -357,23 +446,23 @@
         MapFrame map = MainApplication.getMap();
         switch (mode) {
-        case "selection":
+        case SELECTION:
             setEnabled(ds != null && !ds.selectionEmpty());
             break;
-        case "layer":
+        case LAYER:
             setEnabled(getFirstSelectedLayer() != null);
             break;
-        case "conflict":
+        case CONFLICT:
             setEnabled(map != null && map.conflictDialog.getSelectedConflict() != null);
             break;
-        case "download":
+        case DOWNLOAD:
             setEnabled(ds != null && !ds.getDataSources().isEmpty());
             break;
-        case "problem":
+        case PROBLEM:
             setEnabled(map != null && map.validatorDialog.getSelectedError() != null);
             break;
-        case "previous":
+        case PREVIOUS:
             setEnabled(MainApplication.isDisplayingMapView() && map.mapView.hasZoomUndoEntries());
             break;
-        case "next":
+        case NEXT:
             setEnabled(MainApplication.isDisplayingMapView() && map.mapView.hasZoomRedoEntries());
             break;
@@ -385,5 +474,5 @@
     @Override
     protected void updateEnabledState(Collection<? extends OsmPrimitive> selection) {
-        if ("selection".equals(mode)) {
+        if (AutoScaleMode.SELECTION == mode) {
             setEnabled(selection != null && !selection.isEmpty());
         }
@@ -418,7 +507,7 @@
 
         MapFrameAdapter() {
-            if ("conflict".equals(mode)) {
+            if (AutoScaleMode.CONFLICT == mode) {
                 conflictSelectionListener = e -> updateEnabledState();
-            } else if ("problem".equals(mode)) {
+            } else if (AutoScaleMode.PROBLEM == mode) {
                 validatorSelectionListener = e -> updateEnabledState();
             }
Index: /trunk/src/org/openstreetmap/josm/actions/ZoomToAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/ZoomToAction.java	(revision 14220)
+++ /trunk/src/org/openstreetmap/josm/actions/ZoomToAction.java	(revision 14221)
@@ -10,4 +10,5 @@
 import javax.swing.event.ListSelectionListener;
 
+import org.openstreetmap.josm.actions.AutoScaleAction.AutoScaleMode;
 import org.openstreetmap.josm.data.osm.OsmPrimitive;
 import org.openstreetmap.josm.gui.MainApplication;
@@ -99,5 +100,5 @@
         if (layer != null && primitive != null) {
             layer.data.setSelected(primitive);
-            AutoScaleAction.autoScale("selection");
+            AutoScaleAction.autoScale(AutoScaleMode.SELECTION);
         }
     }
Index: /trunk/src/org/openstreetmap/josm/gui/MainMenu.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/MainMenu.java	(revision 14220)
+++ /trunk/src/org/openstreetmap/josm/gui/MainMenu.java	(revision 14221)
@@ -30,4 +30,5 @@
 import org.openstreetmap.josm.actions.AlignInLineAction;
 import org.openstreetmap.josm.actions.AutoScaleAction;
+import org.openstreetmap.josm.actions.AutoScaleAction.AutoScaleMode;
 import org.openstreetmap.josm.actions.ChangesetManagerToggleAction;
 import org.openstreetmap.josm.actions.CloseChangesetAction;
@@ -720,7 +721,7 @@
         add(viewMenu, new ZoomOutAction());
         viewMenu.addSeparator();
-        for (String mode : AutoScaleAction.MODES) {
+        for (AutoScaleMode mode : AutoScaleMode.values()) {
             AutoScaleAction autoScaleAction = new AutoScaleAction(mode);
-            autoScaleActions.put(mode, autoScaleAction);
+            autoScaleActions.put(mode.getEnglishLabel(), autoScaleAction);
             add(viewMenu, autoScaleAction);
         }
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/CommandStackDialog.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/CommandStackDialog.java	(revision 14220)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/CommandStackDialog.java	(revision 14221)
@@ -38,4 +38,5 @@
 
 import org.openstreetmap.josm.actions.AutoScaleAction;
+import org.openstreetmap.josm.actions.AutoScaleAction.AutoScaleMode;
 import org.openstreetmap.josm.command.Command;
 import org.openstreetmap.josm.command.PseudoCommand;
@@ -453,5 +454,5 @@
         public void actionPerformed(ActionEvent e) {
             super.actionPerformed(e);
-            AutoScaleAction.autoScale("selection");
+            AutoScaleAction.autoScale(AutoScaleMode.SELECTION);
         }
     }
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/SelectionListDialog.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/SelectionListDialog.java	(revision 14220)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/SelectionListDialog.java	(revision 14221)
@@ -39,4 +39,5 @@
 import org.openstreetmap.josm.actions.AbstractSelectAction;
 import org.openstreetmap.josm.actions.AutoScaleAction;
+import org.openstreetmap.josm.actions.AutoScaleAction.AutoScaleMode;
 import org.openstreetmap.josm.actions.relation.DownloadSelectedIncompleteMembersAction;
 import org.openstreetmap.josm.actions.relation.EditRelationAction;
@@ -393,5 +394,5 @@
         @Override
         public void actionPerformed(ActionEvent e) {
-            AutoScaleAction.autoScale("selection");
+            AutoScaleAction.autoScale(AutoScaleMode.SELECTION);
         }
 
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/MemberTable.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/MemberTable.java	(revision 14220)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/MemberTable.java	(revision 14221)
@@ -22,4 +22,5 @@
 
 import org.openstreetmap.josm.actions.AutoScaleAction;
+import org.openstreetmap.josm.actions.AutoScaleAction.AutoScaleMode;
 import org.openstreetmap.josm.actions.ZoomToAction;
 import org.openstreetmap.josm.data.osm.OsmPrimitive;
@@ -239,9 +240,9 @@
                 getLayer().data.setSelected(WayConnectionType.Direction.FORWARD == connectionType.direction
                         ? way.firstNode() : way.lastNode());
-                AutoScaleAction.autoScale("selection");
+                AutoScaleAction.autoScale(AutoScaleMode.SELECTION);
             } else if (!connectionType.linkNext) {
                 getLayer().data.setSelected(WayConnectionType.Direction.FORWARD == connectionType.direction
                         ? way.lastNode() : way.firstNode());
-                AutoScaleAction.autoScale("selection");
+                AutoScaleAction.autoScale(AutoScaleMode.SELECTION);
             }
         }
Index: /trunk/src/org/openstreetmap/josm/gui/history/NodeListViewer.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/history/NodeListViewer.java	(revision 14220)
+++ /trunk/src/org/openstreetmap/josm/gui/history/NodeListViewer.java	(revision 14221)
@@ -22,4 +22,5 @@
 
 import org.openstreetmap.josm.actions.AutoScaleAction;
+import org.openstreetmap.josm.actions.AutoScaleAction.AutoScaleMode;
 import org.openstreetmap.josm.data.osm.IPrimitive;
 import org.openstreetmap.josm.data.osm.OsmData;
@@ -253,5 +254,5 @@
                 if (ds != null) {
                     ds.setSelected(p.getPrimitiveId());
-                    AutoScaleAction.autoScale("selection");
+                    AutoScaleAction.autoScale(AutoScaleMode.SELECTION);
                 }
             }
Index: /trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/AddNodeHandler.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/AddNodeHandler.java	(revision 14220)
+++ /trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/AddNodeHandler.java	(revision 14221)
@@ -9,4 +9,5 @@
 
 import org.openstreetmap.josm.actions.AutoScaleAction;
+import org.openstreetmap.josm.actions.AutoScaleAction.AutoScaleMode;
 import org.openstreetmap.josm.command.AddCommand;
 import org.openstreetmap.josm.data.UndoRedoHandler;
@@ -107,5 +108,5 @@
         ds.setSelected(node);
         if (PermissionPrefWithDefault.CHANGE_VIEWPORT.isAllowed()) {
-            AutoScaleAction.autoScale("selection");
+            AutoScaleAction.autoScale(AutoScaleMode.SELECTION);
         } else {
             MainApplication.getMap().mapView.repaint();
Index: /trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/AddWayHandler.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/AddWayHandler.java	(revision 14220)
+++ /trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/AddWayHandler.java	(revision 14221)
@@ -14,4 +14,5 @@
 
 import org.openstreetmap.josm.actions.AutoScaleAction;
+import org.openstreetmap.josm.actions.AutoScaleAction.AutoScaleMode;
 import org.openstreetmap.josm.command.AddCommand;
 import org.openstreetmap.josm.command.Command;
@@ -174,5 +175,5 @@
         ds.setSelected(way);
         if (PermissionPrefWithDefault.CHANGE_VIEWPORT.isAllowed()) {
-            AutoScaleAction.autoScale("selection");
+            AutoScaleAction.autoScale(AutoScaleMode.SELECTION);
         } else {
             MainApplication.getMap().mapView.repaint();
Index: /trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/LoadAndZoomHandler.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/LoadAndZoomHandler.java	(revision 14220)
+++ /trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/LoadAndZoomHandler.java	(revision 14221)
@@ -17,4 +17,5 @@
 
 import org.openstreetmap.josm.actions.AutoScaleAction;
+import org.openstreetmap.josm.actions.AutoScaleAction.AutoScaleMode;
 import org.openstreetmap.josm.actions.downloadtasks.DownloadOsmTask;
 import org.openstreetmap.josm.actions.downloadtasks.DownloadParams;
@@ -264,5 +265,5 @@
         // zoom_mode=(download|selection), defaults to selection
         if (!"download".equals(args.get("zoom_mode")) && !primitives.isEmpty()) {
-            AutoScaleAction.autoScale("selection");
+            AutoScaleAction.autoScale(AutoScaleMode.SELECTION);
         } else if (MainApplication.isDisplayingMapView()) {
             // make sure this isn't called unless there *is* a MapView
