Closed Bug 893053 Opened 11 years ago Closed 11 years ago

[B2G][l10n][Contacts]All Languages: Phone, Email, and Address labels revert to their english titles in the edit screen after restarting the Contacts app.

Categories

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

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

VERIFIED DUPLICATE of bug 876081

People

(Reporter: jzimbrick, Unassigned)

Details

Attachments

(2 files)

Description:
Phone, Email, and Address labels revert to their english titles in the edit screen after restarting the Contacts app, no matter what language they were set in or what language the phone is currently on.

Repro Steps:
1. Update Leo device to mozilla 1.1 build 20130711070209.
2. Enter the settings app and select a language other than English. (I tested Polish, Slovak, Greek, German, Spanish, Portuguese, Romanian, Croatian, Hungarian, Turkish, and Czech.)
3. Open the contacts app and create a contact that has information in the phone, email, and address fields, be sure that the labels for the phone, email, and address are set to a label in the currently selected language.
4. Close the contacts app with the task manager or restart the phone.
5. Select the contact and select edit.
6. Observe that all labels have reverted to their English titles.

Actual:
 Label names in the contacts app's edit screen are displayed in English.

Expected:
 Label names are shown in the currently selected language.

Environmental Variables
Gecko: http://hg.mozilla.org/releases/mozilla-b2g18/rev/aaa74e5efaf1
Gaia: 7cdcc46179d198cab11970964b181ede32a5b683
Platform Version: 18.1

Notes:
Repro frequency: 100%
See attached screenshots.
Attachment #774736 - Attachment description: Screen showing contact before editing screen with correct localization. → Screen showing English titles for labels in the edit screen.
Attachment #774738 - Attachment description: Screen showing English titles for labels in the edit screen. → Screen showing contact before editing screen with correct localization.
I was able to reproduce this with a fresh gecko b2g18 and gaia v1-train.

  gaia:  c55fb0020c853dfedcd258c0fb400b82fbd24d25
  gecko: 119736:282b5c37cf8d
The problem appears to be that this check is failing:

      if (tagList[j].type === type) {
          return true;
      }

At:

  https://github.com/mozilla-b2g/gaia/blob/v1-train/apps/communications/contacts/js/contacts_form.js#L542

If I relax the '===' to '==' it works.  I believe type is probably DOMString or something that does not pass the strict equality check.

Looking to see if this affects master now and, if not, how it was fixed there.
This was fixed previously on master in bug 876081, but never uplifted.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → DUPLICATE
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: