Closed Bug 1830989 Opened 3 years ago Closed 3 years ago

Add a document.l10n.setArgs method to DOMLocalization

Categories

(Core :: Internationalization, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
115 Branch
Tracking Status
firefox115 --- fixed

People

(Reporter: gregtatum, Assigned: gregtatum)

References

Details

Attachments

(1 file)

This bug comes out of a discussion on Matrix around the ergonomics of setting the l10n args.

Currently you need to know, or look up the l10n-id to set the args. If the id is the same it's a noop, but it's not very ergonomic.

  document.l10n.setAttributes(element, "containers-disable-alert-ok-button", {
    tabCount: 5
  });

With a setArgs you could do:

  document.l10n.setArgs(element, {
    tabCount: 5
  });
See Also: → 1830679
Pushed by gtatum@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/b413762f8c15 Add a document.l10n.setArgs method; r=webidl,smaug,eemeli
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 115 Branch
See Also: → 1832359
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: