Changeset 13788 in josm
- Timestamp:
- 2018-05-19T17:45:18+02:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/data/validator/deprecated.mapcss
r13786 r13788 557 557 } 558 558 559 /* see #10329 */ 559 /* see #10329, #15877 */ 560 /* simple key change */ 560 561 *[color][!colour] { 561 562 throwWarning: tr("{0} is deprecated", "{0.key}"); … … 563 564 group: tr("deprecated tagging"); 564 565 fixChangeKey: "color => colour"; 565 } 566 *[color][colour][tag(color)=tag(colour)] { 567 throwWarning: tr("{0} together with {1}", "{0.tag}", "{1.tag}"); 566 assertMatch: "way color=red"; 567 assertNoMatch: "way color=red colour=red"; 568 } 569 area[building:color][!building:colour] { 570 throwWarning: tr("{0} is deprecated", "{0.key}"); 571 suggestAlternative: "building:colour"; 572 group: tr("deprecated tagging"); 573 fixChangeKey: "building:color => building:colour"; 574 assertMatch: "way building:color=red"; 575 assertNoMatch: "way building:color=red building:colour=red"; 576 } 577 area[roof:color][!roof:colour] { 578 throwWarning: tr("{0} is deprecated", "{0.key}"); 579 suggestAlternative: "roof:colour"; 580 group: tr("deprecated tagging"); 581 fixChangeKey: "roof:color => roof:colour"; 582 assertMatch: "way roof:color=red"; 583 assertNoMatch: "way roof:color=red roof:colour=red"; 584 } 585 /* both tags with same value, remove color */ 586 *[color][colour][color=*colour] { 587 throwWarning: tr("{0} together with {1}", "{0.key}", "{1.key}"); 588 suggestAlternative: "colour"; 568 589 group: tr("deprecated tagging"); 569 590 set samecolor; … … 572 593 assertNoMatch: "way color=red colour=green"; 573 594 } 595 area[building:color][building:colour]["building:color"=*"building:colour"] { 596 throwWarning: tr("{0} together with {1}", "{0.key}", "{1.key}"); 597 suggestAlternative: "building:colour"; 598 group: tr("deprecated tagging"); 599 set samebuildingcolor; 600 fixRemove: "building:color"; 601 assertMatch: "way building:color=red building:colour=red"; 602 assertNoMatch: "way building:color=red building:colour=green"; 603 } 604 area[roof:color][roof:colour]["roof:color"=*"roof:colour"] { 605 throwWarning: tr("{0} together with {1}", "{0.key}", "{1.key}"); 606 suggestAlternative: "roof:colour"; 607 group: tr("deprecated tagging"); 608 set sameroofcolor; 609 fixRemove: "roof:color"; 610 assertMatch: "way roof:color=red roof:colour=red"; 611 assertNoMatch: "way roof:color=red roof:colour=green"; 612 } 613 /* both tags with different values, no autofix */ 574 614 *[color][colour]!.samecolor { 575 throwWarning: tr("{0} together with {1}", "{0.tag}", "{1.tag}"); 615 throwWarning: tr("{0} together with {1} and conflicting values", "{0.key}", "{1.key}"); 616 suggestAlternative: "colour"; 576 617 group: tr("deprecated tagging"); 577 618 assertNoMatch: "way color=red colour=red"; 578 619 assertMatch: "way color=red colour=green"; 579 620 } 580 *[/:color/]{ 621 *[building:color][building:colour]!.samebuildingcolor { 622 throwWarning: tr("{0} together with {1} and conflicting values", "{0.key}", "{1.key}"); 623 suggestAlternative: "building:colour"; 624 group: tr("deprecated tagging"); 625 assertNoMatch: "way building:color=red building:colour=red"; 626 assertMatch: "way building:color=red building:colour=green"; 627 } 628 *[roof:color][roof:colour]!.sameroofcolor { 629 throwWarning: tr("{0} together with {1} and conflicting values", "{0.key}", "{1.key}"); 630 suggestAlternative: "roof:colour"; 631 group: tr("deprecated tagging"); 632 assertNoMatch: "way roof:color=red roof:colour=red"; 633 assertMatch: "way roof:color=red roof:colour=green"; 634 } 635 /* further more universal checks, no autofix */ 636 *[/:color/][!building:color][!roof:color] { 581 637 throwWarning: tr("{0} is deprecated", "{0.key}"); 582 638 suggestAlternative: ":colour"; 583 639 group: tr("deprecated tagging"); 584 640 assertNoMatch: "way color=red"; 585 assertMatch: "way roof:color=grey"; 586 } 587 *[/color:/] { 641 assertNoMatch: "way roof:color=grey"; 642 assertMatch: "way cycleway:surface:color=grey"; 643 } 644 *[/color:/] { 588 645 throwWarning: tr("{0} is deprecated", "{0.key}"); 589 646 suggestAlternative: "colour:"; 590 647 group: tr("deprecated tagging"); 648 assertNoMatch: "way color=red"; 649 assertMatch: "way color:back=grey"; 591 650 } 592 651
Note:
See TracChangeset
for help on using the changeset viewer.