Changeset 15473 in josm for trunk/data/validator/wikipedia.mapcss
- Timestamp:
- 2019-10-24T21:14:32+02:00 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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 */ 2 2 3 3 /* If there is no language at all, this is broken. Also catches 'wikipedia' used as 'email', 'website', 'ele' [sic!] ... */ … … 52 52 assertMatch: "node wikipedia=en:Foo%27s"; 53 53 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"; 54 62 } 55 63 … … 138 146 } 139 147 140 /* Wikipedia without wikidata */148 /* Wikipedia:lang without wikipedia */ 141 149 *[!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}"); 143 151 assertMatch: "node wikipedia:en=a"; 144 152 assertNoMatch: "node wikipedia=a wikipedia:en=b";
Note:
See TracChangeset
for help on using the changeset viewer.