Modify

Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#18883 closed enhancement (fixed)

InspectPrimitiveDialog: improve mapstyle summary

Reported by: simon04 Owned by: team
Priority: minor Milestone: 20.05
Component: Core Version:
Keywords: i18n inspect mappaint mapcss Cc:

Description

The output of InspectPrimitiveDialog#buildMapPaintText is very special and only targeted to style developers. Although some strings are translated (to German in the example below), the generated string is of no help for non English speakers. I suggest to remove the strings from I18n.

Stilzwischenspeicher für '‎Hausnummer 7 in Franz-Schranz-Weg‎ (4 Punkte)':

> MapCSS-Stil 'JOSM Standard (MapCSS)' anwenden

Bereich: |s14.929107086948488-29.858214173896975
 default: 
Cascade{ fill-color:#cb9999; fill-extent-threshold:0.5; fill-extent:25.0; font-size:9.0; }

> 'Potlatch 2' überspringen (nicht aktiv)

Liste der generierten Stile:
 * AreaElemStyle{z_idx=[1.0/0.0/0.0] color=#cb9999(alpha=50) fillImage=[null] extent=[25.0] extentThreshold=[0.5]}
 * TextElement{z_idx=[4.9/0.0/0.0] text=TextLabel{labelCompositionStrategy={DeriveLabelFromNameTagsCompositionStrategy} font=java.awt.Font[family=Droid Sans,name=Droid Sans,style=plain,size=9] color=#ffffff} labelPositionStrategy=CompletelyInsideAreaStrategy [offsetX=0.0, offsetY=0.0]}
 * LineElemStyle{z_idx=[3.0/-3.0/0.0] width=2.0 realWidth=0.0 color=#cb9999 dashed=null dashedColor=null linejoin=round linecap=round}


Stilzwischenspeicher für '‎606111653‎ (4 Punkte)':

> MapCSS-Stil 'JOSM Standard (MapCSS)' anwenden

Bereich: |s14.929107086948488-29.858214173896975
 default: 
Cascade{ fill-color:#51c4ef; fill-extent-threshold:0.5; fill-extent:25.0; font-size:9.0; z-index:-2.0; }
 core_access: 
Cascade{ color:#ff8080; dashes:[2.0, 2.0]; modifier:true; width:RelativeFloat{val=2.0}; z-index:-1.0; }

> 'Potlatch 2' überspringen (nicht aktiv)

Liste der generierten Stile:
 * AreaElemStyle{z_idx=[1.0/-2.0/0.0] color=#51c4ef(alpha=50) fillImage=[null] extent=[25.0] extentThreshold=[0.5]}
 * TextElement{z_idx=[4.9/-2.0/0.0] text=TextLabel{labelCompositionStrategy={DeriveLabelFromNameTagsCompositionStrategy} font=java.awt.Font[family=Droid Sans,name=Droid Sans,style=plain,size=9] color=#ffffff} labelPositionStrategy=CompletelyInsideAreaStrategy [offsetX=0.0, offsetY=0.0]}
 * LineElemStyle{z_idx=[3.0/-3.0/0.0] width=2.0 realWidth=0.0 color=#51c4ef dashed=null dashedColor=null linejoin=round linecap=round}


Die 2 ausgewählten Objekte haben verschiedene Stilzwischenspeicher.

Attachments (0)

Change History (10)

comment:1 by stoecker, 5 years ago

Style developers are also users of JOSM. The English-only exception applies only to texts which are meant to be read by JOSM developers.

comment:2 by simon04, 5 years ago

Agreed. But there are so many English strings in the excerpt from above: "default", "Cascade", "fill-color", "fill-extent-threshold", "fill-extent", "font-size", "AreaElemStyle, "TextElement", "LineElemStyle", … Actually, I find the text harder to read with the mixed English/German.

Also, Help/Styles/MapCSSImplementation is available in English plus 2 languages only, both additional languages display a warning of incompleteness at the top.

comment:3 by Don-vip, 5 years ago

Milestone: 20.0320.04

Descoping to release 20.03 early to address #18798, as we receive a lot of duplicates.

comment:4 by simon04, 5 years ago

@stoecker, how should we proceed?

comment:5 by stoecker, 5 years ago

Text and Layout should probably improved, so they are better understandable. A few words and phrases may help a lot:

'Potlatch 2' überspringen (nicht aktiv)

could be much better as (fixing the English text :-):

Stilinformationen des inaktiven Stils 'Potlatch 2':

Missing texts which aren't keywords should be translated. Stuff which is in style language must not be translated.

Bereich: |s14.929107086948488-29.858214173896975
 default: 
Cascade{ fill-color:#51c4ef; fill-extent-threshold:0.5; fill-extent:25.0; font-size:9.0; z-index:-2.0; }
 core_access: 
Cascade{ color:#ff8080; dashes:[2.0, 2.0]; modifier:true; width:RelativeFloat{val=2.0}; z-index:-1.0; }

I have no idea what that means, but I try anyway - probably like

Anzeigebereich: Zoomstufe 14.93 - 29.86
Standardwert für Anzeigestil: Cascade{ fill-color:#51c4ef; fill-extent-threshold:0.5; fill-extent:25.0; font-size:9.0; z-index:-2.0; }
WasAuchImmerCoreAccessIst: Cascade{ color:#ff8080; dashes:[2.0, 2.0]; modifier:true; width:RelativeFloat{val=2.0}; z-index:-1.0; }
  • Round values to useful digits
  • Cleanup layout
  • Cleanup texts (what is core_access)

And probably also a few separation lines to separate elements. And maybe better indentation to make clear what belongs to which heading.

comment:6 by simon04, 5 years ago

default and core_access are layer names used in the MapCSS file. We cannot / must not translate those.

Anzeigebereich: Zoomstufe 14.93 - 29.86

Rounding is an improvement, agreed. The output syntax corresponds to the input syntax of MapCSS. It would be inconsistent to rewrite the syntax for the zoom, but not for say fill-extent-threshold.

A good candidate for translation/explanation/removal would be "Cascade". This is nowhere explained on Help/Styles/MapCSSImplementation

My point of view still is: there's too much output related to MapCSS (all its English keywords) and the few German words in between don't make it comprehensible, but distract/confuse a reader since English/German switch on each second line.

in reply to:  6 comment:7 by stoecker, 5 years ago

Replying to simon04:

default and core_access are layer names used in the MapCSS file. We cannot / must not translate those.

So it could be Style for layer 'default':, which is translatable and also understandable.

My point of view still is: there's too much output related to MapCSS (all its English keywords) and the few German words in between don't make it comprehensible, but distract/confuse a reader since English/German switch on each second line.

That changes, when you make the translated texts into real texts and not only keywords. If this output is to help style developers then it probably also should explain some things and not only show them.

comment:8 by simon04, 5 years ago

Resolution: fixed
Status: newclosed

In 16322/josm:

fix #18883 - InspectPrimitiveDialog: improve mapstyle summary

comment:9 by simon04, 5 years ago

Summary: Remove i18n from InspectPrimitiveDialog#buildMapPaintText?InspectPrimitiveDialog: improve mapstyle summary
Styles for "‎House number 7 at Franz-Schranz-Weg‎ (4 nodes)":
=============================================================
MapCSS style "JOSM default (MapCSS)"
------------------------------------
Display range: |z0.0000-14.9291
Layer default
 * Cascade{ fill-color:#CB9999; fill-extent-threshold:0.5; fill-extent:25.0; font-size:11.0; }

List of generated Styles:
-------------------------
 * AreaElemStyle{z_idx=[1.0/0.0/0.0] color=#CB999932 fillImage=[null] extent=[25.0] extentThreshold=[0.5]}
 * TextElement{z_idx=[4.9/0.0/0.0] text=TextLabel{labelCompositionStrategy={DeriveLabelFromNameTagsCompositionStrategy} font=java.awt.Font[family=Droid Sans,name=Droid Sans,style=plain,size=11] rotationAngle=0.0rad color=#FFFFFF} labelPositionStrategy=CompletelyInsideAreaStrategy [offsetX=0.0, offsetY=0.0]}
 * LineElemStyle{z_idx=[3.0/-3.0/0.0] width=2.0 realWidth=0.0 color=#CB9999 dashed=null dashedColor=null linejoin=round linecap=round}


Styles for "‎606111653‎ (4 nodes)":
===================================
MapCSS style "JOSM default (MapCSS)"
------------------------------------
Display range: |z0.0000-14.9291
Layer default
 * Cascade{ fill-color:#51C4EF; fill-extent-threshold:0.5; fill-extent:25.0; font-size:11.0; z-index:-2.0; }
Layer core_access
 * Cascade{ color:#FF8080; dashes:[2.0, 2.0]; modifier:true; width:RelativeFloat{val=2.0}; z-index:-1.0; }

List of generated Styles:
-------------------------
 * AreaElemStyle{z_idx=[1.0/-2.0/0.0] color=#51C4EF32 fillImage=[null] extent=[25.0] extentThreshold=[0.5]}
 * TextElement{z_idx=[4.9/-2.0/0.0] text=TextLabel{labelCompositionStrategy={DeriveLabelFromNameTagsCompositionStrategy} font=java.awt.Font[family=Droid Sans,name=Droid Sans,style=plain,size=11] rotationAngle=0.0rad color=#FFFFFF} labelPositionStrategy=CompletelyInsideAreaStrategy [offsetX=0.0, offsetY=0.0]}
 * LineElemStyle{z_idx=[3.0/-3.0/0.0] width=2.0 realWidth=0.0 color=#51C4EF dashed=null dashedColor=null linejoin=round linecap=round}


The 2 selected objects have different style caches.

comment:10 by Klumbumbus, 5 years ago

Milestone: 20.0420.05

Milestone renamed

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.