morenoh149 / react-native-contacts

React Native Contacts
MIT License
1.64k stars 560 forks source link

support for custom user defined contact labels #725

Closed Marchuck closed 9 months ago

Marchuck commented 10 months ago

Hello folks! I found it quite confusing that some labels change to 'other' after the contact import. I made a following change where all labels are translated into the language used in the phone. It also works with user-defined labels.

custom_labels

morenoh149 commented 10 months ago

I see you removed

                         case Phone.TYPE_HOME:
                                label = "home";
                                break;
                            case Phone.TYPE_WORK:
                                label = "work";
                                break;
                            case Phone.TYPE_MOBILE:
                                label = "mobile";
                                break;

will home work and mobile labels still work?

Marchuck commented 9 months ago

yes, it will work - it will also translate to language used, so TYPE_MOBILE stays "mobile" (for English language) and TYPE_MOBILE is "komórkowy" (for Polish language)