Index: src/org/openstreetmap/josm/actions/corrector/ReverseWayTagCorrector.java
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- src/org/openstreetmap/josm/actions/corrector/ReverseWayTagCorrector.java	(revision 16769)
+++ src/org/openstreetmap/josm/actions/corrector/ReverseWayTagCorrector.java	(date 1594809209380)
@@ -201,18 +201,31 @@
     }
 
     /**
-     * Inverts sign of a numeric value.
+     * Inverts sign of a numeric value and converts decimal number to use decimal point.
+     * Also removes sign from null value.
      * @param value numeric value
      * @return opposite numeric value
      */
     public static String invertNumber(String value) {
-        Pattern pattern = Pattern.compile("^([+-]?)(\\d.*)$", Pattern.CASE_INSENSITIVE);
+        Pattern pattern = Pattern.compile("^([+-]?)(\\d*[,.]?\\d*)(.*)$", Pattern.CASE_INSENSITIVE);
         Matcher matcher = pattern.matcher(value);
         if (!matcher.matches()) return value;
         String sign = matcher.group(1);
-        String rest = matcher.group(2);
+        String number = matcher.group(2);
+        String symbol = matcher.group(3);
         sign = "-".equals(sign) ? "" : "-";
-        return sign + rest;
+
+        if (!number.isEmpty()) {
+            String fixedNum = number.replace(",", ".");
+            double parsed = Double.parseDouble(fixedNum);
+            if (parsed != 0) {
+                return sign + fixedNum + symbol;
+            } else {
+                return fixedNum + symbol;
+            }
+        }
+
+        return value;
     }
 
     static List<TagCorrection> getTagCorrections(Tagged way) {
Index: test/unit/org/openstreetmap/josm/actions/corrector/ReverseWayTagCorrectorTest.java
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- test/unit/org/openstreetmap/josm/actions/corrector/ReverseWayTagCorrectorTest.java	(revision 16769)
+++ test/unit/org/openstreetmap/josm/actions/corrector/ReverseWayTagCorrectorTest.java	(date 1594809218692)
@@ -58,6 +58,11 @@
             assertSwitch(new Tag(k, "down"), new Tag(k, "up"));
             assertSwitch(new Tag(k, "something"), new Tag(k, "something"));
         }
+        // numbered incline (see #19508)
+        assertSwitch(new Tag("incline", "+0%"), new Tag("incline", "0%"));
+        assertSwitch(new Tag("incline", ".1%"), new Tag("incline", "-.1%"));
+        assertSwitch(new Tag("incline", "-10.0%"), new Tag("incline", "10.0%"));
+        assertSwitch(new Tag("incline", "0,6°"), new Tag("incline", "-0.6°"));
         // direction=forward/backward/...
         assertSwitch(new Tag("direction", "forward"), new Tag("direction", "backward"));
         assertSwitch(new Tag("direction", "backward"), new Tag("direction", "forward"));
@@ -99,7 +104,7 @@
     }
 
     private void assertSwitch(Tag oldTag, Tag newTag) {
-        Assert.assertEquals(ReverseWayTagCorrector.TagSwitcher.apply(oldTag), newTag);
+        Assert.assertEquals(newTag, ReverseWayTagCorrector.TagSwitcher.apply(oldTag));
     }
 
     private Map<OsmPrimitive, List<TagCorrection>> getTagCorrectionsForWay(String middleNodeTags) {
