- From: Eemeli Aro <notifications@github.com>
- Date: Thu, 26 Oct 2023 06:06:46 -0700
- To: WICG/webcomponents <webcomponents@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <WICG/webcomponents/issues/1034/1781086778@github.com>
> Is there more detail on how the localisation MessageFormat2 syntax ties in with the HTML syntax? Yes and no. With Fluent, we have a solution to how everything _could_ work, but I don't want to come into all this proposing that as the solution that _should_ be taken for DOM Localization. At this stage I'm primarily interested in getting alignment on this being an interesting problem to solve, and not trying to lock in a solution. > In the example slides you have `This <a href=/page>color</a> is gray` which maps can be localised with `{This {+a}colour{-a} is grey}`. I presume the `{+a}`/`{-a}` are to partition the content of text that fits within the `a` tag? And the tag names must match? Yes-ish. The examples in the presentation are intentionally minimal as there's a lot to all this, but the `{+a}`/`{-a}` do indeed primarily position and delimit the link text in that example. However, they could also contain contain values for localizable properties, such as `{+a title=Foo}` that would need to be merged into the `<a href>`. In most messages, elements can be matched by name, but this isn't always the case if e.g. a message contains two links. With Fluent, the matching uses a property `data-10n-key` that must be set on the DOM `<a>` as well as the message's corresponding representation, but the details of what might be appropriate for a standardised approach need further consideration. -- Reply to this email directly or view it on GitHub: https://github.com/WICG/webcomponents/issues/1034#issuecomment-1781086778 You are receiving this because you are subscribed to this thread. Message ID: <WICG/webcomponents/issues/1034/1781086778@github.com>
Received on Thursday, 26 October 2023 13:06:51 UTC