Page MenuHomePhabricator

Relativity of left and right =/= {{BEFORE}} and {{AFTER}} - code portability
Closed, ResolvedPublic

Description

Author: gangleri

Description:
Hallo!

This is an enhancement request about two magic words {{BEFORE}} and {{AFTER}}
required for code portability.

'opening' and 'closing' paranthesis and brackets are displayed as different
characters in LTR (left to right) and RTL (right to left) "context".

'left' and 'right' are absolute topics in MediaWiki (possibly also in some
browsers / possibly because of some browsers).

This reffers both to the rendering of MediaWiki markup language (image syntax)
and (probably - to be investigated) also to browser implementation /
recommandations.

*required code*
http://cvs.sourceforge.net/viewcvs.py/wikipedia/phase3/includes/MagicWord.php?view=markup
$magicWords = array(
...
'MAG_BEFORE',
'MAG_AFTER',
...

http://cvs.sourceforge.net/viewcvs.py/wikipedia/phase3/includes/Parser.php?view=markup
case MAG_BEFORE:
return (isRTL() ? 'right' : 'left');

case MAG_AFTER:
return (isRTL() ? 'left' : 'right');

*reason for this request*
http://www.anubite.co.uk/mediawiki/head-rtl/index.php/BEFORE_and_AFTER
and
http://www.anubite.co.uk/mediawiki/head/index.php/BEFORE_and_AFTER
are sharing the same code.

As this is a simple "translation" one would expect that the images and floating
objects would change place. This is *not* the case.

best regards reinhardt [[user:gangleri]]


Version: unspecified
Severity: enhancement
URL: http://ps.wikipedia.org/wiki/user:I18n/bugzilla_005337

Details

Reference
bz5337

Event Timeline

bzimport raised the priority of this task from to Normal.Nov 21 2014, 9:10 PM
bzimport added a project: MediaWiki-Parser.
bzimport set Reference to bz5337.
bzimport added a subscriber: Unknown Object (MLST).

gangleri wrote:

(In reply to comment #0)

http://www.anubite.co.uk/mediawiki/head-rtl/index.php/BEFORE_and_AFTER
and
http://www.anubite.co.uk/mediawiki/head/index.php/BEFORE_and_AFTER
are sharing the same code.

These are no longer available.

The confusion is caused by the different handling of the concepts LEFT and RIGHT. While LEFT and RIGHT is changed by the browsers for all kind of bracket characters [[file:Brackets.svg]], LEFT and RIGHT is absolute for rendering of image / file syntax.

There neither is LEFT a synonym for BEGINNING nor is RIGHT a synonym for END. Please see also the question / request at
http://yi.wikipedia.org/w/index.php?oldid=243873#.D7.91.D7.99.D7.9C.D7.93.D7.A2.D7.A8

Best regards Reinhardt [[user:Gangleri]]

gangleri wrote:

Dear friends, with beta software available the meaning of LEFT and RIGHT is changing depending on dierectionality (of the wiki I suppose).

Examples:

[[yi:user:לערי ריינהארט/בילדער]]
[[de:user:לערי ריינהארט/בילדער]]

As a consequence the code for the image syntax must be changed inside every page of RTL wikis.

If there are no other objections this bug can be resolved.

Best regards Reinhardt [[user:Gangleri]]

TheDJ added a comment.Jun 21 2010, 6:54 PM

No other objections, so I guess this can be closed.

Restricted Application added a project: I18n. · View Herald TranscriptJun 2 2015, 2:21 PM