Closed Bug 1037603 Opened 10 years ago Closed 10 years ago

Opening the dialer in RTL mode causes a visible direction switch

Categories

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

defect
Not set
normal

Tracking

(ux-b2g:2.1, b2g-v2.2 verified)

VERIFIED FIXED
2.2 S1 (5dec)
ux-b2g 2.1
Tracking Status
b2g-v2.2 --- verified

People

(Reporter: ehsan.akhgari, Assigned: drs)

References

Details

(Whiteboard: [planned-sprint c=3])

Attachments

(2 files)

The dialer first loads with the layout being LTR and then after it was loaded, it switches the direction of the UI, and that is quite noticeable.
Blocks: gaia-rtl
Tim, can anyone take this for Dialer? If not please ni? me and I'll see if Pavel can take it, but I think this one may go beyond front-end issues.
ux-b2g: --- → 2.1
Flags: needinfo?(timdream)
Dialer is not under my team. Please ping the contact point of Comms team instead.
Flags: needinfo?(timdream) → needinfo?(swilkes)
Hi Rik - Do you know who might be able to take this on?
Flags: needinfo?(swilkes) → needinfo?(anthony)
We have bug 1011731 in progress to always use the LTR layout for the keypad, even for RTL languages. I'm not familiar enough with RTL languages to know if it's a good practice. Ehsan: Could you help us know what's the best way to move forward here? See bug 1011731 comment 7.
Flags: needinfo?(anthony) → needinfo?(ehsan)
I would definitely expect the direction of the keypad to change for RTL, like this:

 3 2 1
 6 5 4
 9 8 7
 # 0 *
Flags: needinfo?(ehsan)
Blocks: dialer-rtl
No longer blocks: gaia-rtl
QA Contact: jlorenzo
Whiteboard: [planned-sprint c=?]
Target Milestone: --- → 2.2 S1 (5dec)
Assignee: nobody → drs.bugzilla
OS: Mac OS X → All
Hardware: x86 → All
Whiteboard: [planned-sprint c=?] → [planned-sprint c=3]
This is being caused by us lazy-loading the l10n.js library. Specifically, we import it here:
https://github.com/mozilla-b2g/gaia/blob/51e3d63754f3d9e765f811b7174d49bfa3a72d46/apps/communications/dialer/index.html#L77

Then l10n.js translates the document here:
https://github.com/mozilla-b2g/gaia/blob/51e3d63754f3d9e765f811b7174d49bfa3a72d46/shared/js/l10n.js#L1736

If I require l10n.js eagerly instead, the problem goes away.

I would prefer not to eagerly load l10n.js as it's such a massive library. My proposed solution to this is to separate out just the RTL logic into a new file, perhaps l10n_rtl.js, and eagerly load only that. I think that this would have lots of implications and impact many other apps, though. Zibi, Staś, what do you think?
Flags: needinfo?(stas)
Flags: needinfo?(gandalf)
Status: NEW → ASSIGNED
Why not just load it normally with defer? That makes the rtl part execute before firstpaint.
Clearing the needinfo request on me for now.  Doug, feel free to flag me or Zibi again if 'defer' isn't a good solution here.
Flags: needinfo?(stas)
Marking as fixed per Bug 1011731 comment 13 which is actually the current result shown up in the Dialer.
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Flags: needinfo?(gandalf)
Keywords: verifyme
Verified successfully on Flame 2.2
Gaia-Rev        f5b3d1b6cfa3e702033f613915ae637cb735cbfb
Gecko-Rev       https://hg.mozilla.org/releases/mozilla-b2g37_v2_2/rev/5d7497ce4cc7
Build-ID        20150120002507
Version         37.0a2
Device-Name     flame
FW-Release      4.4.2
Reproduce rate 0/5
Refer to picture 2015-01-20-19-13-36.png
Keywords: verifyme
Attached image 2015-01-20-19-13-36.png
Marking as Verified fixed as per Comment 11
Status: RESOLVED → VERIFIED
Flags: in-moztrap+
Attached image 2015-02-27-13-42-37.png
The Dialer layout is incorrect. Per the spec Rules of Thumb, numbers and numpads do not change direction (are not mirrored) in Arabic, because numerals are already, inherently Arabic numerals, and read LTR in Arabic. See screenshot. Dialer should not change in RTL.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: