Closed Bug 969525 Opened 10 years ago Closed 10 years ago

[B2G][l10n][Contacts] "To export contacts insert a memory card" is displayed instead of "Cannot use SD Card because USB storage is enabled" when attempting to export contacts with USB Storage enabled.

Categories

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

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(b2g-v1.2 affected, b2g-v1.3 affected, b2g-v1.3T affected, b2g-v1.4 affected)

RESOLVED FIXED
Tracking Status
b2g-v1.2 --- affected
b2g-v1.3 --- affected
b2g-v1.3T --- affected
b2g-v1.4 --- affected

People

(Reporter: jzimbrick, Assigned: fcampo)

References

Details

(Keywords: l12y, regression, Whiteboard: LocRun1.3, permafail)

Attachments

(2 files, 1 obsolete file)

Attached image Screen displaying incorrect message. (deleted) —
Description:
The wrong string seems to be pulled when attempting to export contacts with USB storage enabled. "To export contacts insert a memory card" is displayed instead of "Cannot use SD Card because USB storage is enabled".

Prerequisite:
Have at least one contact created in the Contacts app.

Repro Steps:
1. Update Buri device to build 20140207004002.
2. Enable USB Mass storage in the Settings menu and plug the phone in to a computer.
3. Open the Contacts app.
4. Press the gear button in the upper right corner to open the Settings menu.
5. Tap Export Contacts.
6. Observe that the Memory card option is greyed out and the string "To export contacts insert a memory card" is displayed rather than the string informing the user that USB mass storage is enabled.

Actual:
The string "To export contacts insert a memory card" is displayed when USB mass storage is enabled.

See transvision string: http://transvision-beta.mozfr.org/string/?entity=apps/communications/contacts/contacts.properties:noMemoryCardMsgExport&repo=gaia_1_3

Expected:
The string "Cannot use SD Card because USB storage is enabled" is displayed.

See transvision string: http://transvision-beta.mozfr.org/string/?entity=apps/communications/contacts/contacts.properties:sdUMSEnabled&repo=gaia_1_3

1.3 Environmental Variables:
Device: Buri v1.3 Mozilla RIL
BuildID: 20140207004002
Gaia: 1527d1e450364e383eeb95ff898dca2042e2b4b5
Gecko: 0a6d83aabb02
Version: 28.0
Base Image: V1.2-device.cfg

1.2 Environmental Variables:
Device: Buri v1.2 Mozilla RIL
BuildID: 20140206004003
Gaia: 539a25e1887b902b8b25038c547048e691bd97f6
Gecko: 1592ce49929c
Version: 26.0
Base Image: V1.2-device.cfg

Notes:
Repro frequency: 100%
See attached: Screenshot

Checked for the LocRun 1.3 in Bengali, Bulgarian, Hungarian, Spanish, Italian, Traditional Chinese, Czech, Dutch, Russian, Slovak, German, Catalan, and English.

The correct string was displayed when we took the screenshots for the previous 1.2 locrun, so this is a regression as well.
To clarify on Comment 0's notes, this issue is affecting all the languages listed. The localised equivalent of "To export contacts insert a memory card" is displaying for all of those languages, instead of the proper message about USB storage.
Minor bug, not a blocker.
Blocks: 938423
Assignee: nobody → fernando.campo
Whiteboard: LocRun1.3 → LocRun1.3, burirun1.4-1
Attachment #8394098 - Flags: review?(jmcf)
Whiteboard: LocRun1.3, burirun1.4-1 → LocRun1.3, burirun1.4-1, burirun1.4-2
Comment on attachment 8394098 [details]
Link to PR - https://github.com/mozilla-b2g/gaia/pull/17382

negative review as 

a/ there is a simpler less intrusive solution using only the device storage API
b/ the proposed patch was not working properly in all cases, for instance when unchecking USB setting and keeping the cable plugged

Fernando, I would suggest you start fresh by taking the commit below as an starting point. Then, redo unit tests and re-test the proposed approach. thanks

https://github.com/jmcanterafonseca/gaia/commit/7766fd22f87dafad12763c1c351d20c2529300de
Attachment #8394098 - Flags: review?(jmcf) → review-
New PR with Jose Manuel's suggestions, thanks for the tip.

Got rid of the mozSettings dependency, updating sdcard state to SHARED (still not available when we come from enabling ums, but at least we know the proper state), and fixed the tests both for import and export.
Attachment #8394098 - Attachment is obsolete: true
Attachment #8397137 - Flags: review?(jmcf)
Comment on attachment 8397137 [details]
[2] Link to PR - https://github.com/mozilla-b2g/gaia/pull/17657

Fernando, We need another round. Let's aim at having this finished today
Attachment #8397137 - Flags: review?(jmcf)
Comment on attachment 8397137 [details]
[2] Link to PR - https://github.com/mozilla-b2g/gaia/pull/17657

PR update with recommendations.

Regarding the tests, I separated the ones regarding exclusively the settings screen and the ones that were focused on actual importing into different files.

During this review, I came to the conclusion that we really need to clean and update the current tests, due to the mixed code and not very logical distribution of them. I'll open a bug for this matter.
Attachment #8397137 - Flags: review?(jmcf)
Comment on attachment 8397137 [details]
[2] Link to PR - https://github.com/mozilla-b2g/gaia/pull/17657

thanks Fernando.
Attachment #8397137 - Flags: review?(jmcf) → review+
on master - 9dd7fbd186bfcd0ed698ced13fba148a6686511e

Thanks for the review and tips.

Opened bug 988906 to complete the reorganization and update of tests
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Whiteboard: LocRun1.3, burirun1.4-1, burirun1.4-2 → LocRun1.3, burirun1.4-1, burirun1.4-2, 1.3tarakorun2
Whiteboard: LocRun1.3, burirun1.4-1, burirun1.4-2, 1.3tarakorun2 → LocRun1.3, permafail
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: