Camcorder mode label is untranslated if launched from Video app; occurs in all languages other than English

RESOLVED FIXED

Status

RESOLVED FIXED
4 years ago
3 years ago

People

(Reporter: pcheng, Assigned: gandalf)

Tracking

unspecified
ARM
Gonk (Firefox OS)

Firefox Tracking Flags

(b2g-v2.2 affected, b2g-master fixed)

Details

(Whiteboard: [3.0-Daily-Testing])

Attachments

(2 attachments)

(Reporter)

Description

4 years ago
Created attachment 8571640 [details]
logcat of issue on Flame 3.0

Description:
If user has no videos and launch Video app, they're being prompted to go to Camera to take videos. When they go to Camcorder from this dialog, the 'Video-mode' label that displays briefly in the viewfinder is NOT translated.

Prerequisite:
Have no videos on the device.

STR:
1) Change device language to any supported language other than English.
2) Launch Camera app, switch to camcorder mode, and observe the mode label briefly displayed above the shutter button is indeed translated.
3) Close Camera app and kill it via Task Manager (long-pressing Home button)
4) Open Video app, and tap on the button on the prompt to be taken to Camcorder

Expected:
The mode label is translated as seen at step 2

Actual:
The mode label is in English. User will see mode label becomes translated again if they switch to Camera mode and back.

Repro rate: 4/5; when it doesn't repro, it simply fails to display the mode label.

Attaching a logcat.

Video:
https://www.youtube.com/watch?v=-ls0PQoVkcE

Device: Flame 3.0
BuildID: 20150302010223
Gaia: f34ce82a840ad3c0aed3bfff18517b3f6a0eb37f
Gecko: eea6188b9b05
Gonk: e7c90613521145db090dd24147afd5ceb5703190
Version: 39.0a1 (3.0) 
Firmware Version: v18D-1
User Agent: Mozilla/5.0 (Mobile; rv:39.0) Gecko/39.0 Firefox/39.0
(Reporter)

Comment 1

4 years ago
This issue also occurs on Flame 2.2. Video mode label is untranslated if launched from Video app.

Device: Flame 2.2 (full flash 319MB)
BuildID: 20150302002504
Gaia: 77609916ca5ab721150fab2b7bc5c37f43ee3a5a
Gecko: 27ab8aa34201
Gonk: e7c90613521145db090dd24147afd5ceb5703190
Version: 37.0 (2.2) 
Firmware Version: v18D-1
User Agent: Mozilla/5.0 (Mobile; rv:37.0) Gecko/37.0 Firefox/37.0

---------

The feature to display which camera mode is being used is NOT implemented in 2.1.

Device: Flame 2.1 (full flash 319MB mem)
BuildID: 20150302001220
Gaia: 5d3479fdd438412adee4452720856b6b771fe5cd
Gecko: 9bf4c663241f
Gonk: e7c90613521145db090dd24147afd5ceb5703190
Version: 34.0 (2.1) 
Firmware Version: v18D-1
User Agent: Mozilla/5.0 (Mobile; rv:34.0) Gecko/34.0 Firefox/34.0
QA Whiteboard: [QAnalyst-Triage?]
status-b2g-v2.2: --- → affected
status-b2g-master: --- → affected
Flags: needinfo?(ktucker)
Whiteboard: [3.0-Daily-Testing]
Seems minor so not nominating to block on this.
QA Whiteboard: [QAnalyst-Triage?] → [QAnalyst-Triage+]
Flags: needinfo?(ktucker)
Hi Hema, who should we ask for help on l10n issues like this one?
Flags: needinfo?(hkoka)
(Reporter)

Comment 4

4 years ago
This issue also occurs on Accented English. I think it's a hardcoded issue. NI Delphine.
Flags: needinfo?(lebedel.delphine)

Comment 5

4 years ago
I do see that Video-Mode is set in the properties file for translation. 

locales/camera.en-US.properties:Video-Mode = Video Mode

