Flash status strings are not localizable

RESOLVED INVALID

Status

Firefox OS
Gaia::Camera
RESOLVED INVALID
4 years ago
4 years ago

People

(Reporter: tchevalier, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

4 years ago
On devices with a flash, (Peak for instance), you can see "Flash: On", "Flash: Off", "Flash: Auto" when touching the flash setting icon in Camera App.

Those strings should be localizable.
https://github.com/mozilla-b2g/gaia/blob/master/apps/camera/js/camera.js#L35
https://github.com/mozilla-b2g/gaia/blob/master/apps/camera/js/camera.js#L280

supports: ['off', 'auto', 'on']
supports: ['off', 'torch']

If I'm reading the code right the status is used also as a string.
(Reporter)

Comment 2

4 years ago
I think this line https://github.com/mozilla-b2g/gaia/blob/master/apps/camera/js/camera.js#L844 should return

return _(name);

where name contains the values in supports: ['off', 'auto', 'on'] ?

"Flash:" seems hardcoded. GTG, will take a deeper look tonight
(Reporter)

Comment 3

4 years ago
Okay, I found where the string "Flash:" should be localized: https://github.com/mozilla-b2g/gaia/blob/master/apps/camera/js/views/hud.js#L88

I'm trying to do the same thing as here https://github.com/mozilla-b2g/gaia/blob/master/apps/camera/js/views/confirm.js#L24 (calling a template function), but it seems that even calling l10n.get('some string') doesn't work. It just prevents the app from starting, and there's nothing in the logcat. And of course, I have no idea why.

Flash modes should be localized here https://github.com/mozilla-b2g/gaia/blob/master/apps/camera/js/views/hud.js#L36
(Reporter)

Comment 4

4 years ago
The strings have been removed from the UI on master, this bug is now invalid.
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.