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 16762)
+++ src/org/openstreetmap/josm/actions/corrector/ReverseWayTagCorrector.java	(date 1594743388442)
@@ -206,13 +206,23 @@
      * @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(sign + fixedNum);
+            if (parsed > 0 || parsed < 0) {
+                return sign + number + 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 16762)
+++ test/unit/org/openstreetmap/josm/actions/corrector/ReverseWayTagCorrectorTest.java	(date 1594743406066)
@@ -96,10 +96,15 @@
         assertSwitch(new Tag("something", "prefix_down_suffix"), new Tag("something", "prefix_up_suffix"));
         // #8499
         assertSwitch(new Tag("type", "drawdown"), new Tag("type", "drawdown"));
+        // #19508
+        assertSwitch(new Tag("incline", "0%"), new Tag("incline", "0%"));
+        assertSwitch(new Tag("incline", "-10%"), new Tag("incline", "10%"));
+        assertSwitch(new Tag("incline", "0.6°"), new Tag("incline", "-0.6°"));
+        assertSwitch(new Tag("incline", "-10,33°"), new Tag("incline", "10,33°"));
     }
 
     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) {
