datenanfragen / website

The Datenanfragen.de website including the request PDF generator and company information database
https://www.datenanfragen.de
MIT License
93 stars 125 forks source link

Mention ZIP Code in the "place" field placeholder #663

Open WebworkrNet opened 3 years ago

WebworkrNet commented 3 years ago

https://www.datenanfragen.de/generator/

In my opinion, the field for city should be supplemented by postcode. Currently, the entry of the postcode only results from the context.

Screenshot_20210911-121220_Firefox

zner0L commented 3 years ago

This is deliberate to avoid having to properly internationalize ZIP codes and city names/places. Often times, countries to this very differently and sometimes ZIP codes don't even correspond to city names or municipalities but other places entirely. Restricting this field means loosing a lot of necessary flexibility.

If you think this is confusing, I guess we could clarify by mentioning the ZIP code in the placeholder.

mal-tee commented 3 years ago

Once I got confused by this as well, I think we should clarify it. :D

WebworkrNet commented 3 years ago

If you think this is confusing, I guess we could clarify by mentioning the ZIP code in the placeholder.

Yes, that's what I had imagined. :-)

zner0L commented 3 years ago

If anyone wants to do this: What needs to be done is basically changing the string for the placeholder to include the word "ZIP" or a translated version. So a new placeholder would read: "Place and ZIP" or something similar. If you can try to do this in at least German and English. The strings can be found in src/i18n. Please read our guide on translations before submitting.

baltpeter commented 3 years ago

Do we really want to implement that? I'm pretty sure, this will break for some countries. For example, in the UK, the ZIP should be on a separate line from the city.

I do regret that we implemented this complex input for the addresses in the first place. I'm pretty sure we don't need the separation into the different components anywhere. We should have just used a textarea…

mal-tee commented 3 years ago

We can still move "back" to a textarea? :D

baltpeter commented 3 years ago

We could but someone would have to write code that migrates the old saved ID data to that. Probably not the end of the world but easy to do something wrong and mess up someone's saved ID data.

zner0L commented 3 years ago

Not just that, quite a lot of code depends that. I think of we move to a textarea, then we need to enforce a limit of lines, because otherwise it would break the address field at some point.

baltpeter commented 3 years ago

That too, good point. I'd say it would be possible if we were using Typescript and had a reliable way of finding uses of that. But alas we don't.

Anyway, the question of whether we want to change the placeholder remains. I'm voting "no". If anything, I think we should just rename them all to "Address line {1,2,…}".