Closed Bug 614536 Opened 11 years ago Closed 4 years ago

[l20n] Move l20n_js context to app singleton


(Core :: Internationalization, defect)

Not set





(Reporter: zbraniecki, Assigned: zbraniecki)



As discussed with Taras and Pike, we want to move the l20n_js context to a per-app singleton.

The workflow:

1) we load XUL file
2) we check if we already have this document in context's document[] array. If we do, we just reuse it, if not
3) at each <?localize?> PI we check if we have this j20n file in context's cache[] array. If we don't we add it there:
cache['chrome://url/file.j20n'] = {list of entities}
3) then we generate document's entry inside the context:

document['chrome://url/document.xul'] = {}

and we copy (or somehow reference) the objects from cache that are used by the document into the document[] = {} object.

We need to figure out the way to do that without affecting perf.

I will need some guidance as in where to put the global l20n_js singleton into our code that it works as expected and is available to content sink and XMLDocument.
Depends on: 566906
Depends on: 595813
Blocks: 566906
No longer depends on: 566906
Blocks: 595813
No longer depends on: 595813
Assignee: smontagu → gandalf
Seven years later, we're making another attempt to refactor our l10n layer.

The new tracking bug is bug 1365426 and I'll mark the previous effort as "INCOMPLETE".
Closed: 4 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.