Closed
Bug 1309564
Opened 8 years ago
Closed 8 years ago
HTML and XUL bindings should only use html- and xul-namespaced traits
Categories
(L20n :: JS Library, defect)
L20n
JS Library
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: stas, Assigned: zbraniecki)
References
Details
(Whiteboard: [gecko-l20n])
Attachments
(1 file)
When translating DOM attributes, the bindings code should only use traits which are in the xul and the html namespaces.
Assignee | ||
Comment 1•8 years ago
|
||
It seems to be done now, can we close this bug?
Flags: needinfo?(stas)
Reporter | ||
Comment 2•8 years ago
|
||
Can you point to where it's done? I don't think it is. I'd expect this code to check if trait.key.namespace is 'xul' or 'html', but that would require it to know which element the translations is for:
https://github.com/l20n/l20n.js/blob/69fe01ff11422ffd9a0e68d91eaffa6fa8e4c321/src/lib/format.js#L138
Or, we could format all traits with namespaces and store the namespaces on the result object, and then only apply those matching the current element's namespace in:
https://github.com/l20n/l20n.js/blob/69fe01ff11422ffd9a0e68d91eaffa6fa8e4c321/src/bindings/overlay.js#L66
Flags: needinfo?(stas)
Assignee | ||
Comment 3•8 years ago
|
||
ah, I confused the overlay ATTRIBUTES_ALLOWED with this.
I think it would be cleaner to select it in bindings than in lib
Reporter | ||
Comment 4•8 years ago
|
||
Yeah, agree. Want to give it a try?
Assignee | ||
Comment 6•8 years ago
|
||
Attachment #8805506 -
Flags: review?(stas)
Reporter | ||
Comment 7•8 years ago
|
||
Comment on attachment 8805506 [details]
pr
https://github.com/l20n/l20n.js/pull/162#pullrequestreview-6252074
Attachment #8805506 -
Flags: review?(stas) → review-
Assignee | ||
Updated•8 years ago
|
Attachment #8805506 -
Flags: review- → review?(stas)
Reporter | ||
Comment 8•8 years ago
|
||
Comment on attachment 8805506 [details]
pr
lgtm, thanks!
Attachment #8805506 -
Flags: review?(stas) → review+
Assignee | ||
Comment 9•8 years ago
|
||
Assignee | ||
Comment 10•8 years ago
|
||
https://hg.mozilla.org/projects/larch/rev/8f9c827a11e3400c939cce7f609bb0454d6c00bb
Bug 1309564 - HTML and XUL bindings should only use html- and xul-namespaced traits. r=stas
Assignee | ||
Updated•8 years ago
|
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•