W3C home > Mailing lists > Public > public-i18n-core@w3.org > October to December 2008

Re: [1.2T-LC] i18n comment 6: Direction and bidi-override attributes (ISSUE-2107)

From: fantasai <fantasai.lists@inkedblade.net>
Date: Sun, 02 Nov 2008 22:21:44 -0800
Message-ID: <490E9878.7050700@inkedblade.net>
To: Doug Schepers <schepers@w3.org>
CC: Richard Ishida <ishida@w3.org>, www-svg@w3.org, public-i18n-core@w3.org

Doug Schepers wrote:
> Hi, Richard-
> 
> Richard Ishida wrote (on 10/30/08 11:33 AM):
>> Note that I still don't see direction or unicode-bidi in the element
>> table at
>> http://dev.w3.org/SVG/profiles/1.2T/publish/elementTable.html
>>
>> I assume that this is because they are 'properties', and that the
>> green tick in the third column of elements such as svg, text, etc.
>> means that any property can be used with those elements.
> 
> That's correct.  In future specs, we will take steps to make this more
> clear, but that will take modifications to our build script.
> 
> 
>>> How about this: [[ In many cases, the bidirectional algorithm from
>>> [UNICODE] produces the desired result automatically, and overriding
>>> this algorithm properly is usually quite complex. Therefore, in
>>> many cases, such as when using Western scripts, authors are
>>> discouraged from assigning values to these properties.  When using
>>> right-to-left languages, it is recommended that these properties be
>>> set appropriately. ]]
>> Hmm.  It may appear complex if you don't know what you are doing, but
>> it's not really that bad for people who need to work with rtl scripts
>> all the time.
>>
>> How about this: [[ In many cases, the bidirectional algorithm from
>> [UNICODE] produces the desired result automatically, and in such
>> cases the author does not need to use these properties. For other
>> cases, when using right-to-left languages, it may sufficient to add
>> the direction property to the svg element, and allow that direction
>> to inherit to all text elements. ]]
> 
> Sounds good, thanks.  I've added that to the spec. [1]
> 
> 
>>>> Perhaps it would be helpful to provide an example of the most 
>>>> straightforward case, ie. unicode-bidi="embed" direction="rtl",
>>>> that people can cut&paste.
>>> That's a great idea.  We will add a Hebrew and/or Arabic example.
>> I don't see this yet. Is that an oversight?
> 
> I've added an example [1], but I'm not very happy with it... I'd like to
> expand it, including passages in both Arabic as well as Hebrew, with a
> passage of ltr text in context.  If the i18n folks have a good example
> (maybe something canonical), I'll be grateful to include it.
> 
> 
>>>> What *would really* be helpful, would be the possibility of
>>>> declaring the direction at the top of the document, ie. in the
>>>> svg element, and allowing it to cascade from there to all text
>>>> elements. In *that* case, you are much less likely to need to set
>>>> the properties on each text element, when working in a
>>>> right-to-left script. (And it will save a lot of typing for the
>>>> poor Middle Eastern authors.)
>>> This is indeed the case, because we inherit inheritance from CSS.
>>> How about we add an explanatory note for authors, explaining that
>>> this can be done?
>> I think this is a very good idea.  See my proposed text above - maybe
>> that is enough?  Note also my assumption about applicability of
>> properties like direction and unicode-bidi to elements such as svg
>> and text etc.
> 
> Please review the revamped prose, and let me know if that works for that
> goal.  I think it does.
> 
> Let us know if this resolves this issue for you. (I will address the
> 'text-align' issue, ISSUE-2171, in another email.)
> 
> [1]
> http://dev.w3.org/SVG/profiles/1.2T/publish/text.html#RelationshipWithBiDirectionality

   # For other cases, such as when using right-to-left languages,
   # it may sufficient to add the 'direction'  property to the
   # rootmost 'svg' element, and allow that direction to inherit
   # to all text elements, as in the following example (which may
   # be used as a template):

The example you give does not demonstrate a case where it is
"sufficient to add the 'direction' property to the rootmost 'svg'
element", because you're using direction="ltr" and
unicode-bidi="bidi-override". In this particular case, both are
unnecessary, and if you remove them (and the <tspan>) you will have
your desired example. You could even replace "English" with
"English phrase".

If you want to show an example where direction="ltr" and unicode-bidi
are necessary, you could duplicate the example, but then include some
punctuation, for example, make the English a full sentence
   <tspan direction="ltr" unicode-bidi="embed">English sentence.</tspan>
In this case the embedding is necessary because otherwise the period
would be considered part of the surrounding Arabic text and show up on
the left side of the sentence.

Note that we are *not* using unicode-bidi="bidi-override". A BIDI
override is almost never necessary.

Also, your <title> and <desc> probably should have direction="ltr"...

~fantasai
Received on Monday, 3 November 2008 06:22:27 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 3 November 2008 06:22:28 GMT