Last modified: 2006-02-05 00:47:00 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 4742 - Detect the directionality at the cursor position
Detect the directionality at the cursor position
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
All All
: Normal enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
: parser
Depends on:
Blocks: 4050 4865 4866
  Show dependency treegraph
Reported: 2006-01-24 11:09 UTC by lɛʁi לערי ריינהארט
Modified: 2006-02-05 00:47 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Description lɛʁi לערי ריינהארט 2006-01-24 11:09:14 UTC


If one want to generate a list / template / special page rendering (opticaly)
a) in a LTR environment as:
{{{TEXT1}}} {{{TEXT2}}} ({{{TEXT3}}}) ({{{TEXT4}}}) [{{{TEXT5}}}]
b) in a RTL environment as:
[{{{TEXT5}}}] ({{{TEXT4}}}) ({{{TEXT3}}}) {{{TEXT2}}} {{{TEXT1}}}
and the directionality of the TEXTn is not known 100%

then one can avoid unwanted content "mixing" due o the bidirectional algorithm
by adding {{DIRCURSOR:mark}} after " ", "(", ")", "[", "]" and all other
character with "neutral directionality".

See a draft example at [[meta:User:Tietew/RTL_problem#another_solution]].

The implementation of
Bug 4050: "BiDi: orientation and numbering inside a TOC should be left aligned
if placed in a LTR block and RTL if not"
would need a (global?) variable $dircursor / $cursordir (or similar) which
should use a stack.

When parsing the source code each occurrence of dir="foo" in a "block" should
"push" "foo"; at the end of the "block" the previous value should be restored
with "pop". Note: paragraphs, cells etc. define distinct blocks (please verify
with the specifications)

The availability of variables {{DIRCURSOR}} / {{CURSORDIR}} (or similar) or
better predefined templates {{DIRCURSOR:}} / {{CURSORDIR:}} (or similar) would
help to generate pages that render optimal in a BiDi environment.

CURSOR type predefined templates / magic words should be used togeter with
a) 'mark' and generate ‎ / ‏
b) 'dir'  and generate ltr / rtl

Optimaly rendering in the provided example can only be assured if one knows the
directionality of each TEXTi exactly: "foo (bar)" is a typical example. 100%
correct rendering should use either "foo (bar)‎" for LTR text or "foo
(bar)‏" for RTL text or "foo (bar)" for BiDi text.
As a consequence of this each peace of text needs a directionality attribute.
This will be another request.

{{DIRCURSOR:dir}} would / might be required for constructs like
dir="{{DIRCURSOR:dir}}" for neighbour blocks / subblocks.

Please note that
Bug 4126: BiDi feature request: please create a variable {{CONTENTDIR}}
is a request for a new variable about a the directionality of the content
language. [[template:wikivar]] is using as a workaround [[template:DIRMARK]] to
asure "portability" of this tamplate between LTR and RTL wikies.

Fixing some of the bugs dependending of the BiDi tracking bug 745
will require also a variable $guidir / $dirgui (which may be transparent as
{{GUIDIR}} / {{DIRGUI}}.
These bugs are related to page areas / items as the "personal tools", the tabs,
navigation and toolbox area, page footer etc. which should be rendered with an
opposite directionality when such a user interface is selected / such a
"uselang=" is used.

best regards reinhardt [[user:gangleri]]

P.S. Some of topics are addressed at [[meta:Talk:Multilingual_MediaWiki]]. I
mentioned the further requirements (not covered by the summary) in order to
select similar names for both the global variables and / or the MediaWiki
{{foo}} type variables.

Note You need to log in before you can comment on or make changes to this bug.