Some of the mappings in the current code work (pass the tests) but the result is different to what you get if you create the same contact manually through the UI and then export it as a vCard, for example Roundcube uses phone:mobile not phone:cell and there is no email:pref field. I have changed the mapping so it matches the fields in the UI. I added some more aliases rcube_vcard to show existing vCards with mismatched fields nicely.
I have removed the subtype other from the IM field because that does not exist in rcube_vcard which means if when you hit save in the UI the value simply disappears, it’s not saved.
I have removed the variable rcube_csv2vcard::$label_map because it’s a duplicate of contents of /program/localization/en_US/csv2vcard.incand just a bit confusing currently /program/localization/en_US/csv2vcard.inc is not used by the code and this PR changes that.
I have another reason for wanting to use /program/localization/en_US/csv2vcard.inc over rcube_csv2vcard::$label_map and if this PR gets merged then I will propose 1 additional change which will remove the rcube_csv2vcard::$csv2vcard_map variable and simplify the mapping process by storing both the source and destination for the map in /program/localization/en_US/csv2vcard.inc and allowing multiple sources (including multiple languages) for the same destination. This is a slightly larger and may be more controversial change hence the separate PR.
For #9419
Some of the mappings in the current code work (pass the tests) but the result is different to what you get if you create the same contact manually through the UI and then export it as a vCard, for example Roundcube uses
phone:mobile
notphone:cell
and there is noemail:pref
field. I have changed the mapping so it matches the fields in the UI. I added some more aliasesrcube_vcard
to show existing vCards with mismatched fields nicely.I have removed the subtype
other
from the IM field because that does not exist inrcube_vcard
which means if when you hit save in the UI the value simply disappears, it’s not saved.I have removed the variable
rcube_csv2vcard::$label_map
because it’s a duplicate of contents of/program/localization/en_US/csv2vcard.inc
and just a bit confusing currently/program/localization/en_US/csv2vcard.inc
is not used by the code and this PR changes that.I have another reason for wanting to use
/program/localization/en_US/csv2vcard.inc
overrcube_csv2vcard::$label_map
and if this PR gets merged then I will propose 1 additional change which will remove thercube_csv2vcard::$csv2vcard_map
variable and simplify the mapping process by storing both the source and destination for the map in/program/localization/en_US/csv2vcard.inc
and allowing multiple sources (including multiple languages) for the same destination. This is a slightly larger and may be more controversial change hence the separate PR.