[system] [l10n] emergency-call/index.html can't be localized

VERIFIED FIXED

Status

Firefox OS
Gaia::System
VERIFIED FIXED
5 years ago
5 years ago

People

(Reporter: delphine, Assigned: alive)

Tracking

({l12y})

unspecified
ARM
Gonk (Firefox OS)

Firefox Tracking Flags

(blocking-b2g:tef+, b2g18 verified, b2g18-v1.0.1 verified)

Details

(Whiteboard: l10n [target 28/2])

Attachments

(1 attachment)

Gaia   edaca00b1eb7534120b6255db5d5200fb1d86d65
BuildID 20130219070200
Version 18.0, 1.0.1 on pvt nightly builds

Repro:
* Go to Settings and create a code in the Phone Lock section, if it's not already done
* Change language in Settings (works for all locales - except English of course)
* Lock your phone so that you have to enter your Phone Lock code
* Click on Emergency Call button

Expected results:
* the Cancel button is localized

Actual results:
* the Cancel button is not localized
Component: Gaia::System::Lockscreen → Gaia::Settings
QA Contact: atsai
Summary: [Settings] [l10n] Inconsistencies with the lockscreen "Cancel" button when changing language in settings menu → [Settings] [l10n] Inconsistencies with the "Cancel" button in Phone Lock when changing languages in Settings
QA Contact: lebedel.delphine

Comment 1

5 years ago
Looking at https://github.com/mozilla-b2g/gaia/blob/master/apps/system/emergency-call/index.html#L141 and 159, the strings in the emergency-call page are just not localizable at all. That's fine for the dial numbers, but not for the real strings.

Putting this into our triage list. Vivien, David, anyone to loop in on the severity of this?
blocking-b2g: --- → tef?
Component: Gaia::Settings → Gaia::System
Keywords: l12y
Summary: [Settings] [l10n] Inconsistencies with the "Cancel" button in Phone Lock when changing languages in Settings → [system] [l10n] emergency-call/index.html can't be localized
Yes, this looks like a pretty critical issue for emergency calling - blocking.
Assignee: nobody → 21
blocking-b2g: tef? → tef+
Stealing
Assignee: 21 → alive
Created attachment 716415 [details]
https://github.com/mozilla-b2g/gaia/pull/8225

Patch v1:
* Add data-l10n-id attributes to emergency call
* Add a new slot in the locale file. -- I am not sure if we should use the `emergency-call-button`. Call l10n review too.
Attachment #716415 - Flags: review?(timdream)
Attachment #716415 - Flags: review?(l10n)
Attachment #716415 - Flags: review?(timdream) → review+

Comment 5

5 years ago
Comment on attachment 716415 [details]
https://github.com/mozilla-b2g/gaia/pull/8225

Forwarding this question to Vivien:

I think the CSS block to hide the localized strings should stay, and we need to add a snippet like

// Set the 'lang' and 'dir' attributes to <html> when the page is translated
window.addEventListener('localized', function showBody() {
  document.documentElement.lang = navigator.mozL10n.language.code;
  document.documentElement.dir = navigator.mozL10n.language.direction;
  // <body> children are hidden until the UI is translated
  document.body.classList.remove('hidden');
});


Not sure about the 'dir' and 'lang', those might actually just be good to have on the actually localized elements?
Attachment #716415 - Flags: review?(l10n) → review?(21)
Comment on attachment 716415 [details]
https://github.com/mozilla-b2g/gaia/pull/8225

:pike, I think you are right so I change the logic and transfer back r? to you.
Sorry didn't notice that.
Attachment #716415 - Flags: review?(21) → review?(l10n)

Comment 7

5 years ago
Can you test what happens if you set the document.documentElement.dir = 'rtl' ?

I'm concerned that the dialer switched to 3 2 1 instead of 1 2 3, and I don't think that's right. My gut feeling is that dialers are like video players, and stay LTR layout due to common hardware setups.
The actual text elements might need a dir='rtl', though. Setting the lang on those might help layout, too.
Interesting catch, but what you mentioned here is beyond this bug I believe.
The emergency dialer is copied and modified from dialer,
if rtl works bad, it affects dailer as well.

If you don't have other concern about a new l10n key, could I merge this first?

(In reply to Axel Hecht [:Pike] from comment #7)
> Can you test what happens if you set the document.documentElement.dir =
> 'rtl' ?
> 
> I'm concerned that the dialer switched to 3 2 1 instead of 1 2 3, and I
> don't think that's right. My gut feeling is that dialers are like video
> players, and stay LTR layout due to common hardware setups.
> The actual text elements might need a dir='rtl', though. Setting the lang on
> those might help layout, too.
(In reply to Axel Hecht [:Pike] from comment #7)
> Can you test what happens if you set the document.documentElement.dir =
> 'rtl' ?
> 
> I'm concerned that the dialer switched to 3 2 1 instead of 1 2 3, and I
> don't think that's right.

Could someone file a bug about this if that's the case?  Thanks.
(In reply to Axel Hecht [:Pike] from comment #7)
> Can you test what happens if you set the document.documentElement.dir =
> 'rtl' ?
> 
> I'm concerned that the dialer switched to 3 2 1 instead of 1 2 3, and I
> don't think that's right. My gut feeling is that dialers are like video

Just confirmed that the order of keypad doesn't change.

> players, and stay LTR layout due to common hardware setups.
> The actual text elements might need a dir='rtl', though. Setting the lang on
> those might help layout, too.

Updated

5 years ago
Attachment #716415 - Flags: review?(l10n) → review+
Whiteboard: l10n → l10n [target 28/2]

Comment 12

5 years ago
This issue appears to be fixed on Unagi device.
Build ID: 20130313070202
Kernel Date: Dec 5
Gecko: http://hg.mozilla.org/releases/mozilla-b2g18_v1_0_1/rev/e74dafa6b2d9
Gaia: b34e726147f8e671ad8c538b50900ccfbffcb084

The Cancel button is localized on the emergency dialer.

Verified fixed.
Status: RESOLVED → VERIFIED
status-b2g18-v1.0.1: fixed → verified

Comment 13

5 years ago
This issue appears fixed on Unagi build: 20130326070204
Kernel Date: Dec 5
Gecko: http://hg.mozilla.org/releases/mozilla-b2g18/rev/28b048ffb7a7
Gaia: ace1eb32a313da1232bbdf9cff2581a4b036356d
status-b2g18: fixed → verified
You need to log in before you can comment on or make changes to this bug.