Closed Bug 868723 Opened 12 years ago Closed 12 years ago

Resources added from the manifest always use linkTemplate

Categories

(L20n :: HTML Bindings, defect)

x86_64
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: stas, Assigned: stas)

Details

Attachments

(1 file)

Because we always try to replace {{lang}} and we use replace.bind, the argument to ctx.linkResource is a bound function and link always calls linkTemplate. With changes from https://github.com/l20n/l20n.js/commit/70852bc5572a0fb8f3f5f6d6062d4d64f7a70b1a to how we add resources, this means that resources from the manifest are never added to _none. If they are simple strings, they should. The summary of the (add|link)Resource logic is as follows (`y` means "the method adds resources to this locale or these locales"): _none _locales addResource y linkResource(string) y y linkResource(function) y
Let's just test if {{lang}} is in the resource URI. I'll have a patch in a few, together with some code clean-up from bug 868454.
Assignee: nobody → stas
Attached patch PatchSplinter Review
This patch conflicts with bug 868719. Depending on which one lands first, I'll rebase the other one.
Attachment #745511 - Flags: review?(gandalf)
Attachment #745511 - Flags: review?(gandalf) → review+
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: