#11253 closed defect (fixed)
[Patch] Parkings and maxstay: no unit for the maxstay-time
Reported by: | anonymous | Owned by: | Klumbumbus |
---|---|---|---|
Priority: | normal | Milestone: | 20.05 |
Component: | Internal preset | Version: | tested |
Keywords: | template_report maxstay unit | Cc: |
Description (last modified by )
What steps will reproduce the problem?
Select a random car parking and add a "maxstay"-time using the dialogue:
Select the maxstay-time in minutes (0, 30, 60, ...) from the drop-down-menu, and a "maxstay"-key/value-pair is added to the parking object. Everything works ok here.
What is the expected result?
According to the OSM wiki article on the "maxstay"-key (osmwiki:Key:maxstay) and the previous discussion (osmwiki:Proposed_features/Maximum_Stay) it seems necessary to add a unit of time (minute(s), hour(s), day(s)) after the numeric value.
Example: the key/value-pair of a maxstay of 120 minutes should be "maxstay=120 minutes", but...
What happens instead?
... JOSM omits the time unit and writes only "maxstay=120" although the dialogue advises to enter the time in minutes.
Perhaps, if accepted as a bug, this might also be a candidate for the built-in check and validator functions...
Revision: 8109 Repository Root: http://josm.openstreetmap.de/svn Relative URL: ^/trunk Last Changed Author: Don-vip Last Changed Date: 2015-03-02 00:13:51 +0100 (Mon, 02 Mar 2015) Build-Date: 2015-03-02 02:30:58 URL: http://josm.openstreetmap.de/svn/trunk Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b Last Changed Rev: 8109 Identification: JOSM/1.5 (8109 de) Windows 7 64-Bit Memory Usage: 123 MB / 989 MB (55 MB allocated, but free) Java version: 1.8.0_31, Oracle Corporation, Java HotSpot(TM) Client VM Dataset consistency test: No problems found Plugins: - FixAddresses (30892) - HouseNumberTaggingTool (30892) - OpeningHoursEditor (30962) - RoadSigns (30977) - buildings_tools (30955) - imagery_offset_db (30892) - namemanager (30892) - public_transport (30892) - reverter (30990) - tageditor (30892) - terracer (30892) - turnlanes (30892) - turnrestrictions (31034) Last errors/warnings: - E: java.io.IOException: No file found for: http://josm.openstreetmap.de/josmfile?page=Styles/PublicTransportation&style - E: Fehler beim Laden des Bildes 'error_small.png' - W: Mappaint style "standard" (FIXME Highlight Warnings) icon "error_small.png" not found. - E: Fehler beim Laden des Bildes 'maxspeed_icon.svg' - W: Mappaint style "standard" (Höchstgeschwindigkeit) icon "maxspeed_icon.svg" not found.
Attachments (5)
Change History (24)
comment:1 by , 5 years ago
Component: | Core → Internal preset |
---|---|
Priority: | trivial → normal |
comment:2 by , 5 years ago
Keywords: | maxstay unit added |
---|
comment:3 by , 5 years ago
comment:4 by , 5 years ago
I updated the preset patch and added the validator part, see josm_11253_preset_v2.patch and josm_11253_validator.patch. Hope it is ok in two separate files. Please, recheck, especially the validator part, as I am not that familiar with the mapcss, yet.
I was unsure about the values no
and unlimited
but 0
is even worse.
comment:5 by , 5 years ago
Description: | modified (diff) |
---|---|
Summary: | Parkings and maxstay: no unit for the maxstay-time → [Patch] Parkings and maxstay: no unit for the maxstay-time |
comment:6 by , 5 years ago
Milestone: | → 20.04 |
---|
comment:7 by , 5 years ago
Uff, the values (unit notations, to be more precise) in use are a mess – https://taginfo.openstreetmap.org/keys/maxstay#values
What a pity, since ISO 8601 defines a notation for durations, see https://en.wikipedia.org/wiki/ISO_8601#Durations
For example,
P3Y6M4DT12H30M5S
represents a duration of "three years, six months, four days, twelve hours, thirty minutes, and five seconds".
follow-up: 9 comment:8 by , 5 years ago
Ad attachment:josm_11253_preset_v2.patch
- we should also specify
values_no_i18n="true"
(to avoid exclude the strings from i18n) - is it
1.5 year
or1.5 years
?
follow-up: 10 comment:9 by , 5 years ago
Replying to simon04:
Ad attachment:josm_11253_preset_v2.patch
- we should also specify
values_no_i18n="true"
(to avoid exclude the strings from i18n)
Good point but how do we handle "unlimited" ?
- is it
1.5 year
or1.5 years
?
Any native speaker around ?
follow-up: 12 comment:10 by , 5 years ago
Replying to skyper:
Replying to simon04:
Ad attachment:josm_11253_preset_v2.patch
- we should also specify
values_no_i18n="true"
(to avoid exclude the strings from i18n)Good point but how do we handle "unlimited" ?
Better we use display_values
.
comment:11 by , 5 years ago
I've added display_values
in josm_11253_preset_v3.patch but I am not sure about plural or singular form of units for values below 2. Is it 1.5 hour
or 1.5 hours
?
follow-up: 15 comment:12 by , 5 years ago
Replying to skyper:
Replying to skyper:
Replying to simon04:
Ad attachment:josm_11253_preset_v2.patch
- we should also specify
values_no_i18n="true"
(to avoid exclude the strings from i18n)Good point but how do we handle "unlimited" ?
Better we use
display_values
.
The question was if we use values_no_i18n="true"
or not, because that will exclude all values or not. ("30 minutes" and similar, rather should be exluded, but "unlimited" or "no" rather not.) I don't see how display_values
could help here.
I would go with values_no_i18n="true"
because IIRC if you have e.g. in german "30 Minuten" in the combo and you manually change it to "45 Minuten", the value will be "45 Minuten", not "45 minutes", which would be bad.
comment:13 by , 5 years ago
The wiki lists one example "maxstay= 1.5 hour", but I would say "1.5 hours" makes more sense, see also https://www.dict.cc/?s=anderthalb+Stunden and https://www.englishclub.com/tefl-forums/viewtopic.php?t=1584. Also more values are tagged as plural than as singular with 1.5 as search expression on https://taginfo.openstreetmap.org/keys/?key=maxstay#values
by , 5 years ago
Attachment: | josm_11253_preset_v4.patch added |
---|
with values_no_i18n="true" and plural unit for 1.5
follow-up: 16 comment:14 by , 5 years ago
Ok, josm_11253_preset_v4.patch with values_no_i18n="true"
and correct plural form of unit.
Personally, I use the presets only to get auto-completion working and I use only English, so, I am far from being an expert.
The validator part could include autofixes for some common errors but I need some time to play with MapCSS first, to know what really is to do.
comment:15 by , 5 years ago
Replying to Klumbumbus:
I would go with
values_no_i18n="true"
because IIRC if you have e.g. in german "30 Minuten" in the combo and you manually change it to "45 Minuten", the value will be "45 Minuten", not "45 minutes", which would be bad.
There seems to be room for an enhancement, e.g. show display_values
in combo but always display values
for editing.
comment:16 by , 5 years ago
Replying to skyper:
The validator part could include autofixes for some common errors but I need some time to play with MapCSS first, to know what really is to do.
See source:trunk/resources/data/validator/numeric.mapcss for validation w.r.t. numbers and units.
Err, I overlooked attachment:josm_11253_validator.patch
comment:17 by , 5 years ago
Owner: | changed from | to
---|
And a Validator warning for values without units.