Re: [heycam/webidl] WIP: add localizable dictionary (#358)

annevk commented on this pull request.

https://notifications.spec.whatwg.org/#direction I think the current text doesn't stress enough that there could be multiple localizable members.

It also fails to account for multiple paragraphs of a single member.

It would also be good to see a PR that indicates how this changes Notifications.

> +A <dfn export>localizable member</dfn> is a [=dictionary member=] that
+represents a bidirectional algorithm paragraph when displayed,
+as defined by the bidirectional algorithm’s rules P1, P2, and P3,
+including, for instance, supporting the paragraph-breaking behavior
+of <span class="char">U+000A LINE FEED (LF)</span> characters. [[!BIDI]]
+
+A user agent is expected to honor the Unicode semantics of [=localizable members=].
+
+The [=identifier=] of a [=localizable member=] is left to the defining specification (e.g., "title").
+
+Dictionaries that specify a [=localizable member=] must inherit from the {{Localizable}} dictionary.
+
+Specification authors must specify in prose which [=dictionary members|member(s)=]
+of the inheriting dictionary serve as [=localizable members=].
+
+It is recommended that specification authors limit the number of [=dictionary members=]

"Specification authors should limit ..." is a little clearer than this. Per Infra we should avoid using "recommended".

> +<pre class="idl">
+    dictionary Localizable {
+      DOMString lang = "";
+      TextDirection dir = "auto";
+    };
+</pre>
+
+The {{Localizable/lang}} member specifies the primary language for the [=dictionary members=]
+which are [=localizable members=].
+Its value is a {{DOMString}}.
+The empty string indicates that the primary language is unknown.
+Any other string must be interpreted as a language tag.
+Validity or well-formedness are not enforced. [[!BCP47]]
+
+The {{Localizable/dir}} member provides the higher-level override of rules P2 and P3
+if it has a value other than <a for=TextDirection enum-value>"auto"</a>. [[!BIDI]]

This should be more clearly made to apply to the localizable members.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/heycam/webidl/pull/358#pullrequestreview-35788767

Received on Tuesday, 2 May 2017 14:36:16 UTC