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

Wording for application of base direction #440

Closed
r12a opened this issue May 15, 2019 · 7 comments · Fixed by #442
Closed

Wording for application of base direction #440

r12a opened this issue May 15, 2019 · 7 comments · Fixed by #442
Assignees
Labels
i18n-needs-resolution Issue the Internationalization Group has raised and looks for a response on. status:editorial

Comments

@r12a
Copy link

r12a commented May 15, 2019

2.6.3.4.2 Item-specific Language
https://w3c.github.io/wpub/#manifest-specific-language-and-dir

When using manifests with bidirectional text, user agents SHOULD identify the base direction of any given natural language value by scanning the text for the first strong directional character. Once the base direction has been identified, user agents MUST determine the appropriate rendering and display of natural language values according to the Unicode Bidirectional Algorithm [bidi]. This could require wrapping additional control characters or markup around the string prior to display, in order to apply the base direction. (See § D. Examples for bidirectional texts.)

I suggest the following:

In order to correctly handle manifests containing right-to-left or bidirectional text, user agents SHOULD identify the base direction of any given natural language value by scanning the text for the first strong directional character.

Note:
In situations where the first-strong heuristics will produce the wrong result (eg. a string in the Arabic or Hebrew script that begins with a Latin acronym), content developers may want to prepend a Unicode formatting character to the string. This would then produce the necessary base direction when the heuristics are applied. They should use one of the following formatting characters: U+200E LEFT-TO-RIGHT MARK, or U+200F RIGHT-TO-LEFT MARK.

Once the base direction has been identified, user agents MUST determine the appropriate rendering and display of natural language values according to the Unicode Bidirectional Algorithm [bidi]. This could require wrapping additional control characters or markup around the string prior to display, in order to apply the base direction. (See § D. Examples for bidirectional texts.)

@r12a
Copy link
Author

r12a commented May 15, 2019

I think Appendix D needs some work. I'll raise a separate issue for that.

@iherman iherman added status:editorial i18n-needs-resolution Issue the Internationalization Group has raised and looks for a response on. labels May 15, 2019
@ntounsi
Copy link

ntounsi commented May 16, 2019

This could require wrapping additional control characters or markup around the string prior to display, in order to apply the base direction.

May be recommend the use of markup, if any.

@r12a
Copy link
Author

r12a commented May 16, 2019

@ntounsi the text already says "control characters or markup". I should admit, though that i missed the markup word, too, on first read. Maybe switch the order ?

@iherman
Copy link
Member

iherman commented May 16, 2019

@r12a @ntounsi I have just made a PR with the (original) text in PR #442

That being said, I am not sure what markup you refer to, @ntounsi. HTML markup has been considered (as an RDF HTML Datatype), but there was a strong pushback against it; I would prefer to add this to the document.

@ntounsi
Copy link

ntounsi commented May 16, 2019

@r12a may be some thing like
"This could require wrapping additional markup around the string or control characters prior to display, in order to apply the base direction."
@iherman for display purpose, markup can have some (side) effects on rendering that control characters don't have, e.g. RTL text are aligned right with dir attribute, but not with control characters.

@iherman
Copy link
Member

iherman commented May 16, 2019

@ntounsi

Just for my understanding: do you want to add this text in the 'note' above? In which case I have no problem with it.

@ntounsi
Copy link

ntounsi commented May 16, 2019

@iherman No. Just to explain why I said that markup is preferable to control characters.

iherman added a commit that referenced this issue May 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
i18n-needs-resolution Issue the Internationalization Group has raised and looks for a response on. status:editorial
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants