zbraniecki / fluent-domoverlays-js

Fluent DOM Overlays (JS)
1 stars 0 forks source link

Allow for `data-l10n-id` to align named dom nodes #15

Open Pike opened 5 years ago

Pike commented 5 years ago

Right now, data-l10n-name is the only attribute that creates a named mapping between pre- and post-translation DOM.

In https://github.com/zbraniecki/fluent-domoverlays-js/issues/6#issuecomment-477795209, @zbraniecki gives an example like

<menuitem data-l10n-name="item1" data-l10n-id="menuitem1" data-l10n-opaque="true"/>

I propose that data-l10n-id creates an independent scope/namespace to align nodes between pre- and post-translation.

Filing an issue to open that up for discussion separately.

zbraniecki commented 5 years ago

That would only make sense if we allowed for Item 8, right?