Closed Bug 1082688 Opened 5 years ago Closed 5 years ago

[L10n] Callscreen application name is not localizable

Categories

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

x86
Windows 8.1
defect
Not set

Tracking

(blocking-b2g:2.2+, b2g-v2.1 affected, b2g-v2.2 verified, b2g-master verified)

VERIFIED FIXED
2.2 S10 (17apr)
blocking-b2g 2.2+
Tracking Status
b2g-v2.1 --- affected
b2g-v2.2 --- verified
b2g-master --- verified

People

(Reporter: petercpg, Assigned: etienne)

References

Details

(Keywords: l12y, late-l10n, Whiteboard: LocRun2.1)

Attachments

(3 files)

Attached image 2014-10-14 16.27.26.png
Steps to reproduce:
1. Switch to any locale except English
2. Make a phone call
3. Tap three-way calling/conf call button to leave Callscreen
4. Swipe down the notification tray

Actual: The label shows "Callscreen", "Tap to show"

Expected: The label should be localized.


Device: Flame
Build: 20141013000205
Gaia: f5d4ff60
Platform Version: 34.0a2
I repro the problem in french, but only for the "Callscreen" string. "Tap to show" is well translated.

:flod, can you say if it's a hardcoded string or a missing translation? Thanks!
Flags: needinfo?(francesco.lodolo)
I confirm that on 2.2 "Tap to show" is correctly localized with Italian.

I think Peter is using 2.1, so it might be an issue only with that version. At the moment I don't have a phone with 2.1 to confirm this.

The name "Callscreen" is not localizable as far as I know

Compare sms manifest
https://github.com/mozilla-b2g/gaia/blob/master/apps/sms/manifest.webapp#L27-L30

With callscreen manifest
https://github.com/mozilla-b2g/gaia/blob/master/apps/callscreen/manifest.webapp#L48

So it's probably a bad idea to use it in the notification (unless we're bound to use the app's name).
Flags: needinfo?(francesco.lodolo)
Renaming the bug to say that only Callscreen is the problem. Toggling the status flags per comment 0 and comment 2.

