Page MenuHomePhabricator

BiDi feature request: please create a variable {{CONTENTDIR}}
Closed, DeclinedPublic

Description

Author: gangleri

Description:
Hallo!

background:

Last week [[MediaWiki:Sitenotice]] was changed to:

'''Notice:''' Uploads are disabled and images may not display for a few hours
today while we make [[meta:November 2005 image server|{{SITENAME}}]] faster.

This message did *not* display properly at RTL wiki's without a "local"
sitenotice. *Testcases will follow imediatelly.*

feature request:

{{CONTENTDIR}} should return 'ltr' for LTR type wiki's and 'rtl for RTL type wiki's.

This would allow to generate proper sitenotices (or MediaWiki:Farmnotice see
[[meta:Site_notice#MediaWiki:Farmnotice]]) which would display correctly
regardless of the LTR / RTL property of the wiki.

best regards reinhardt [[user:gangleri]]


Version: unspecified
Severity: enhancement
URL: http://yi.wiktionary.org/wiki/project:bugzilla/04126

Details

Reference
bz4126

Event Timeline

bzimport raised the priority of this task from to Lowest.Nov 21 2014, 8:59 PM
bzimport set Reference to bz4126.
bzimport added a subscriber: Unknown Object (MLST).
bzimport created this task.Dec 1 2005, 1:17 AM

gangleri wrote:

http://yi.wiktionary.org/wiki/project:Gangleri/tests/bugzilla/04126
provides some variations from
http://yi.wiktionary.org/w/index.php?title=MediaWiki:Sitenotice&action=history

The proper message would be:
<span dir="ltr" >'''Notice:''' Uploads are disabled and images may not display
for a few hours today while we make<span dir="ltr" > <span dir="{{CONTENTDIR}}"

[[meta:November 2005 image server|{{SITENAME}}]]</span> </span>faster.</span>

or this message embeded in <center> ... </center>

The embeding <span dir="ltr" > <span dir="{{CONTENTDIR}}" >[[meta:November 2005
image server|{{SITENAME}}]]</span> </span> should display all SITENAMES
correctly with contain characters which are rendered context dependend according
to the browsers BiDi algoritm.

Unfortunatelly Mozilla Firefox and Netscape can *not* render this correctly in
their actual version.

gangleri wrote:

*note*

The counterpart of {{CONTENTDIR}} would be somthing as {{UIFDIR}} which should
return 'ltr' / 'rtl' according to the LTR / RTL property of the selected user
interface.

If ?uselang=xx / &uselang=xx is used it should probably return the value of the
LTR / RTL property of xx.

The question is how this information should be retrieved.

It is not available in Names.php at this moment but (probably) available trough
function isRTL() as in
http://cvs.sourceforge.net/viewcvs.py/wikipedia/phase3/languages/LanguageYi.php

Should the "default" value of function isRTL() be included in Names.php? This
would provide a better overview.

gangleri wrote:

*note*

{{UIFDIR}} is not the same as {{USERIFCODE}} requested in
Bug 2085: request for a variable USERIFCODE (user interface language code)

avarab wrote:

This would be useless since having it in the sitenotice as <span
dir={{CONTENTDIR}}> would generate <span dir=rtl> on RTL wikis when someone adds
an English sitenotice (which is LTR), I've added a comment in CommonSettings.php
on the cluster reminding admins to add wrap it in <span dir=ltr></span> which
should take care of it.

Marking this as INVALID.

gangleri wrote:

fixed url to [[wiktionary:yi:project:bugzilla/04126]]

There I made different test cases for RTL {{SITENAME}} as
װיקיװערטערבוך (פּרוּװ)
which should be rendered "visualy" in an RTL environment as
(װיקיװערטערבוך (פּרוּװ

Without {{CONTENTDIR}} MediaWiki:Sitenotice *might be broken / not rendered
correctly at RTL wiki's.

I am still investigating how different browsers behave for the provided testcases.
What I would like to achieve is proper rendering as shown in
[[wiktionary:yi:image:Bugzilla_04126_001.jpg]]

regards reinhardt [[user:gangleri]]

gangleri wrote:

(In reply to comment #4)

This would be useless since having it in the sitenotice as <span
dir={{CONTENTDIR}}> would generate <span dir=rtl> on RTL wikis when someone adds
an English sitenotice (which is LTR), I've added a comment in CommonSettings.php
on the cluster reminding admins to add wrap it in <span dir=ltr></span> which
should take care of it.
Marking this as INVALID.

made [[wiktionary:yi:project:bugzilla/04126#bugzilla:04126.23c4]] to ilustrate
that there is still a problem

REOPENed the bug

pablo wrote:

This bug is invalid.

The problem is actually that the message WAS displayed according to content
directionality!
The proper solution is (as said upper) to enclose a sitenotice message in
English with a proper dir=ltr if it is to be shown on other (specially RTL)
wikis.

PS: <span dir=ltr> will set the directionality for the word ordering, but not for
the paragraph justification; for that use <div dir=ltr> instead.

Semantic CSS classes could be used instead.

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