From 384cf20b33f173da25e6fe2fe0388a3685ece6ec Mon Sep 17 00:00:00 2001
From: Jeroen Hoek <mail@jeroenhoek.nl>
Date: Thu, 18 May 2023 18:29:07 +0200
Subject: [PATCH] Deprecated tag `parking:orientation`
`parking:orientation` is replaced by `orientation`. This commit
introduces a depracation warning and updates the preset.
---
resources/data/defaultpresets.xml | 4 ++--
resources/data/validator/deprecated.mapcss | 19 +++++++++++++++++++
resources/data/validator/ignoretags.cfg | 1 +
3 files changed, 22 insertions(+), 2 deletions(-)
diff --git a/resources/data/defaultpresets.xml b/resources/data/defaultpresets.xml
index b8bd02683..97bfd33e6 100644
|
a
|
b
|
|
| 2773 | 2773 | <reference ref="supervised_lit_oh" /> |
| 2774 | 2774 | <space /> |
| 2775 | 2775 | <label text="Only for street side parking: "/> |
| 2776 | | <combo key="parking:orientation" text="Orientation" values="diagonal,parallel,perpendicular" /> |
| | 2776 | <combo key="orientation" text="Orientation" values="diagonal,parallel,perpendicular" /> |
| 2777 | 2777 | </item> <!-- Parking --> |
| 2778 | 2778 | <item name="Parking Space" icon="presets/vehicle/parking/parking_space.svg" type="node,closedway" preset_name_label="true"> |
| 2779 | 2779 | <link wiki="Tag:amenity=parking_space" /> |
| … |
… |
|
| 2976 | 2976 | <check key="covered" text="Covered (with roof)" /> |
| 2977 | 2977 | <space /> |
| 2978 | 2978 | <label text="Only for street side parking: "/> |
| 2979 | | <combo key="parking:orientation" text="Orientation" values="diagonal,parallel,perpendicular" /> |
| | 2979 | <combo key="orientation" text="Orientation" values="diagonal,parallel,perpendicular" /> |
| 2980 | 2980 | </item> <!-- Parking --> |
| 2981 | 2981 | <item name="Motorcycle Dealer" icon="presets/vehicle/motorbike.svg" type="node,closedway,multipolygon" preset_name_label="true"> |
| 2982 | 2982 | <link wiki="Tag:shop=motorcycle" /> |
diff --git a/resources/data/validator/deprecated.mapcss b/resources/data/validator/deprecated.mapcss
index 5a195d181..1a5aa2c04 100644
|
a
|
b
|
way[shoulder=none] {
|
| 2464 | 2464 | assertNoMatch: "node historic=archaeological_site site_type2=fortification"; |
| 2465 | 2465 | } |
| 2466 | 2466 | |
| | 2467 | /* Tag was renamed, see #22957 */ |
| | 2468 | area[parking:orientation][!orientation][amenity=parking] { |
| | 2469 | throwWarning: tr("{0} is deprecated", "{0.tag}"); |
| | 2470 | group: tr("deprecated tagging"); |
| | 2471 | suggestAlternative: "{1.key}={0.value}"; |
| | 2472 | fixChangeKey: "{0.key} => {1.key}"; |
| | 2473 | } |
| | 2474 | area[parking:orientation][orientation]["parking:orientation"=*orientation][amenity=parking] { |
| | 2475 | throwWarning: tr("{0} is deprecated", "{0.tag}"); |
| | 2476 | group: tr("deprecated tagging"); |
| | 2477 | fixRemove: "{0.key}"; |
| | 2478 | } |
| | 2479 | area[parking:orientation][orientation]["parking:orientation"!=*orientation][amenity=parking] { |
| | 2480 | throwWarning: tr("{0} is deprecated", "{0.tag}"); |
| | 2481 | group: tr("deprecated tagging"); |
| | 2482 | suggestAlternative: "{1.key}={0.value}"; |
| | 2483 | suggestAlternative: "{1.key}={1.value}"; |
| | 2484 | } |
| | 2485 | |
| 2467 | 2486 | /* When tags are deprecated they should be added to ignoretags.cfg too. */ |
diff --git a/resources/data/validator/ignoretags.cfg b/resources/data/validator/ignoretags.cfg
index df2adfeba..b6cc31bd0 100644
|
a
|
b
|
E:toilet
|
| 740 | 740 | K:type=turnlanes:turns |
| 741 | 741 | K:surface=paving_stones:30 |
| 742 | 742 | E:site_type |
| | 743 | E:parking:orientation |
| 743 | 744 | ; |
| 744 | 745 | ; Tags not yet decided (to remove from this section when added or moved up when deprecated) |
| 745 | 746 | ; see josm tickets: 17770 15309 15774 16315 16658 16793 19982 21396 |