Doug, do you know since which version the callscreen appears in the notification drop down?
Flags: needinfo?(drs.bugzilla)
Summary: [B2G][L10n][l12y] Callscreen messages in notification tray not localizable → [L10n] Callscreen application name is not localizable
(In reply to Johan Lorenzo [:jlorenzo] (QA) from comment #3)
> Doug, do you know since which version the callscreen appears in the
> notification drop down?

The Callscreen landed as a separate app in 1.4, so I would assume starting there. We had lots of translation issues with it too, until 2.1 or so.
Flags: needinfo?(drs.bugzilla)
QA wanted to check 2.0 (with v180 base image) and 1.4 (with v123 base image).
Keywords: qawanted
(In reply to Johan Lorenzo [:jlorenzo] (QA) from comment #5)
> QA wanted to check 2.0 (with v180 base image) and 1.4 (with v123 base image).

On v2.0 while in an active call and navigate to another screen (either by original STR or by pressing Home button), the status bar/utility tray can NOT be pulled down.

I believe it is a new feature implemented in 2.1 onwards to be able to pull down the utility tray while in a call.

Not setting tracking flag on 2.0 or below since they don't actually possess this feature.
QA Whiteboard: [QAnalyst-Triage?]
Flags: needinfo?(jmitchell)
Keywords: qawanted
QA Whiteboard: [QAnalyst-Triage?] → [QAnalyst-Triage+]
Flags: needinfo?(jmitchell)
I'm confused about what's blocking us here. Any chance we can get a fix on 2.2 before string freeze?
Duplicate of this bug: 1142824
[Blocking Requested - why for this release]:

As per Dupe Bug 1142824, master affected as well
Since we're already late in the game for 2.2, I'll nominate this for 3.0. We should definitely get this fixed there
blocking-b2g: --- → 3.0?
tracking: we should fix this
blocking-b2g: 3.0? → 3.0+
blocking-b2g: 3.0+ → 2.2+
Oleg, Steve, can one of you take this?
Flags: needinfo?(schung)
Flags: needinfo?(azasypkin)
Oleg/Steve, I can take this one.
Assignee: nobody → thills
Flags: needinfo?(schung)
Flags: needinfo?(azasypkin)
Hi Etienne,

Would you be able to feedback this for me to see if I'm heading in right direction as I'm not that familiar with system.  

So, essentially the word "Callscreen" is translated in the manifests and put into a notification in AttentionWindow.makeNotification.  This seems to get done only at startup, so if user changes the language, it will not get retranslated... So, I listened for the language change in dialer agent and then modified the text of the existing node.

Just wanted to see if I'm right track here as this is a 2.2 blocker.

Thanks,

-tamara
Attachment #8585565 - Flags: feedback?(etienne)
Status: NEW → ASSIGNED
Comment on attachment 8585565 [details] [diff] [review]
WIP for feedback (no tests... yet)

Review of attachment 8585565 [details] [diff] [review]:
-----------------------------------------------------------------

Thanks for identifying the issue and fixing a system bug!
Here's my suggestion (just rejig-erring stuff):

* the AppWindowManager should listen to |languagechange| and broadcast it to the open attention windows (like [1])
* AppWindows should keep a reference on their title DOM
* AppWindows should listen to the '_languagechange' event broadcasted on their own element and update their title

This way we fix the issue for all attention windows (not just the callscreen) :)

PS: I _think_ listening to languagechange and not re-waiting for l10n.ready should work but we can add the settings listener to the AppWindowManager if it doesn't.

[1] https://github.com/mozilla-b2g/gaia/blob/master/apps/system/js/attention_window_manager.js#L261-268
Attachment #8585565 - Flags: feedback?(etienne)
(In reply to Etienne Segonzac (:etienne) from comment #14)
> Comment on attachment 8585565 [details] [diff] [review]
> WIP for feedback (no tests... yet)
> 
> Review of attachment 8585565 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> Thanks for identifying the issue and fixing a system bug!
> Here's my suggestion (just rejig-erring stuff):
> 
> * the AppWindowManager should listen to |languagechange| and broadcast it to
> the open attention windows (like [1])
> * AppWindows should keep a reference on their title DOM
> * AppWindows should listen to the '_languagechange' event broadcasted on
> their own element and update their title
> 
> This way we fix the issue for all attention windows (not just the
> callscreen) :)
> 
> PS: I _think_ listening to languagechange and not re-waiting for l10n.ready
> should work but we can add the settings listener to the AppWindowManager if
> it doesn't.
> 
> [1]
> https://github.com/mozilla-b2g/gaia/blob/master/apps/system/js/
> attention_window_manager.js#L261-268

s/AppWindow/AttentionWindow/g
Hi Theo,

This bug is going to need manifest localization in addition to code changes.  The manifest changes needs to get done in this file:  http://hg.mozilla.org/gaia-l10n/ar/file/a1194e8fef7c/apps/callscreen/manifest.properties

I'm working on the code changes, but I'm not sure of the process to get the manifest localizations done for this bug.  Is this something you can help with?  

Thanks,

-tamara
Flags: needinfo?(theo.chevalier11)
You just need to make the manifest localizable in Gaia for en-US, the conversion process will take care of exposing the new string/file to localizers in Mercurial.
https://blog.mozilla.org/axel/2013/09/19/a-tale-of-convert-and-convert/
Flags: needinfo?(theo.chevalier11)
Hi Etienne,

What I'm finding is that this approach only seems to work while the Callscreen has an active ongoing call.

When I add the 'languagechange' event to the case here:  https://github.com/mozilla-b2g/gaia/blob/master/apps/system/js/attention_window_manager.js#L265, this._instances has no entries in it, hence it never gets broadcasted to the sub windows.  I believe the callscreen instances are removed once there are no active calls.  

Wanted to see if we should go back to the initial approach, or maybe I'm missing something.

Thanks,

-tamara
Flags: needinfo?(etienne)
Hi Guillaume,

In a nutshell, I'm trying to relocalize the notification title (from the manifest) in the Callscreen when the language changes.  I had an feedback patch that was working but was limited to the Callscreen window and was triggered from the dialer agent.

Etienne had a suggestion to make it work for all the windows (not just callscreen) and I'm finding that broadcasting the event as he's suggesting doesn't seem to work for Callscreen as there are no entries in the this._instances at  https://github.com/mozilla-b2g/gaia/blob/master/apps/system/js/attention_window_manager.js#L265. The entries are only there while the callscreen has an active ongoing call.

Wonder if you can offer any advice on whether I'm missing something or if Callscreen is just a special case that this general approach won't work with.

Thanks,

-tamara
Flags: needinfo?(gmarty)
This is mostly a Gaia::System bug, so I'm switching it over. Tamara can continue to work on her patch and provide support, but without a System peer working on this, we can't guarantee that we'll be able to finish it by 2.2 FC.
Assignee: thills → nobody
Status: ASSIGNED → NEW
Component: Gaia::Dialer → Gaia::System
It's unclear to me why the callscreen doesn't get the language update if it's being killed after a call and reinstantiated when needed.
In any case, I'm not sure I can help here as I'm not that familiar with l10n.
tim, could you help to comment?
Flags: needinfo?(timdream)
Assignee: nobody → etienne
Flags: needinfo?(timdream)
Flags: needinfo?(gmarty)
Flags: needinfo?(etienne)
Etienne just assigned himself. Please ni me again if you need me.
Comment on attachment 8587417 [details] [review]
[gaia] etiennesegonzac:bug-1082688 > mozilla-b2g:master

I think I covered all the case including memory pressure and language change during a call.
Attachment #8587417 - Flags: review?(alive)
Attachment #8587417 - Flags: feedback?(thills)
Comment on attachment 8587417 [details] [review]
[gaia] etiennesegonzac:bug-1082688 > mozilla-b2g:master

Hi Etienne,

Thanks for taking this.  I realized I was missing the call in .show. I tested out and looks to cover all the scenarios.

Thanks again,

-tamara
Attachment #8587417 - Flags: feedback?(thills) → feedback+
Comment on attachment 8587417 [details] [review]
[gaia] etiennesegonzac:bug-1082688 > mozilla-b2g:master

Adding potential reviewers since this has an l10n dependency and needs to land on Monday.
Attachment #8587417 - Flags: review?(mhenretty)
Attachment #8587417 - Flags: review?(kgrandon)
Comment on attachment 8587417 [details] [review]
[gaia] etiennesegonzac:bug-1082688 > mozilla-b2g:master

Looks good to me. Thank you.
Attachment #8587417 - Flags: review?(kgrandon) → review+
Comment on attachment 8587417 [details] [review]
[gaia] etiennesegonzac:bug-1082688 > mozilla-b2g:master

Thanks!
Attachment #8587417 - Flags: review?(mhenretty)
Attachment #8587417 - Flags: review?(alive)
Keywords: checkin-needed
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Comment on attachment 8587417 [details] [review]
[gaia] etiennesegonzac:bug-1082688 > mozilla-b2g:master

[Approval Request Comment]
[Bug caused by] (feature/regressing bug #): bug 927862 - initial AttentionWindow
[User impact] if declined: non translated bit of UI on screen (in the utility tray)
[Testing completed]: callscreen scenarios in English and mirror English, including changing language during a call
[Risk to taking this patch] (and alternatives if risky): low (contained, tested patch)
[String changes made]: Adding a translation for the Callscreen app name
Attachment #8587417 - Flags: approval-gaia-v2.2?
Attachment #8587417 - Flags: approval-gaia-v2.2? → approval-gaia-v2.2+
This issue is verified fixed on Flame Master and 2.2.

Result: Both "Callscreen" and "Tap to show" strings are translated in French and Italian.

Environmental Variables:
Device: Flame 3.0 (KK, 319mb, full flash)
Build ID: 20150409010203
Gaia: 5dfd0460eb6e616205154b0d219aa5123bf1abb3
Gecko: 8f57f60ee58a
Gonk: b83fc73de7b64594cd74b33e498bf08332b5d87b
Version: 40.0a1 (Master)
Firmware Version: v18D-1
User Agent: Mozilla/5.0 (Mobile; rv:40.0) Gecko/40.0 Firefox/40.0


Environmental Variables:
Device: Flame 2.2 (KK, 319mb, full flash)
Build ID: 20150409002503
Gaia: ea735c21bfb0d78333213ff0376fce1eac89ead6
Gecko: 0efd5cdbe224
Gonk: ebad7da532429a6f5efadc00bf6ad8a41288a429
Version: 37.0 (2.2)
Firmware Version: v18D-1
User Agent: Mozilla/5.0 (Mobile; rv:37.0) Gecko/37.0 Firefox/37.0
Status: RESOLVED → VERIFIED
QA Whiteboard: [QAnalyst-Triage+] → [QAnalyst-Triage?]
Flags: needinfo?(ktucker)
QA Whiteboard: [QAnalyst-Triage?] → [QAnalyst-Triage+]
Flags: needinfo?(ktucker)
You need to log in before you can comment on or make changes to this bug.