Skip to content
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

Changes to support auto #73

Merged
merged 2 commits into from
Aug 9, 2022
Merged

Changes to support auto #73

merged 2 commits into from
Aug 9, 2022

Conversation

aphillips
Copy link
Contributor

@aphillips aphillips commented Aug 4, 2022

Draft of changes to support auto as a value for directional metadata fields, per [I18N-ACTION-1176]


Preview | Diff

Draft of changes to support `auto` as a value for directional metadata fields, per \[I18N-ACTION-1176\]
@aphillips aphillips requested review from xfq and r12a August 4, 2022 21:52
@netlify
Copy link

netlify bot commented Aug 4, 2022

Deploy Preview for string-meta ready!

Name Link
🔨 Latest commit cd52a85
🔍 Latest deploy log https://app.netlify.com/sites/string-meta/deploys/62ed38384205890009c8e5fb
😎 Deploy Preview https://deploy-preview-73--string-meta.netlify.app/
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

index.html Outdated
</div>

<p>The value <code>ltr</code> indicates a base direction of left-to-right, in exactly the same manner indicated by <a href="https://www.w3.org/TR/css-writing-modes/#direction">CSS writing modes</a> [[CSS-WRITING-MODES-4]]</p>

<p>The value <code>rtl</code> indicates a base direction of right-to-left, in exactly the same manner indicated by <a href="https://www.w3.org/TR/css-writing-modes/#direction">CSS writing modes</a> [[CSS-WRITING-MODES-4]]</p>

<p>The value <code>auto</code> indicates that the user agent uses the first strong character of the content to determine the base direction using the <a href="https://html.spec.whatwg.org/multipage/dom.html#the-dir-attribute">algorithm</a> for <code>auto</code> found in [[HTML]].</p>
<p>The value <code>auto</code> indicates that the user agent uses the <a href="https://html.spec.whatwg.org/multipage/dom.html#the-dir-attribute">algorithm</a> for <code>auto</code> defined by [[HTML]] to determine the base paragraph direction.</p>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we describe first-strong in terms of the bidi algorithm in the next paragraph, why are we describing it in terms of the HTML definition here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed. I split this paragraph up, joining the stuff about the heuristic to the defining paragraph and keeping the guidance on usage separate.

The guidance on usage made me look at section 2.3 again, which I think is now in need of an overhaul 😿

index.html Outdated

<p class="note">The heuristic used by <code>auto</code> just looks at the first character with a strong directionality, in a manner analogous to the Paragraph Level determination in the bidirectional algorithm [[UAX9]]. Authors are urged to only use this value as a last resort when the direction of the text is truly unknown and no better server-side heuristic can be applied.</p>
<p>The heuristic used by <code>auto</code> looks for the first character with a strong directionality, in a manner analogous to the Paragraph Level determination in the bidirectional algorithm [[UAX9]]. When applied to multiple fields or to a document as a whole, it can mean that the direction should be individually derived for each field (with string-local metadata providing an override for cases that cannot be determined automatically). Then again, this value might mean that the base direction of the associated content is not known. Whenever possible, the actual base direction (<code>ltr</code> or <code>rtl</code>) should be stored or exchanged instead of <code>auto</code>. Omitting the <a>direction field</a> is preferable when the value is truly unknown.</p>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about this:
The heuristic used by auto looks for the first character with a strong directionality, in a manner analogous to the Paragraph Level determination in the bidirectional algorithm [UAX9]. When applied to multiple fields or to a document as a whole, it means that the direction should be individually derived for each field (with string-specific metadata providing an override for cases that cannot be determined automatically). It can be useful for labelling a group of mixed direction strings, when the base direction of most strings can be reliably determined using the first-strong heuristics. Whenever possible, the actual base direction (ltr or rtl) of individual strings should be stored or exchanged instead of auto. Omitting the direction field is preferable when the value is truly unknown.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this very much. Done.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And then I addressed your first comment... by splitting this paragraph up.

index.html Outdated

<p class="note">The heuristic used by <code>auto</code> just looks at the first character with a strong directionality, in a manner analogous to the Paragraph Level determination in the bidirectional algorithm [[UAX9]]. Authors are urged to only use this value as a last resort when the direction of the text is truly unknown and no better server-side heuristic can be applied.</p>
<p>The heuristic used by <code>auto</code> looks for the first character with a strong directionality, in a manner analogous to the Paragraph Level determination in the bidirectional algorithm [[UAX9]]. When applied to multiple fields or to a document as a whole, it can mean that the direction should be individually derived for each field (with string-local metadata providing an override for cases that cannot be determined automatically). Then again, this value might mean that the base direction of the associated content is not known. Whenever possible, the actual base direction (<code>ltr</code> or <code>rtl</code>) should be stored or exchanged instead of <code>auto</code>. Omitting the <a>direction field</a> is preferable when the value is truly unknown.</p>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use the attributes <code class="kw" translate="no">...</code> for keywords like auto.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made this change globally.

- Add `kw` class and `translate=no` to all `code` elements wrapping keywords.
- Add wording suggestions.
- Additional wording changes to make the text less redundant.
@aphillips aphillips requested a review from r12a August 5, 2022 15:39
@xfq xfq merged commit 488310a into w3c:gh-pages Aug 9, 2022
@xfq
Copy link
Member

xfq commented Aug 9, 2022

Merging. Thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants