-
Notifications
You must be signed in to change notification settings - Fork 162
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP: add localizable dictionary #358
Changes from 1 commit
d743b7f
bf5bcb0
381de47
97f6d52
bc58e24
e78d5f5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should probably be an exported dfn, no? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also, this should reference BIDI, right? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed in marcoscaceres#1. |
||
|
||
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 { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe this should be its own chapter if we're going to have this here? This might be useful on its own as well. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Canvas apparently has CanvasDirection, which uses "inherit" rather than "auto"... Good times. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should we add "inherit" to the enum and mark it as legacy? |
||
"auto", | ||
"ltr", | ||
"rtl" | ||
}; | ||
|
||
dictionary Localizable { | ||
DOMString lang; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why doesn't lang default to the empty string? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed in marcoscaceres#1. |
||
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]] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. if has? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed in marcoscaceres#1. |
||
|
||
<div class=example> | ||
dictionary PaymentItem : Localizable { | ||
// "label" is a localizable member | ||
required DOMString label; | ||
required PaymentCurrencyAmount amount; | ||
boolean pending = false; | ||
}; | ||
</div> | ||
|
||
<h2 id="extensibility">Extensibility</h2> | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be spelled "Lolcatlizable".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in marcoscaceres#1.