Closed Bug 881985 Opened 11 years ago Closed 11 years ago

[Settings] Do not update language button and description in Language menu

Categories

(Firefox OS Graveyard :: Gaia::Settings, defect, P1)

ARM
Gonk (Firefox OS)
defect

Tracking

(blocking-b2g:leo+, b2g18 fixed, b2g-v1.1hd fixed)

RESOLVED FIXED
1.1 QE3 (26jun)
blocking-b2g leo+
Tracking Status
b2g18 --- fixed
b2g-v1.1hd --- fixed

People

(Reporter: leo.bugzilla.gaia, Assigned: iliu)

References

Details

(Whiteboard: [TD-44870])

Attachments

(1 file)

1. Title : Do not update language button and description in Language menu 
2. Precondition : 
3. Tester's Action : 
1) Settings - Navigate Language : Do not display langauge description
2) Rebooting after setting language - Settings - Language : Display 'language' not selected language string on language button
4. Detailed Symptom : Do not display correct information
5. Expected : display selected language string
6. Reproducibility: Y
   - Frequency Rate : 100%
7.Gaia Master/v1-train : Reproduced
8. Version Info
Mozilla build ID: 20130526070207
Gaia Revision : 4d10e1297b859cacc174c0a54af61a7678d7c32d
Gecko Revision : 52341e43539a0e8b9aa77a9128cc3871439b8aa6
blocking-b2g: --- → leo?
blocking-b2g: leo? → leo+
Assignee: nobody → iliu
The root cause is that "localized" event comes earlier than "load" event. It depends on Bug 882592. 

As "localized" event comes, setttings app will do getSupportedLanguages() to update language description. In the first time, it will need to loadJSON() from '/shared/resources/languages.json'. The method of loadJSON() is defined in 'js/utils.js'. The file 'utils.js' is lazily loaded while "load" event comes. Once "localized" event comes earlier than "load" event, loadJSON() is undefine in the race condition.

I think fixing Bug 882592 is better than find out workaround, if we have enought time. Or we need to change the calling sequence.
Depends on: 882592
Whiteboard: [TD-44870]
Priority: -- → P1
Target Milestone: --- → 1.1 QE3 (24jun)
Whiteboard: [TD-44870]
Whiteboard: [TD-44870]
Comment on attachment 768196 [details]
Pointer to Github pull request: https://github.com/mozilla-b2g/gaia/pull/10658

Refine the calling sequence to let utils.js loading in correctly time.

Kaze,
Could you please help to review my pr? Thank you.
Attachment #768196 - Flags: review?(kaze)
Comment on attachment 768196 [details]
Pointer to Github pull request: https://github.com/mozilla-b2g/gaia/pull/10658

Ian, thanks for your work and your patience. :-)
Nice job, r=me
Attachment #768196 - Flags: review?(kaze) → review+
Thanks for Kaze's reviewing effort. We can close the issue now.

master: 0f6d59ee2868df0c3b88c88af881c121ae4cf623
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
I was not able to uplift this bug to v1-train.  If this bug has dependencies which are not marked in this bug, please comment on this bug.  If this bug depends on patches that aren't approved for v1-train, we need to re-evaluate the approval.  Otherwise, if this is just a merge conflict, you might be able to resolve it with:

  git checkout v1-train
  git cherry-pick -x -m1 0f6d59ee2868df0c3b88c88af881c121ae4cf623
  <RESOLVE MERGE CONFLICTS>
  git commit
Flags: needinfo?(iliu)
John,

Thanks for your reminder. I have fixed the conflicts for uplifting it.

v1-train: c7472acec84f0d4527cdd6fd555d289e1d3e1d1d
Flags: needinfo?(iliu)
v1.1.0hd: c7472acec84f0d4527cdd6fd555d289e1d3e1d1d
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: