Last modified: 2014-09-22 18:01:54 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T33738, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 31738 - Templates should have 'meta icons' to fix text direction issues
Templates should have 'meta icons' to fix text direction issues
Status: NEW
Product: MediaWiki
Classification: Unclassified
Templates (Other open bugs)
unspecified
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on: 23796
Blocks: rtl
  Show dependency treegraph
 
Reported: 2011-10-15 21:35 UTC by Tom Morris
Modified: 2014-09-22 18:01 UTC (History)
9 users (show)

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


Attachments
screenshot of the issue on Hebrew Wikipedia (195.09 KB, image/png)
2011-10-15 21:36 UTC, Tom Morris
Details

Description Tom Morris 2011-10-15 21:35:08 UTC
Many Wikimedia wikis use "header icons" to display meta information about articles - whether they have a particular quality ranking, whether they are protected or semi-protected or whatever. These are absolutely positioned using CSS.

To see a widely used example of this, check out this template on en.wp:

http://en.wikipedia.org/wiki/Template:Topicon

On right-to-left wikis like Hebrew, these are placed on the other side of the screen, obviously.

But an issue can arise if you read a right-to-left wiki with a left-to-right language set in your preferences.

An example:

1. Go to Hebrew Wikipedia - http://he.wikipedia.org/ - and sign in.
2. Set your preferences to have English (or another LTR language).
3. Go to the article on Israel - http://he.wikipedia.org/wiki/%D7%99%D7%A9%D7%A8%D7%90%D7%9C

This article has icons for being protected (or semi-protected, can't tell: my Hebrew isn't that good) and for being a featured article. Only it overlaps the title of the article which has been put on the left.

One possible solution for this is to specify a particular CSS class or other method which positions the 'meta icons' based on where the title is.

It is worth noting also that not all articles in right-to-left languages have right-to-left article names - see http://he.wikipedia.org/wiki/London_Calling
Comment 1 Tom Morris 2011-10-15 21:36:30 UTC
Created attachment 9239 [details]
screenshot of the issue on Hebrew Wikipedia
Comment 3 Amir E. Aharoni 2011-10-15 23:22:38 UTC
This is a wider problem. These top icons are not part of the core code - they are implemented separately in every project. So, apparently there is demand for them, but it's impossible to fix them in all languages in one fell swoop.

It would be nice to have some core CSS that implements them in a uniform and easy to use way and makes them behave nicely with right-to-left languages and other things on the top of pages, such as the FlaggedRevs box. When this is done, every project will have to convert its templates to use the new functionality.
Comment 4 LordAndrew 2011-10-15 23:37:12 UTC
Duplicate of bug 23796? A software-based solution would take care of this problem.
Comment 5 Amir E. Aharoni 2011-10-15 23:40:46 UTC
More like a blocker of 23796 with RTL focus.
Comment 6 Robin Pepermans (SPQRobin) 2011-10-16 00:32:30 UTC
When doing the 1.18 RTL improvements, I did not really know what the direction of the page title should be based on. I left it, so it follows the user language direction. Because these icons are at the opposite side of where the content starts, it obviously interferes with the page title when using a language in the other direction...

A solution could be to make the page title follow the page content language, so the page title would no longer depend on the user language direction.
Comment 7 Fomafix 2012-05-28 19:42:23 UTC
On dewiki we solve this problem with

	mw.loader.using( [ 'mediawiki.util' ], function () { $( function () {
		if ( mw.config.get( 'dontShowTopicons', false ) ) return;
		mw.util.$content
		.find( 'div.topicon' )
		.insertBefore( '#firstHeading' )
		.show();
	} ) } );
in [[MediaWiki:Vector.js]]

	div.topicon {
		float: right;
		margin-left: 3px;
		font-size: 0.8em;
	}
	#firstHeading {
		overflow: visible;
	}
in [[MediaWiki:Vector.css]

and
	.topicon {
		display: none;
	}
in [[MediaWiki:Common.css]]

Example: https://de.wikipedia.org/w/index.php?title=Burg_Stahleck_%28Bacharach%29&uselang=ar&useskin=vector
Comment 8 Fomafix 2012-05-31 07:33:18 UTC
For enwiki and other wikis with [[Template:Top icon]] containing absolute positioning and individual position per icon the text direction issue can be fixed:

Actual:

<div class="topicon" style="display: none; right: 55px;">
div.topicon {
    display: block !important;
    position: absolute;
    top: 10px;
    z-index: 10;
}

Solution:

<div class="topicon" style="display: none; margin-right: 55px; margin-left: 55px;">
div.topicon {
    display: block !important;
    position: absolute;
    top: 10px;
    z-index: 10;
    right: 0; /* gets flipped for RTL */
}
Comment 9 Robin Pepermans (SPQRobin) 2012-05-31 12:57:59 UTC
(In reply to comment #8)
>     right: 0; /* gets flipped for RTL */

See also relevant bug 31923: flipping of site CSS should be disabled by default.

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


Navigation
Links