Changeset 8725 in josm for trunk/data/validator


Ignore:
Timestamp:
2015-09-03T23:05:24+02:00 (9 years ago)
Author:
Klumbumbus
Message:

fix #8717 - add highway=milestone and railway=milestone to preset and mappaint style; add numerical validator tests and fix for pk/kp => distance; prefer distance before ref as text in MapView; typo

Location:
trunk/data/validator
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/data/validator/deprecated.mapcss

    r8699 r8725  
    513513  suggestAlternative: "...";
    514514}
     515
     516/* see #8717 */
     517*[kp][highway=milestone],
     518*[kp][railway=milestone],
     519*[kp][waterway=milestone] {
     520  throwWarning: tr("{0} is deprecated", "{0.key}");
     521  suggestAlternative: "distance";
     522  fixChangeKey: "kp => distance";
     523}
     524*[pk][highway=milestone],
     525*[pk][railway=milestone],
     526*[pk][waterway=milestone] {
     527  throwWarning: tr("{0} is deprecated", "{0.key}");
     528  suggestAlternative: "distance";
     529  fixChangeKey: "pk => distance";
     530}
  • trunk/data/validator/numeric.mapcss

    r8701 r8725  
    8282}
    8383*[maxweight][maxweight !~ /^(([0-9]+\.?[0-9]*( (t|kg|lbs))?)|([0-9]+\'[0-9]+\.?[0-9]*\"))$/] {
    84   throwWarning: tr("{0}: meters is default; period is separator; if units, put space then unit", "maxweight");
     84  throwWarning: tr("{0}: tonne is default; period is separator; if units, put space then unit", "maxweight");
    8585  assertMatch: "way maxweight=something";
    8686  assertMatch: "way maxweight=-5";
     
    106106  assertNoMatch: "way maxspeed=none";
    107107  assertNoMatch: "way maxspeed=variable";
     108}
     109
     110*[distance][distance !~ /^(([0-9]+\.?[0-9]*( (km|mi|nmi))?)|([0-9]+\'[0-9]+\.?[0-9]*\"))$/] {
     111  throwWarning: tr("{0}: kilometers is default; period is separator; if units, put space then unit", "distance");
     112  assertMatch: "way distance=something";
     113  assertMatch: "way distance=-5";
     114  assertNoMatch: "way distance=2";
     115  assertNoMatch: "way distance=2.5";
     116  assertNoMatch: "way distance=7 mi";
    108117}
    109118
Note: See TracChangeset for help on using the changeset viewer.