openstreetmap-website icon indicating copy to clipboard operation
openstreetmap-website copied to clipboard

changesets: addresses buildings on the list

Open maro-21 opened this issue 7 months ago • 7 comments

In changesets, the recently added display of the building address instead of the way number itself is using the addr:housenumber addr:street scheme. In my language the order is reversed - first there is the street name and then the house number. It should be possible for translators to change this.

maro-21 avatar Jun 07 '25 21:06 maro-21

This has been an issue for the query tool since its introduction. It is relatively easy to let i18n do the templating, my preferred method and something I already implemented in cfb17435d1b11cd94aa865a6448e487b1a0cca17 before porting that logic to the browse helper. While that attempt was shut down, see https://github.com/openstreetmap/openstreetmap-website/pull/6037#discussion_r2102834913, I'm delighted to see this issue gaining traction.

hlfan avatar Jun 08 '25 05:06 hlfan

something I already implemented in cfb1743

So can it be merged too?

maro-21 avatar Jun 29 '25 13:06 maro-21

If you want to, you can copy this commit into a new PR, I'm not quite ready for another round of this.

hlfan avatar Jun 29 '25 13:06 hlfan

Is this a locale issue or a location issue? 🤔

My personal experience is with Spain (street-number) and the UK (number-street). For me, referring in English to a Spanish address using number-street sounds odd, and vice-versa. Taking this to a Polish example, in English I would say "Długi Targ 43-44" rather than "43-44 Długi Targ". Does that make sense? This might just be me though, I wonder how other people do it.

If I'm correct, then we would need a different mechanism which takes into account the location instead of the locale... but wait I'm sure there are areas with more than one style 😓 (I don't know which though).

pablobm avatar Oct 13 '25 11:10 pablobm

Address formats depend primarily on region and to a lesser extent on language. For example, addresses in China are ordered from biggest to smallest in Chinese but smallest to biggest in English. To be totally correct, we would need some mechanism for determining the location of each address point in the changeset. Can we instead find a way to make this look like not quite a properly formatted address but just a human-readable representation of the raw tags?

1ec5 avatar Oct 13 '25 14:10 1ec5

Can we instead find a way to make this look like not quite a properly formatted address but just a human-readable representation of the raw tags?

Isn't that what #721 tried to do? Remember that this also has to work in JS to be consistent.

hlfan avatar Oct 13 '25 15:10 hlfan

I just meant something more prosaic like “Number addr:housenumber on addr:street”, similar to the formulaic fallback labels for route relations in iD (e.g., “network ref directionbound from from to to via via”). This would also make the address element slightly easier to distinguish from other numbered elements like route relations.

Ironically, country indexing would be easier to accomplish in an Overpass query than the element inspector code. (I was considering putting that into #5493 in order to localize border types much more robustly, but I wasn’t sure about the performance impact.)

1ec5 avatar Oct 13 '25 20:10 1ec5