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

annevk commented on this pull request.



> @@ -12750,6 +12750,43 @@ The {{VoidFunction}} [=callback function=]
 type is used for representing function values that take no arguments and do not
 return any value.
 
+<h3>Locatlizable dictionary</h3>

Typo

> @@ -12750,6 +12750,43 @@ The {{VoidFunction}} [=callback function=]
 type is used for representing function values that take no arguments and do not
 return any value.
 
+<h3>Locatlizable dictionary</h3>
+
+A localizable member 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 U+000A LINE FEED (LF) characters.

This should probably be an exported dfn, no?

> @@ -12750,6 +12750,43 @@ The {{VoidFunction}} [=callback function=]
 type is used for representing function values that take no arguments and do not
 return any value.
 
+<h3>Locatlizable dictionary</h3>
+
+A localizable member 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 U+000A LINE FEED (LF) characters.

Also, this should reference BIDI, right?

> +
+The name 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 member(s) of the inheriting dictionary serve as localizable members. It is RECOMMENDED that specification authors limit localizable member in the prototype chain of inherited dictionaries (ideally to one).
+
+<pre class="idl">
+enum TextDirection {
+  "auto",
+  "ltr",
+  "rtl"
+};
+
+dictionary Localizable {
+  DOMString lang;

Why doesn't lang default to the empty string?

> +<pre class="idl">
+enum TextDirection {
+  "auto",
+  "ltr",
+  "rtl"
+};
+
+dictionary Localizable {
+  DOMString lang;
+  TextDirection dir = "auto";
+};</pre>
+
+The {{lang}} member specifies the primary language for the localizable members in the prototype chain. Its value is a string. 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. [[!LANG]]
+
+The {{dir}} member provides the higher-level override of rules P2 and P3 if has a value other than "auto". [[!BIDI]]

if has?

> @@ -12750,6 +12750,43 @@ The {{VoidFunction}} [=callback function=]
 type is used for representing function values that take no arguments and do not
 return any value.
 
+<h3>Locatlizable dictionary</h3>
+
+A localizable member 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 U+000A LINE FEED (LF) characters.
+
+A user agent is expected to honor the Unicode semantics of localizable members.
+
+The name 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 member(s) of the inheriting dictionary serve as localizable members. It is RECOMMENDED that specification authors limit localizable member in the prototype chain of inherited dictionaries (ideally to one).
+
+<pre class="idl">
+enum TextDirection {

Maybe this should be its own chapter if we're going to have this here? This might be useful on its own as well.

> @@ -12750,6 +12750,43 @@ The {{VoidFunction}} [=callback function=]
 type is used for representing function values that take no arguments and do not
 return any value.
 
+<h3>Locatlizable dictionary</h3>
+
+A localizable member 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 U+000A LINE FEED (LF) characters.
+
+A user agent is expected to honor the Unicode semantics of localizable members.
+
+The name 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 member(s) of the inheriting dictionary serve as localizable members. It is RECOMMENDED that specification authors limit localizable member in the prototype chain of inherited dictionaries (ideally to one).
+
+<pre class="idl">
+enum TextDirection {

Canvas apparently has CanvasDirection, which uses "inherit" rather than "auto"... Good times.

-- 
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-35743106

Received on Tuesday, 2 May 2017 10:43:58 UTC