l20n/l20n.js — pull request #7 by stasm (2012-09-17 22:23:36+00:00)
Title: Error fallback

This pull request implements three types of fallback:

- scheme fallback, which is a feature of the `l10n:` scheme; you can define more than one scheme, and the context will try to find the LOL file in all of them, until it finds one,

- resource fallback, when a LOL cannot be found; in this case, create a subcontext and always use it, as the original context is not unusable (it's not integral anymore)

- entity fallback, when the context is ready, but a requested entity cannot be found; create a subcontext synchronously and get the entity from the subcontext.

(possibly a follow-up issue: what should happen when the entity exists, but doesn't compile properly, e.g. due to a reference to a non-existing entity)?