Clean up conference group header and text code to use latest l10n API

NEW
Unassigned

Status

Firefox OS
Gaia::Dialer
3 years ago
3 years ago

People

(Reporter: gtorodelvalle, Unassigned)

Tracking

(Blocks: 2 bugs)

Firefox Tracking Flags

(Not tracked)

Details

We should be using the L10n Web API (https://developer.mozilla.org/en-US/docs/Web/API/L10n_API) exposed by the navigator.mozL10n object as well as the new way to define the localisation metadata in the HTML files. We are currently partially doing it. For example, we are not currently using the once() or ready() functions to detect when the L10n context is ready to be used.

Apart from this:
  1. We should also avoid using the LazyL10n library.
  2. We shouldn't use the get() function to update the translated information shown on the pages but the setAttributes() function instead.
Anything you would like to add, Doug, before adding it to the Dialer most wanted bugs? ;)
Flags: needinfo?(drs.bugzilla)
Once we agree on the right description, I will file similar bugs for the rest of the apps: Call Log (so the patch to this bug does not become too big), Call Screen and EmergencyCall.
Blocks: 1036516
I don't think that this is the kind of thing where we should sit down and specifically work on it unless we're asked by the l10n team or someone else.

I asked for this to be filed because the location in code that I was referring to [1] is a particularly bad offender, to the point that it may be worth fixing in a bug specifically for that just because of how bad it is.

As for the general move towards using the newest l10n API, we can include this incrementally with other work we do.

[1] https://github.com/mozilla-b2g/gaia/pull/24825#discussion-diff-18874070
Flags: needinfo?(drs.bugzilla)
Summary: [Dialer] Proper use of the L10n Web API → Clean up conference group header and text code to use latest l10n API
Hey guys, thanks for filing it! :)

This document should help you here: https://developer.mozilla.org/en-US/Firefox_OS/Developing_Gaia/localization_code_best_practices
Blocks: 1093266
You need to log in before you can comment on or make changes to this bug.