Migrate XMLPrettyPrinter from DTD to Fluent
Categories
(Core :: XML, task)
Tracking
()
Tracking | Status | |
---|---|---|
firefox106 | --- | fixed |
People
(Reporter: eemeli, Assigned: eemeli)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
dom/xml/resources/XMLPrettyPrint.xsl
is one of the few remaining users of DTD strings for localization, and should be migrated to Fluent.
Assignee | ||
Comment 1•2 years ago
|
||
Erik/Greg, would you be able to confirm my suspicion that this would probably be best done by adding a data-l10n-id
to this <p>
element in the XSL, and then somewhere around here constructing a new DOMLocalization
instance and connecting the parent id="header"
as a localization root?
I think this would end up as the one single place where it makes sense to directly create a new DOMLocalization
from C++ code, so I'm a bit leery about progressing here in case I've missed some other way of solving this.
Comment 2•2 years ago
|
||
Seems reasonable to create your own if you can't access one.
It looks like here is where the Document normally creates one: https://searchfox.org/mozilla-central/rev/380fc5571b039fd453b45bbb64ed13146fe9b066/dom/base/Document.cpp#4323
You can grab it via: https://searchfox.org/mozilla-central/rev/380fc5571b039fd453b45bbb64ed13146fe9b066/dom/base/Document.cpp#4297
I'm low context on this specific codepath, but I would at least verify you can't get access to that first.
Comment 3•2 years ago
|
||
It also seems reasonable to me to create your own in this case.
Assignee | ||
Comment 4•2 years ago
|
||
The DocumentL10n instance that's created here is not exposed on the root document, as that is the user-defined XML document. The localization root that's connected to it is in a closed shadow root.
I'm not certain if this localization updates on locale changes, or how exactly to test for that.
Updated•2 years ago
|
Comment 6•2 years ago
|
||
bugherder |
Description
•