Closed Bug 904261 Opened 11 years ago Closed 10 years ago

[B2G][Contacts][SIM/SD card] Editing imported contacts does not localize certain strings

Categories

(Firefox OS Graveyard :: Gaia::Contacts, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: dsubramanian, Unassigned)

Details

Attachments

(1 file)

Description: 
When the user imports contacts, changes language on device and then makes changes to the contact user will see that not all strings are localized in contact details.

Repro Steps:
1) Flash to Leo Build ID: 20130812041203
2) Go to Contacts app
3) Tap on the gear icon
4) Tap on import from SIM/ SD card
5) Go to Settings to change the language (to Francias)
6) Go to Contacts app again, edit a contact.
7) Add a phone number and update the contact

Actual:
The user is able to see the edited contact phone type in English

Expected:
The user is able to see the edited contact phone type in language set

Environmental Variables
Build ID: 20130812041203
Gecko: http://hg.mozilla.org/releases/mozilla-b2g18/rev/36bbc5943448
Gaia: c60e3507d9df160e006d2e25967d26df2dc543cb
Platform Version: 18.1
RIL Version: 01.01.00.019.184 

Notes:
Repro frequency: 100%
See attached: screenshot
Attached image screenshot
From looking at the code previously I believe this is occurring because the import blindly copies the type value from the vcard to the new contact object.  This effectively treats the type as a "custom" type that will not be localized.

It seems we may want to compare the vcard type against our various localized translations.  If it matches one, then we would instead store our magic localized type token instead of the vcard type value.  To be most correct, we probably would need to check all languages, although perhaps a compromise would be just to check the currently selected language.
Oh, one more thing.  I believe the import code I looked at was vcard specific.  If we build something to solve this it would really be great to make it work for all import sources.
I think I remember that we did this for other imports.
Oh, hey, you know that already, sorry. :)
I don't reproduce this issue anymore on:
Gaia-Rev        6af3a8a833eb8bb651e8b188cb3f3c3a43bb4184
Gecko-Rev       https://hg.mozilla.org/mozilla-central/rev/76b85b90a8cb
Build-ID        20141111040202
Version         36.0a1
Device-Name     flame
FW-Release      4.4.2
FW-Incremental  eng.jlorenzo.20141002.104456
FW-Date         Thu Oct  2 10:45:09 CEST 2014
Bootloader      L1TC00011880

I imported some contacts from a 3.0 vCard where this field is present:
> TEL;TYPE=CELL:phone_number

In French on FFOS 2.2, there is no string "Portable" ("Mobile" is used instead). I checked against Spanish, I see "Móvil" for both fields.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: