-
Notifications
You must be signed in to change notification settings - Fork 80
Description
Sometimes, the line between UI localization and content localization is thin. A good example is netError.dtd in Gecko:
<!ENTITY dnsNotFound.longDesc1 "
<strong>If that address is correct, here are three other things you can try:</strong>
<ul>
<li>Try again later.</li>
<li>Check your network connection.</li>
<li>If you are connected but behind a firewall, check that &brandShortName; has permission to access the Web.</li>
</ul>
">
Clearly in this case, the UI benefits from a more structured translation. In the past, we focused the design of Fluent on short messages with little structure and we avoided longer forms. With UIs like netError, we might want to find a middle-ground solution for conveniently localizing UI which features longer text and some structure.
The implementation of overlays in fluent-dom currently supports two groups of elements:
- elements named with the
data-l10n-nameattribute, as long as a corresponding element is present in the source, and - a short list of inline text-level elements as defined by the HTML spec.
Furthermore the current implementation doesn't allow any nested elements. A <li> inside of a <p> wouldn't work even if these elements were allowed.
I'd like to start a discussion about what it would take to support UIs like netError.dtd. A few questions to get us started:
- Should we allow more elements by default, including block elements? Any translation would be free to use them even if they're not present in the source.
- How to handle errors in nesting order, if nested elements are allowed?
- Should we encourage static analysis tools to verify the structure of the DOM found in the translations by comparing it to the reference?
- Should text-level elements by exempt from this validation step?