-
Notifications
You must be signed in to change notification settings - Fork 4
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
Address @r12a's comments plus add spillover definition #27
Conversation
✅ Deploy Preview for i18n-glossary ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
- remove spillover example in favor of bidi isolation - add right-to-left and left-to-right to RTL and LTR dfns - Tweak wording of spillover - Link bidi isolation to spillover
The current definition of bidi isolation is not written like a definition. Making it into a definition was easier by introducing the concept of a bidi isolate and then referring to it.
I finally found some time to look at this. I have a couple of concerns that i'll raise as inline comments. |
@@ -164,7 +164,9 @@ <h2>Glossary</h2> | |||
|
|||
<p><dfn data-lt="basic language range|Basic language range" class="lint-ignore export">Basic language range</dfn>. A [=language range=] consisting of a sequence of subtags separated by hyphens. That is, it is identical in appearance to a language tag.</p> | |||
|
|||
<p><dfn class="lint-ignore export">Bidi isolation</dfn>. Isolation often needs to be applied to a range of text in order to prevent the automatic rules of the Unicode Bidirectional Algorithm incorrectly ordering that content in relation to the surrounding text. For example, numbers following right-to-left text in memory are automatically positioned to the left of that text by the Bidi Algorithm, but sometimes need to appear to the right. Another example occurs when lists of RTL items occur in a LTR sentence: the Bidi Algorithm will automatically assume that the order of items in the list should be "3 ,2 ,1", but actually what's needed is "1, 2, 3". In HTML, bidi isolation can be applied to a range of text by enclosing it in an element with a <code class="kw" translate="no">dir</code> attribute. In plain text there are Unicode formatting characters that can do the job. These mechanisms remove unwanted 'spillover effects'.</p> | |||
<p><dfn class="lint-ignore export" data-lt="bidi isolate">Bidirectional isolate</dfn>. Defined by the [=Unicode Bidirectional Algorithm=] [[UAX9]], an <em>isolate</em> is a range of text whose contents do not participate in the embedding and reordering of the surrounding text the range appears in, which prevents the bidi algorithm from incorrectly ordering that content in relation to the surrounding text.</p> |
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.
I think this is a tricky definition to pin down, and is one we're inventing rather than something explicitly defined in UAX#9.
In UAX#9 the concept of 'isolate' appears to be defined in terms of text that is bounded by specific formatting characters, namely LRI, RLI, or FSI. I don't see any 'definition' of isolate – only a description of isolate formatting characters that in only a small handful of places refers to the term isolate when referring to the text itself.
'Isolates' as described here do in fact participate in the reordering of surrounding text, but do so as a neutral unit.
Also, the sentence is very long.
Suggestion:
A range of text, bounded by formatting characters or markup, such that the contents do not interact with the surrounding text per the rules of the [=Unicode Bidirectional Algorithm=] [[UAX9]]. In certain circumstances, isolation prevents the incorrect ordering of content by the bidi algorithm.
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.
Agreed about the complexity here.
I like the suggestion okay, but the "certain circumstances" part made me nervous. I went back to UAX9 and harvested text found in https://www.unicode.org/reports/tr9/#Explicit_Directional_Isolates to make this:
<p><dfn class="lint-ignore export" data-lt="bidi isolate">Bidirectional isolate</dfn>. Defined by the [=Unicode Bidirectional Algorithm=] [[UAX9]], an <em>isolate</em> is a range of text whose contents do not participate in the embedding and reordering of the surrounding text the range appears in, which prevents the bidi algorithm from incorrectly ordering that content in relation to the surrounding text.</p> | |
<p><dfn class="lint-ignore export" data-lt="bidi isolate">Bidirectional isolate</dfn>. A range of text, bounded by formatting characters or markup, that is treated by the [=Unicode Bidirectional Algorithm=] [[UAX9]] as directionally isolated from its surroundings. The entire range of text inside the isolate is treated by the surrounding text as if it were a single neutral character (such as <span class="codepoint" translate="no"><bdi lang="en"></bdi> [<span class="uname">U+FFFC OBJECT REPLACEMENT CHARACTER</span>])</span>, and is assigned the corresponding display position in the surrounding text. Furthermore, the text inside the isolate has no effect on the ordering of the text outside it, and vice versa.</p> |
See #34 for this as part of a PR. Please comment on it!
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.
I think this has become a tutorial rather than a definition.
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.
Fair enough, although it is quoting UAX9.
<p><dfn class="lint-ignore export">Bidi isolation</dfn>. Isolation often needs to be applied to a range of text in order to prevent the automatic rules of the Unicode Bidirectional Algorithm incorrectly ordering that content in relation to the surrounding text. For example, numbers following right-to-left text in memory are automatically positioned to the left of that text by the Bidi Algorithm, but sometimes need to appear to the right. Another example occurs when lists of RTL items occur in a LTR sentence: the Bidi Algorithm will automatically assume that the order of items in the list should be "3 ,2 ,1", but actually what's needed is "1, 2, 3". In HTML, bidi isolation can be applied to a range of text by enclosing it in an element with a <code class="kw" translate="no">dir</code> attribute. In plain text there are Unicode formatting characters that can do the job. These mechanisms remove unwanted 'spillover effects'.</p> | ||
<p><dfn class="lint-ignore export" data-lt="bidi isolate">Bidirectional isolate</dfn>. Defined by the [=Unicode Bidirectional Algorithm=] [[UAX9]], an <em>isolate</em> is a range of text whose contents do not participate in the embedding and reordering of the surrounding text the range appears in, which prevents the bidi algorithm from incorrectly ordering that content in relation to the surrounding text.</p> | ||
|
||
<p><dfn class="lint-ignore export">Bidi isolation</dfn>. The use of [=bidi isolates=] in text in order to prevent the automatic rules of the Unicode Bidirectional Algorithm incorrectly ordering that content in relation to the surrounding text. For example, numbers following right-to-left text in memory are automatically positioned to the left of that text by the Bidi Algorithm, but sometimes need to appear to the right. Another example occurs when lists of RTL items occur in a LTR sentence: the Bidi Algorithm will automatically assume that the order of items in the list should be "3 ,2 ,1", but actually what's needed is "1, 2, 3". In HTML, bidi isolation can be applied to a range of text by enclosing it in an element with a <code class="kw" translate="no">dir</code> attribute. In plain text there are Unicode formatting characters that can do the job. These mechanisms remove unwanted [=spillover effects=].</p> |
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.
positioned to the left of that text -> positioned to the left of RTL text
lists of RTL items occur in a LTR sentence -> a list of RTL items occur in a LTR sentence (and vice versa)
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.
occur -> occurs
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.
Done (in #34)
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.
Not quite.
lists of RTL items occurs -> a list of RTL items occurs
Update definition of 'bidi isolate' to reflect the text in https://www.unicode.org/reports/tr9/#Explicit_Directional_Isolates
<p>If you are writing a W3C specification, you can use the terminology in this document directly by importing this document as a cross-reference source. This may be especially helpful when using <a>character encoding</a> or <a>locale</a>-related terms found here. Such terms are common to the needs of many specifications and often refer to other definitions found in this glossary. In most cases, though, copying these definitions into your specification won't add value to your readers.</p> | ||
<p>If you are writing a W3C specification, you can use the terminology in this document directly by importing this document as a cross-reference source. This may be especially helpful when using <a>character encoding</a> or <a>locale</a>-related terms found here. Such terms are common to the needs of many specifications and often refer to other definitions found in this glossary.</p> | ||
|
||
<p>This glossary is a Working Group NOTE, which means that the definitions found in it are, by definition, non-normative. In most cases, most specifications do not need the definition of terms found here to be formally normative. Using the definitions found here lends clarity when using specialized terminology, but doesn't affect requirements directly and in those cases copying these definitions into your specification won't add value to your readers.</p> |
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.
According to the MOS, 'Note' should be used instead of 'NOTE'.
Preview | Diff