Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Format a postal address according to its country #18

Closed
Netpilgrim opened this issue Jan 22, 2024 · 2 comments
Closed

Comments

@Netpilgrim
Copy link

On the contact info screen, format postal addresses depending on the country given as part of this address. Basically each one should be displayed the same way you would write it on an envelope to be sent to this address. This wouldn’t change the data stored in the separate fields of the structured ADR value. It would however be nice if the formatted address were included in a VCF export as LABEL parameter.

According to the Universal Postal Union the country name should be written in either English or French, which gives a manageable list of strings to check against. Some of the formatting is already taken care of by the data structure, e.g. placement of street name and house number in relation to each other. What remains is the order of the six data fields (a post office box should be incompatible with a street address) and the insertion of line breaks.

This is probably the kind of thing that will omit a few edge cases at first but with a default format to fall back on it would never be worse than the current behavior. And covering most cases shouldn’t be too much work once a general process for looking up and applying a format exists.

This is actually something I thought was already implemented because saving an address previously created with another app changes how it is formatted on the contact info screen, including capitalizing the country name and displaying the postal code in front of the locality. Since almost all of my contacts with postal addresses are German ones, this is the correct formatting. But as it turns out, the same formatting is used for all addresses, independent of country. (Note: Please let me know if this behavior somehow depends on my phone setup. I think it’s unlikely as I use US localization instead of German.)

@stephanritscher
Copy link
Owner

Hi Netpilgrim,

your idea seems valid, but I have little time and don't have many adresses / don't write mentionable amounts of mail abroad.
I currently try to contribute my changes to the FossifyOrg fork: FossifyOrg/Contacts#57
It might be worth to create a request there if my contribution is accepted.

Best regards,
Stephan

@Netpilgrim
Copy link
Author

@stephanritscher, thanks for replying to my comment. I totally understand that there’s not enough time for every feature request, especially low-priority ones like this one, and I hope that your contributions will be added to the Fossify app so more users will benefit from them and you won’t have to support them on your own.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants