Open koebi opened 3 years ago
Regarding name()
and displayName()
, for ease of access this mirrors conversation from #147:
@koebi:
This will only capitalize the first letter of the name, whereas the code formerly capitalized the first letter of every word of the name:
>> "directions_from_polyline_layers".capitalize().replace('_', ' ') 'Directions from polylines layers' >> " ".join(map(lambda x: x.capitalize(), "directions_from_polyline_layers".split('_'))) ,'Directions From Polyline Layers'
This is not to say any variant is better, just something to be aware of.
@TheGreatRefrigerator
Yes i was aware of that and deliberately change it to only capitalize the first letter as it was imho better style than capitalizing all > letters (From) as in normal english sentences. only one i would capitalize would be polyline as this should rather be the geojson variant of PolyLine or better yet the actual Qgis layer name (LineString). We can maybe tackle this, when we do renaming of algorithms and in turn decide how we display the name.
Some processing algorithm names aren't as clear as they could be, i.e.
Directions from points 1 layer
. As mentioned in #147, renaming could lead to scripts breaking downstream, so it would have to be investigated whether QGIS has a decent deprecation mechanism for these things.In the process, the names returned by
name()
anddisplayName()
should be re-considered as well.