Closed Bug 613072 Opened 14 years ago Closed 8 years ago

unify the behavior of intl/l20n and xul/xbl APIs

Categories

(Core Graveyard :: Tracking, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INCOMPLETE

People

(Reporter: zbraniecki, Unassigned)

References

Details

Currently we have two inconsistencies between those APIs:

1) XUL/XBL one combines all entities into one JS context which in case of an override means that query will get the latest entity for a given name.
l20n/js approach stacks LOL structures and iterates over them in order to get the entity so it'll return the first match.

2) In order to provide developers a way to communicate with localization we offer them l10n-data JSON structure that may contain variables that entities will use to determine localization of a given entity.
Such l10n-data structure is single per document.

In case of JS code, we don't have the document context and for now we allow developers to pass such variables as arguments to the getValue:

var greeting = ctx.getValue('greeting', {'hour': 11});

If we want to align to XUL/XBL approach (which was chosen due to the way XML works) we should instead give ctx a l10n-data like structure that can be populated by developers.

If we want to keep the JS approach (which feels more natural to JS language) we could at least add l10n-data like structure in addition to argument method.

I don't see a way to expose JS approach to XUL/XBL really.
Blocks: 595812
Marking all tracking bugs which haven't been updated since 2014 as INCOMPLETE.
If this bug is still relevant, please reopen it and move it into a bugzilla component related to the work
being tracked. The Core: Tracking component will no longer be used.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → INCOMPLETE
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.