Page MenuHomePhabricator

Problem with tabs display on Serbian Wikipedia
Closed, DeclinedPublic

Description

Author: loshmi

Description:
(I reported this before, but I was told to separate my previous post which featured this problem among one another with different nature).

Serbian language has two different writing systems — Cyrillic alphabet (ћирилица) and Latin alphabet (latinica). Wikipedia in Serbian use both — clicking on tab "ћирилица" (sr-ec) or "latinica" (sr-el) a reader can choose one or another. Current Vector beta on Serbian Wikipedia, doesn't show tabs "ћирилица" and "latinica" in a visible way. You have to click on hidden toolbar to switch from one writing system to another. All Serbian sites which has this option put them in some visible place. It's very important for those tabs to be seen by default, as they are in the current Monobook skin. Otherwise, the readers might not be aware of them. (Also, editors often use that option to check if both versions are displayed correctly and it's not practical that they are hidden).


Version: 1.17.x
Severity: major

Details

Reference
bz24710

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:04 PM
bzimport set Reference to bz24710.

The Chinese Wikipedia seems to have some JavaScript in place to put the name of the currently selected variant on top of the dropdown (see http://zh.wikipedia.org/?useskin=vector ). If you think that's an acceptable solution, I could just add that in Vector itself so you don't need JS hacks for it.

Further inspection shows it's not JavaScript at all, but some optional setting called $wgVectorShowVariantName. zhwiki requested it in bug 23531; if you can show community consensus for it, I can enable this setting on srwiki as well.

loshmi wrote:

I don't get what kind of consensus you have in mind. Please take a look at the Monobook skin on Serbian Wikipedia - you can clearly see that the tabs ћирилица/latinica are visible all the time.

loshmi wrote:

P. S. Sorry that I couldn't reply sooner.

I've enabled this feature on srwiki now, but there's something weird going on. The variant name only shows after you've selected a variant (either Latin or Cyrillic), but doesn't show anything initially.

This is because the default variant (sr) is disabled. So the code tries to find the active variant (sr) in the variant list, which only contains enabled variants (sr-el and sr-ec), and fails.

Do you, or anyone in the Serbian community, know why this strange construct exists?

Looks like you could experiment with fixing this by editing [[MediaWiki:Variantname-sr]] to say something other than 'disable'

loshmi wrote:

Oh, no. This doesn't solve problem at all, because the main problem is exactly that those tabs are not visible by default, and they should be. I think that one of your developers her is Rainman, which I've asked before about this, but he told me to report here, cause he's short with time recently. Maybe I can ask him again, or I can ask few other programmers from Serbian wiki. I'll post an answer here as soon as they told me if they know anything about that strange construct. Or better, I'll ask them to reply here directly.

(In reply to comment #7)

Oh, no. This doesn't solve problem at all, because the main problem is exactly
that those tabs are not visible by default, and they should be.

They are, I just changed this. Try clicking on latinica in the variant menu, and it'll show up. It's just that when the default variant is used (sr; which Rainman tells me means don't convert anything) is selected, nothing is shown. You could try to fix this by editing the page I mentioned and putting a description in there; I think that'll have other side effects as well, but you could try to see what it does.

I edited that page, and I think it works as Loshmi wants in Vector. However, this has an ugly side effect for Monobook (and, likely, other skins), because the "default" tab is now shown and it takes a lot of unnecessary space (and, in fact, on smaller screens with sysop account, the last tab doesn't fit in the tabs row, but I guess we can put something shorter than "подразумевано", I just can't think of a better word).

Maybe we should change the software so there's a way to disable a variant other than setting its description to 'disable' (this is an ugly hack anyway), so we can have a variant that's disabled but does have a description.

I don't know what you mean by "disable a variant", because the default has never been disabled. The fact that there was "disable" in the MediaWiki:Variantname-sr message just meant that the tab shouldn't be shown, and rightfully so for Monobook. To be honest, I don't think this should be visible in Vector either.

Rereading the original bug description, I think there should be a different approach to this problem: not in changing the message, but rather in changing CSS/JS so as to display the variant names as tabs/whatever, not as dropdown menu items without an intuitive "menu name" (because a triangle/arrow doesn't mean much).

loshmi wrote:

"Подразумевано" means "default" - it doesn't imply that it serves for writing selection. Maybe we can make some other name, but I think that would be confusing and non practical anyway.

I agree that the best solution would be that tabs ћирилица/latinica are visible all the time like in Monobook, and like other tabs (Страна, Разговор, читај, измени, историја) in Vector.

(In reply to comment #11)

I don't know what you mean by "disable a variant", because the default has
never been disabled. The fact that there was "disable" in the
MediaWiki:Variantname-sr message just meant that the tab shouldn't be shown,
and rightfully so for Monobook. To be honest, I don't think this should be
visible in Vector either.

Being able to use the tabs/dropdown/whatever to navigate from unconverted to Latin or Cyrillic but not back makes no sense to me.

Rereading the original bug description, I think there should be a different
approach to this problem: not in changing the message, but rather in changing
CSS/JS so as to display the variant names as tabs/whatever, not as dropdown
menu items without an intuitive "menu name" (because a triangle/arrow doesn't
mean much).

Then this is a feature request for the Vector skin, changing component.

(In reply to comment #13)

Being able to use the tabs/dropdown/whatever to navigate from unconverted to
Latin or Cyrillic but not back makes no sense to me.

Well, yeah, I agree that it's a bit weird, but we didn't have any complaints so far, in the past 4 years and counting. If people want to see a variant, be it Cyrillic or Latin, they usually don't want to go back to default, because, well, default tends to be the buggiest variant (also the default one and the one that should stay for all intents and purposes). And the rest of us that do want to get back to the default... well, we know how to do it by changing the URL, for instance.
(In reply to comment #13)

Then this is a feature request for the Vector skin, changing component.

Alright, at least we now know where to poke. :)

loshmi wrote:

(In reply to comment #14)

(In reply to comment #13)

Being able to use the tabs/dropdown/whatever to navigate from unconverted to
Latin or Cyrillic but not back makes no sense to me.

This works when you click on tab "article" (named "чланак" in Monobook, and "страница" in Vector).

OK, I dug a bit deeper here and here are my findings.

The following code is in place now for any page (I changed the indentation for obvious reasons):
<div id="p-variants" class="vectorMenu">
<h5><span>Варијанте</span><a href="#"></a></h5>
<div class="menu">

<ul>
 <li id="ca-0"><a href="/sr-ec/<pagetitle>" >ћирилица</a></li>
 <li id="ca-1"><a href="/sr-el/<pagetitle>" >latinica</a></li>
</ul>

</div>
</div>

Instead, having something like this does the trick:
<div id="p-variants" class="vectorTabs">
<h5>Варијанте</h5>
<ul>

<li id="ca-0"><a href="/sr-ec/<pagetitle>" ><span>ћирилица</span></a></li>
<li id="ca-1"><a href="/sr-el/<pagetitle>" ><span>latinica</span></a></li>

</ul>
</div>

So, basically, div with the p-variants ID should have the properties of vectorTabs class (and everything that goes with it), not vectorMenu.

I don't think there's an easy and slick way of achieving that without changing MediaWiki, or whatever generates this code. Since CSS doesn't have non-inheritance, even if it's possible to do this in CSS, it would be long, dirty and ugly.

(In reply to comment #16)

So, basically, div with the p-variants ID should have the properties of
vectorTabs class (and everything that goes with it), not vectorMenu.

I don't think there's an easy and slick way of achieving that without changing
MediaWiki, or whatever generates this code. Since CSS doesn't have
non-inheritance, even if it's possible to do this in CSS, it would be long,
dirty and ugly.

You can use JS to change the class of the variants <div> and unwrap the contents of the <h5>.