#17817 closed defect (fixed)
[PATCH] Misspelled property key - Key 'opening_hours:kitchen' looks like 'opening_hours:kitchen '
Reported by: | julianladisch | Owned by: | Klumbumbus |
---|---|---|---|
Priority: | normal | Milestone: | 19.06 |
Component: | Internal preset | Version: | latest |
Keywords: | Cc: | Klumbumbus |
Description
[15166] added
<combo key="opening_hours:kitchen " text="Kitchen Opening Hours" delimiter="|" values="24/7|08:30-12:30,15:30-20:00|Sa-Su 00:00-24:00|Mo-Fr 08:30-20:00; Sa,Su 08:00-15:00; PH off|Mo-Fr 08:30-20:00, Tu-Su 08:00-15:00; Sa 08:00-12:00|Mo-Su 08:00-18:00; Apr 10-15 off; Jun 08:00-14:00; Aug off; Dec 25 off|sunrise-sunset|Su 10:00+|week 01-53/2 Fr 09:00-12:00; week 02-52/2 We 09:00-12:00" values_no_i18n="true" />
to data/defaultpresets.xml.
The space at the end of "opening_hours:kitchen "
should be removed because it causes the validator to complain that the correct property key without that space is misspelled.
Attachments (1)
Change History (9)
by , 6 years ago
Attachment: | 17817-opening_hours-kitchen-space.patch added |
---|
comment:1 by , 6 years ago
Milestone: | → 19.06 |
---|
comment:3 by , 6 years ago
We could detect this automatically. I guess a regex like [a-z](_:[a-zA-Z0-9])+
matches all OSM keys?
comment:4 by , 6 years ago
I think there is already a test for spaces in keys and for leading and trailing spaces in values.
JOSM automatically removes leading and trailing spaces in keys and values too.
Is there a case missing which is not detected?
follow-up: 8 comment:6 by , 6 years ago
The test is done on loaded data but not on tags defined in presets.
comment:8 by , 6 years ago
Replying to Don-vip:
The test is done on loaded data but not on tags defined in presets.
Ah OK now I understand you meant a unit test.
Oops. Thanks for the info!