Index: trunk/src/org/openstreetmap/josm/actions/OrthogonalizeAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/OrthogonalizeAction.java	(revision 19114)
+++ trunk/src/org/openstreetmap/josm/actions/OrthogonalizeAction.java	(revision 19115)
@@ -548,4 +548,10 @@
     enum Direction {
         RIGHT, UP, LEFT, DOWN;
+        /**
+         * Change a direction by the specified number of 90 degree increments counter-clockwise
+         * @param directionChange The number of increments to rotate counter-clockwise
+         * @return The new direction
+         */
+        @SuppressWarnings("EnumOrdinal") // Yes, this is very dependent on order
         public Direction changeBy(int directionChange) {
             int tmp = (this.ordinal() + directionChange) % 4;
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/properties/TagEditHelper.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/properties/TagEditHelper.java	(revision 19114)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/properties/TagEditHelper.java	(revision 19115)
@@ -2,4 +2,5 @@
 package org.openstreetmap.josm.gui.dialogs.properties;
 
+import static org.openstreetmap.josm.tools.I18n.marktr;
 import static org.openstreetmap.josm.tools.I18n.tr;
 import static org.openstreetmap.josm.tools.I18n.trn;
@@ -124,4 +125,8 @@
             (o1, o2) -> String.CASE_INSENSITIVE_ORDER.compare(o1.getValue(), o2.getValue());
 
+    private static final String CANCEL_TR = marktr("Cancel");
+    private static final String CANCEL = "cancel";
+    private static final String HTML = "<html>";
+    private static final String DUMMY = "dummy";
     /** Default number of recent tags */
     public static final int DEFAULT_LRU_TAGS_NUMBER = 5;
@@ -362,6 +367,6 @@
     private Collection<OsmPrimitive> updateSelection() {
         final DataSet activeDataSet = OsmDataManager.getInstance().getActiveDataSet();
+        activeDataSet.getReadLock().lock();
         try {
-            activeDataSet.getReadLock().lock();
             Collection<OsmPrimitive> selection = new ArrayList<>(OsmDataManager.getInstance().getInProgressSelection());
             this.sel = selection;
@@ -490,6 +495,6 @@
                 MainApplication.getMainFrame(),
                 tr("Overwrite tag"),
-                tr("Overwrite"), tr("Cancel"))
-            .setButtonIcons("ok", "cancel")
+                tr("Overwrite"), tr(CANCEL_TR))
+            .setButtonIcons("ok", CANCEL)
             .setContent(action)
             .setCancelButton(2)
@@ -505,6 +510,6 @@
 
         protected EditTagDialog(String key, Map<String, Integer> map, boolean initialFocusOnKey) {
-            super(MainApplication.getMainFrame(), trn("Change value?", "Change values?", map.size()), tr("OK"), tr("Cancel"));
-            setButtonIcons("ok", "cancel");
+            super(MainApplication.getMainFrame(), trn("Change value?", "Change values?", map.size()), tr("OK"), tr(CANCEL_TR));
+            setButtonIcons("ok", CANCEL);
             setCancelButton(2);
             configureContextsensitiveHelp("/Dialog/EditValue", true /* show help button */);
@@ -526,5 +531,5 @@
             JPanel mainPanel = new JPanel(new BorderLayout());
 
-            String msg = "<html>"+trn("This will change {0} object.",
+            String msg = HTML+trn("This will change {0} object.",
                     "This will change up to {0} objects.", sel.size(), sel.size())
                     +"<br><br>("+tr("An empty value deletes the tag.", key)+")</html>";
@@ -557,5 +562,5 @@
             keys.getModel().setComparator(Comparator.naturalOrder()); // according to Comparable
             keys.setEditable(true);
-            keys.setPrototypeDisplayValue(new AutoCompletionItem("dummy"));
+            keys.setPrototypeDisplayValue(new AutoCompletionItem(DUMMY));
             keys.getModel().addAllElements(keyList);
             keys.setSelectedItemText(key);
@@ -574,5 +579,5 @@
             values.setRenderer(new TEHListCellRenderer(values, values.getRenderer(), valueCount.get(key)));
             values.setEditable(true);
-            values.setPrototypeDisplayValue(new AutoCompletionItem("dummy"));
+            values.setPrototypeDisplayValue(new AutoCompletionItem(DUMMY));
             values.getModel().addAllElements(valueList);
             values.setSelectedItemText(selection);
@@ -817,6 +822,6 @@
 
         protected AddTagsDialog() {
-            super(MainApplication.getMainFrame(), tr("Add tag"), tr("OK"), tr("Cancel"));
-            setButtonIcons("ok", "cancel");
+            super(MainApplication.getMainFrame(), tr("Add tag"), tr("OK"), tr(CANCEL_TR));
+            setButtonIcons("ok", CANCEL);
             setCancelButton(2);
             configureContextsensitiveHelp("/Dialog/AddValue", true /* show help button */);
@@ -839,10 +844,10 @@
                 }
             };
-            mainPanel.add(new JLabel("<html>"+trn("This will change up to {0} object.",
+            mainPanel.add(new JLabel(HTML+trn("This will change up to {0} object.",
                 "This will change up to {0} objects.", sel.size(), sel.size())
                 +"<br><br>"+tr("Please select a key")), GBC.eol().fill(GridBagConstraints.HORIZONTAL));
 
             keys = new AutoCompComboBox<>();
-            keys.setPrototypeDisplayValue(new AutoCompletionItem("dummy"));
+            keys.setPrototypeDisplayValue(new AutoCompletionItem(DUMMY));
             keys.setEditable(true);
             keys.getModel().setComparator(Comparator.naturalOrder()); // according to Comparable
@@ -853,5 +858,5 @@
 
             values = new AutoCompComboBox<>();
-            values.setPrototypeDisplayValue(new AutoCompletionItem("dummy"));
+            values.setPrototypeDisplayValue(new AutoCompletionItem(DUMMY));
             values.setEditable(true);
             values.getModel().setComparator(Comparator.naturalOrder());
@@ -995,5 +1000,5 @@
                     lines.add(sc.getKeyText() + ' ' + tr("to add first suggestion without closing the dialog"))
             );
-            final JLabel helpLabel = new JLabel("<html>" + String.join("<br>", lines) + "</html>");
+            final JLabel helpLabel = new JLabel(HTML + String.join("<br>", lines) + "</html>");
             helpLabel.setFont(helpLabel.getFont().deriveFont(Font.PLAIN));
             contentPane.add(helpLabel, GBC.eol().fill(GridBagConstraints.HORIZONTAL).insets(5, 5, 5, 5));
@@ -1097,5 +1102,5 @@
                 // Create tag label
                 final String color = action.isEnabled() ? "" : "; color:gray";
-                final JLabel tagLabel = new JLabel("<html>"
+                final JLabel tagLabel = new JLabel(HTML
                         + "<style>td{" + color + "}</style>"
                         + "<table><tr>"
@@ -1238,5 +1243,5 @@
                 if (val != null && !val.equals(value)) {
                     String valueHtmlString = Utils.joinAsHtmlUnorderedList(Arrays.asList("<strike>" + val + "</strike>", value));
-                    if (!warnOverwriteKey("<html>"
+                    if (!warnOverwriteKey(HTML
                             + tr("You changed the value of ''{0}'': {1}", key, valueHtmlString)
                             + tr("Overwrite?"), "overwriteAddKey"))
