Ignore:
Timestamp:
2020-08-10T19:11:30+02:00 (5 years ago)
Author:
Klumbumbus
Message:

see #11541, see #19655 - Add wikidata textbox below every wikipedia textbox in all internal presets and warn if a wikipedia value looks like a wikidata value

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/resources/data/validator/wikipedia.mapcss

    r15546 r16861  
    145145}
    146146
     147/* Detect wikidata value wrongly in wikipedia key, not 100% safe as there might be wikipedia articles matching the regexp, therefore no fixChangeKey */
     148*[wikipedia][wikipedia =~ /^[-a-zA-Z]{2,12}:Q[1-9][0-9]{0,8}$/] {
     149  throwWarning: tr("{0} value looks like a {1} value", "{0.key}", "wikidata");
     150  assertNoMatch: "node wikipedia=a";
     151  assertNoMatch: "node wikipedia=de:a";
     152  assertNoMatch: "node wikipedia=de:Q";
     153  assertNoMatch: "node wikipedia=de:Q0";
     154  assertNoMatch: "node wikipedia=de:Q0123";
     155  assertNoMatch: "node wikipedia=en-GB:Q0123";
     156  assertMatch: "node wikipedia=de:Q123";
     157  assertMatch: "node wikipedia=de:Q1";
     158  assertMatch: "node wikipedia=en-GB:Q123";
     159  assertMatch: "node wikipedia=en-GB:Q1";
     160}
     161
    147162/* Wikipedia:lang without wikipedia */
    148163*[!wikipedia][/^wikipedia:/] {
Note: See TracChangeset for help on using the changeset viewer.