Delphine would know or can point to the right person for translations of this string.
Flags: needinfo?(hkoka)
Hema: correct, I don't see that this is a localizability issue. For example as per http://hg.mozilla.org/gaia-l10n/fr/file/89adc1f6a4cd/apps/camera/camera.properties this was translated into French. Also looking at Transvision confirms that many locales have translated it http://transvision.mozfr.org/string/?entity=apps/camera/camera.properties:Video-Mode&repo=gaia

I've tested this on a 2.2 build, and I see this does occur. First launch of Video mode, shows up unlocalized vs second launch will show localized. ni on Gandalf to see if he can look into this? Or point to the right person for finding a fix.
Flags: needinfo?(lebedel.delphine) → needinfo?(gandalf)
Created attachment 8578431 [details] [review]
[gaia] zbraniecki:1138718-update-notifications-l10n-api > mozilla-b2g:master
(Assignee)

Comment 8

4 years ago
The reason why it didn't work was because we used synchronous mozL10n.get to create Notification overlay.

In most cases, we properly guarded it with mozL10n.ready/once, but if the activity was launched from another process, it was not.

I took the opportunity to align Camera's Notification API with https://developer.mozilla.org/en-US/Firefox_OS/Developing_Gaia/localization_code_best_practices#Writing_APIs_that_operate_on_L10nIDs
Flags: needinfo?(gandalf)
(Assignee)

Comment 9

4 years ago
Comment on attachment 8578431 [details] [review]
[gaia] zbraniecki:1138718-update-notifications-l10n-api > mozilla-b2g:master

Mike, you're on the list of suggested reviewers and have the shortest review queue. :)
Attachment #8578431 - Flags: review?(mhabicher)
Wilson, I think this is your area.
Flags: needinfo?(wilsonpage)
Comment on attachment 8578431 [details] [review]
[gaia] zbraniecki:1138718-update-notifications-l10n-api > mozilla-b2g:master

(Update the right flag.)
Attachment #8578431 - Flags: review?(mhabicher) → review?(wilsonpage)
Flags: needinfo?(wilsonpage)
Comment on attachment 8578431 [details] [review]
[gaia] zbraniecki:1138718-update-notifications-l10n-api > mozilla-b2g:master

Thanks for your work on this Zibi :)

I think we can improve the `notification.display()` API a little to make it clearer that it accepts l10n-ids (see github comments).

---

It's clearer to me now the advantages of using data-l10n-id, especially as we're lazily loading l10n.js (which is the cause of this bug). I think there may be other areas of the app that would benefit from similar changes.
Attachment #8578431 - Flags: review?(wilsonpage)
So for this bug, are we creating another patch to resolve the issue? (Since it wasn't r+ed)
Flags: needinfo?(wilsonpage)
(Assignee)

Comment 14

3 years ago
Sorry, taking it.
Assignee: nobody → gandalf
Status: NEW → ASSIGNED
Flags: needinfo?(wilsonpage)
Duplicate of this bug: 1151400
zibi: Do you have time to wrap this one up?
Flags: needinfo?(gandalf)
(Assignee)

Comment 17

3 years ago
Comment on attachment 8578431 [details] [review]
[gaia] zbraniecki:1138718-update-notifications-l10n-api > mozilla-b2g:master

Yup! Updated.
Flags: needinfo?(gandalf)
Attachment #8578431 - Flags: review?(wilsonpage)
Comment on attachment 8578431 [details] [review]
[gaia] zbraniecki:1138718-update-notifications-l10n-api > mozilla-b2g:master

Conditional r+:

- Needs some docs/comments explaining how the `notification.display()` API should be used and linking to relevant l10n docs.
Attachment #8578431 - Flags: review?(wilsonpage) → review+
(Assignee)

Comment 19

3 years ago
Added docs
Keywords: checkin-needed

Updated

3 years ago
Keywords: checkin-needed

Updated

3 years ago
Status: ASSIGNED → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
(Reporter)

Comment 21

3 years ago
Marking 3.0 as fixed so this will appear in our query.
status-b2g-master: affected → fixed
You need to log in before you can comment on or make changes to this bug.