Changeset 15473 in josm


Ignore:
Timestamp:
2019-10-24T21:14:32+02:00 (6 weeks ago)
Author:
Klumbumbus
Message:
  • fix #18251 - warn about wikipedia:lang tags with URL encoded values, no autofix as the syntax is not yet supported; reword an other validator warning
  • ignore traffic_calming=dynamic_bump, approved proposal but very few uses so far
Location:
trunk/data/validator
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/data/validator/ignoretags.cfg

    r15384 r15473  
    154154; Misc Tags
    155155;
     156K:traffic_calming=dynamic_bump
    156157K:type=is_in
    157158K:type=benchmark
  • trunk/data/validator/wikipedia.mapcss

    r15060 r15473  
    1 /* validation for the wikipedia=* tag - see tickets #8383, #14425 */
     1/* validation for the wikipedia=* tag - see tickets #8383, #14425, #18251 */
    22
    33/* If there is no language at all, this is broken. Also catches 'wikipedia' used as 'email', 'website', 'ele' [sic!] ... */
     
    5252  assertMatch: "node wikipedia=en:Foo%27s";
    5353  assertNoMatch: "node wikipedia=en:Foo";
     54}
     55
     56*[/^wikipedia:[-a-z]{2,12}$/][/^wikipedia:[-a-z]{2,12}$/ =~ /(?i).*%[0-9A-F][0-9A-F]/] {
     57  throwError: tr("{0} tag should not have URL-encoded values like ''%27''", "{0.key}");
     58  /* fixAdd: concat("{0.key}", "=", get(regexp_match("(?i)^([-a-z]+:)(.*)$", tag("{0.key}")),1), trim(replace(URL_decode(get(regexp_match("(?i)^([-a-z]+:)(.+)$", tag("{0.key}")),2)), "_", " "))); */
     59    /* tag("{0.key}") is not yet supported */
     60  assertMatch: "node wikipedia:de=Foo%27s";
     61  assertNoMatch: "node wikipedia:de=Foo";
    5462}
    5563
     
    138146}
    139147
    140 /* Wikipedia without wikidata */
     148/* Wikipedia:lang without wikipedia */
    141149*[!wikipedia][/^wikipedia:/] {
    142   throwWarning: tr("wikipedia tag is not set, but a ''{0}'' tag is. Make sure to use wikipedia=language:value together with wikidata tag.", "{1.key}");
     150  throwWarning: tr("''{0}'' tag is set, but no ''{1}'' tag. Make sure to set ''wikipedia=language:value'' for the main article and optional ''wikipedia:language=value'' only for additional articles that are not just other language variants of the main article.", "{1.key}", "{0.key}");
    143151  assertMatch: "node wikipedia:en=a";
    144152  assertNoMatch: "node wikipedia=a wikipedia:en=b";
Note: See TracChangeset for help on using the changeset viewer.