fluent.js
fluent.js copied to clipboard
React: Support complex DOM trees in overlays
Because:
- Sometimes, the line between UI localization and content localization is thin. There are cases in which we should allow localizing longer, structured text with nested overlays. See #288
This PR:
- Adds a prop, nestedElems, to LocalizedProps and an arg, arg.nestedElems, to Localized.getElement() that allows consumers to opt-in to recursively parse nested elements in overlays. By default this is disabled.