Opened 8 years ago
Closed 7 years ago
#13932 closed enhancement (fixed)
Move some specific tests to country/regional rules
Reported by: | naoliv | Owned by: | Don-vip |
---|---|---|---|
Priority: | normal | Milestone: | 17.01 |
Component: | Core validator | Version: | |
Keywords: | Cc: |
Description
When #10387 gets fixed, rules like https://josm.openstreetmap.de/browser/josm/trunk/data/validator/highway.mapcss#L11 and https://josm.openstreetmap.de/browser/josm/trunk/data/validator/highway.mapcss#L86 should be moved to more specific (country/regional) rules.
Attachments (0)
Change History (23)
comment:1 by , 8 years ago
comment:2 by , 8 years ago
Milestone: | → 16.11 |
---|
follow-up: 5 comment:3 by , 8 years ago
The checks are language-specific, so we can indeed improve the boundaries file to add official languages, based on information from ISO3166 + ISO639, so we could have something like:
*[language("en")] ... { ... }
and the check would be applied only in countries or subdivisions where English is an official language.
comment:4 by , 8 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
follow-up: 7 comment:5 by , 8 years ago
Replying to Don-vip:
the check would be applied only in countries or subdivisions where English is an official language.
That sounds interresting. However regarding the *[name =~ /(?i).*Strasse.*/]
this one is country specific. Germany, Switzerland, Austria and Liechtenstein use the german language but only in Switzerland and Liechtenstein they write the word street with ss instead of ß (strasse instead of straße).
comment:7 by , 8 years ago
Replying to Klumbumbus:
regarding the
*[name =~ /(?i).*Strasse.*/]
this one is country specific.
Here is my modification of the code:
*[name =~ /(?i).*Strasse.*/][inside("DE,AT")] { throwError: tr("street name contains ss"); } *[name =~ /(?i).*Straße.*/][inside("LI,CH")] { throwError: tr("street name contains ß"); }
comment:10 by , 8 years ago
The test can be enhanced to addr:street
*[addr:street =~ /(?i).*Strasse.*/][inside("DE,AT")], *[name =~ /(?i).*Strasse.*/][inside("DE,AT")] { throwError: tr("street name contains ss"); } *[addr:street =~ /(?i).*Straße.*/][inside("LI,CH")], *[name =~ /(?i).*Straße.*/][inside("LI,CH")] { throwError: tr("street name contains ß"); }
comment:12 by , 8 years ago
Milestone: | 17.01 → 17.02 |
---|
comment:13 by , 8 years ago
Milestone: | 17.02 → 17.03 |
---|
comment:14 by , 8 years ago
Milestone: | 17.03 → 17.04 |
---|
comment:15 by , 8 years ago
Milestone: | 17.04 → 17.05 |
---|
comment:16 by , 8 years ago
Milestone: | 17.05 → 17.06 |
---|
comment:17 by , 8 years ago
Milestone: | 17.06 → 17.07 |
---|
comment:18 by , 7 years ago
Milestone: | 17.07 → 17.08 |
---|
comment:19 by , 7 years ago
Milestone: | 17.08 → 17.09 |
---|
comment:20 by , 7 years ago
Milestone: | 17.09 → 17.10 |
---|
comment:21 by , 7 years ago
Milestone: | 17.10 |
---|
comment:22 by , 7 years ago
This ticket is fixed in my eyes. The Straße/Strasse test was adapted and the other test, this one:
way[highway][name =~ /(?i).* (Ave|Blvd|Br|Brg|Cct|Cir|Cl|Cr|Crct|Cres|Crt|Ct|Dr|Drv|Esp|Espl|Hwy|Ln|Mw|Mwy|Pky|Pkwy|Pl|Rd|Qy|Qys|Sq|St|Str|Ter|Tce|Tr|Wy)[.]?$/] { throwWarning: tr("abbreviated street name"); assertMatch: "way highway=unclassified name=\"Foo Ave\""; assertMatch: "way highway=unclassified name=\"Foo Ave.\""; assertMatch: "way highway=unclassified name=\"Bou Blvd.\""; assertMatch: "way highway=unclassified name=\"Bou blvd.\""; }
is hard to split into different countries/languages. We should keep it as is. We didn't yet receive any tickets about problems with this test.
comment:23 by , 7 years ago
Milestone: | → 17.01 |
---|---|
Resolution: | → fixed |
Status: | assigned → closed |
Yes. The "street name contains ss" info can then be raised to warning or even error level. Currently it produces lots of false positives in switzerland.