FossifyOrg / Contacts

Easy and quick contact management with no ads, handles groups and favorites too.
https://www.fossify.org
GNU General Public License v3.0
284 stars 24 forks source link

[Enhancement] Format phone numbers, when saving them #15

Closed inson1 closed 5 months ago

inson1 commented 8 months ago

Checklist

Is your feature request related to a problem? Please describe. Phone numbers looks bad and ugly. Currently, the phone numbers are just unformated strings of numbers, for example 555555555555.

Describe the solution you'd like title They should instead look like (555) 555-5555-555, +1-212-555-0101, 555 555 5555 555 or +491631737743 etc. Its going to vary from country to country. That should be the default and then you could change it in settings to another format.

inson1 commented 8 months ago

https://github.com/SimpleMobileTools/Simple-Contacts/issues/1012

Rexadev commented 7 months ago

Conditions

  1. If 1 number appear 3 times in a row group it
  2. If 1 number appear 2 times in a row group it
  3. But when grouping 2 numbers like in condition 2 if a lone no. if on it's left or right take it into the group
  4. There should be min 3 groups and max 4
inson1 commented 7 months ago

@Rexadev may you show some examples? I dont get it tbh, I mean mainly 2 and 3

Netpilgrim commented 7 months ago

Because there are many different national standards and personal preferences with regard to grouping, I strongly suggest that the default should always be the string as entered or imported. The only sensible format for any kind of normalization would be the international ITU format without any grouping, e.g. +491631737743 (also the safest choice for copy-and-pasting).

inson1 commented 7 months ago

@Netpilgrim cant it be done based on language maybe? and then on preference?

theoUniv commented 7 months ago

Hi,

Me and @Aychoumane are computer science students at the Paris 8 University.

In the context of free-software development class, we have to contribute to a project of our choice, so we would like to work on this issue.

We were thinking of using the android.PhoneNumberUtils library, would it be ok ?

Thanks.

inson1 commented 7 months ago

@theoUniv its android.telephony.PhoneNumberUtils, right? If yes this project already uses it, so if end result is good then I dont see any problem :) https://github.com/search?q=repo%3AFossifyOrg%2FContacts+PhoneNumberUtils&type=code

theoUniv commented 7 months ago

remote: Permission to FossifyOrg/Contacts.git denied to theoUniv. fatal: unable to access 'https://github.com/FossifyOrg/Contacts.git/': The requested URL returned error: 403

While trying to push our branch on the git, to make a merge request. We got this error.

Any requirement to contribute by coding ?

Aga-C commented 7 months ago

@theoUniv When working on open-source projects, you have to work on your own fork and after finishing work, create PR for merging the fork with upstream. Read how it works, e.g. here: https://www.freecodecamp.org/news/how-to-fork-a-github-repository/.

RokeJulianLockhart commented 6 months ago

https://github.com/FossifyOrg/Contacts/issues/15#issue-2066185224

@inson1, I would like them formatted as https://datatracker.ietf.org/doc/html/rfc3966#section-3 specifies.