kartevonmorgen / kartevonmorgen.ts

Mapping-Frontend to find and add sustainable Organisations (Initiatives, Companies) and Events on Kartevonmorgen.org / MapofTomorrow.org
https://kartevonmorgen.org/
GNU General Public License v3.0
11 stars 12 forks source link

Correct Order of Adress #176

Closed wellemut closed 1 year ago

wellemut commented 1 year ago

Problem

For Germans, its a weired format which we have currently grafik https://www.kartevonmorgen.org/m/main/e/02e3e0d0f89940bc9112bf3ecb0f33bc?c=46.9356%2C7.5520&z=16.00&search=radiesli+

Solution

navid-kalaei commented 1 year ago

@wellemut I use address-formatter with country code 'DE'. it's the standard library for formatting addresses. please check again. if it still does not satisfies you then I will have to write a manual script, which would not be a good practice.

refrence: https://github.com/kartevonmorgen/kartevonmorgen.ts/blob/605713f69574d4f31b30589a35d23582354581a6/components/EntityAddress.tsx#L28

wellemut commented 1 year ago

Not working yet on https://dev.kartevonmorgen.org/m/main/e/02e3e0d0f89940bc9112bf3ecb0f33bc?c=46.9356%2C7.5520&z=16.00&search=radiesli

Order of Adress is still the same and dev frontend keeps reloading all the time.

navid-kalaei commented 1 year ago

street Nr, zip city, [state, country]

navid-kalaei commented 1 year ago

I fixed that. the problem was the street is named road, and zip is named postcode in the formatter. @wellemut just an idea, do you like to make the formatter dependant on the locale or just set it to always DE. for example I can set the US format for the en locale

wellemut commented 1 year ago

That is great now! grafik https://dev.kartevonmorgen.org/m/main/e/02e3e0d0f89940bc9112bf3ecb0f33bc?c=46.9356%2C7.5520&z=16.00&search=radiesli+

This way solves 95 of all usecases, I guess. If it is easy to make it dependent of locale do it, Otherwiese its a feature request in the future...

wellemut commented 1 year ago

Th out of shelf library does not support "," in between Street and Zip, so we ignore it.

wellemut commented 1 year ago

perfectly deployed