Opened 10 years ago
Last modified 9 years ago
#12468 new enhancement
enhance display of boundaries in relation list dialog
| Reported by: | Klumbumbus | Owned by: | team |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Core | Version: | |
| Keywords: | Cc: | stoecker, bastiK, Don-vip |
Description (last modified by )
I received this idea via a pm from a user.
all boundary relations display the text boundary (...) in the relation list dialog
This could be more specific by adding the boundary type from our presets.
Additional for boudary=protected_area the value of protect_class could be shown in [] like this is already done for administrative boundaries with admin_level
So the display of relation/5874542 could enhance from:
boundary (...)
to
boundary: protected area [4] (...)
(See also #12467 for related regression.)
Attachments (0)
Change History (12)
comment:1 by , 10 years ago
| Description: | modified (diff) |
|---|
follow-up: 4 comment:2 by , 10 years ago
comment:3 by , 10 years ago
| Milestone: | → 16.02 |
|---|
follow-up: 5 comment:4 by , 10 years ago
Replying to simon04:
- define presets and use
name_template, see wiki:NameTemplate
Wow. I didn't know this exists. Using JOSM for several years and still discovering great features :)
Which of the two methods is preffered?
I case of first method: we already have presets in Geography/boundaries/*
I played a bit with name_template and this is the result (for the protected area boundary):
name_template="Boundary: Protected Area ?{ protect_class=* '[{protect_class}] ' | ''}" name_template_filter="boundary=protected_area"
Seems to work fine. Any improvements? The whole page wiki:NameTemplate is a bit confusing and hard to understand.
I'm not sure what is with i18n. Will name_template be a i18n string?
follow-up: 6 comment:5 by , 10 years ago
| Cc: | added |
|---|
Replying to Klumbumbus:
Which of the two methods is preffered?
I don't know. DefaultNameFormatter is quite a mess with various special treatments (e.g., addr:*) mixed with two or more parallel user-configurable systems (such as the pref key relation.nameOrder and the preset name_template). It might be a good idea to move some parts to name_templates in the defaultprestes. Other opinions?
I'm not sure what is with i18n. Will
name_templatebe a i18n string?
Not yet, but that could be added. The translators would be confronted with the name_template syntax, however.
comment:6 by , 10 years ago
Replying to simon04:
Replying to Klumbumbus:
Which of the two methods is preffered?
I don't know.
DefaultNameFormatteris quite a mess with various special treatments (e.g.,addr:*) mixed with two or more parallel user-configurable systems (such as the pref keyrelation.nameOrderand the presetname_template).
I think it's not too bad. We might as well include protect_class as another special treatment, makes no difference. On the long run, I agree a text-file configuration would be better.
It might be a good idea to move some parts to
name_templates in thedefaultprestes. Other opinions?
I'm not sure what is with i18n. Will
name_templatebe a i18n string?
Not yet, but that could be added. The translators would be confronted with the
name_templatesyntax, however.
Probably overkill, but a new and separate MapCSS-based system would work better for translations, e.g.
relation[boundary=protected_area][!protect_class] { label: tr("Boundary: Protected Area"); } relation[boundary=protected_area][protect_class] { label: tr("Boundary: Protected Area [{0}]", tag("protect_class")); }
comment:7 by , 10 years ago
the name_template approach sounds good. I did not know it neither, as it is not used in default presets. That's a good opportunity to use this feature and make it more visible to our users.
comment:8 by , 10 years ago
| Milestone: | 16.02 → 16.03 |
|---|
comment:10 by , 10 years ago
| Milestone: | 16.04 → 16.05 |
|---|
comment:11 by , 10 years ago
| Milestone: | 16.05 → 16.06 |
|---|
comment:12 by , 9 years ago
| Milestone: | 16.06 |
|---|



We have a few options:
name_template, see wiki:NameTemplatei18n/specialmessages.javaand enhanceorg.openstreetmap.josm.gui.DefaultNameFormatter#getRelationTypeName(similar totype=place)