Page MenuHomePhabricator

Adding an extra tab in the top of Basque Wikipedia
Closed, ResolvedPublic

Description

Hello,
Some users of the Basque Wikimedians User Group are working in not-wmf based Vikidia, in order to make content accessible to 8-13 year schoolchildren. This project is at risk now, as funding seems to be finishing, but we are still very interested in it. Some users have suggested the possibility to insert an extra tab in the header (Article, Talk, EXTRA TAB) that would point to the article with a slash (Solar System/KIDS PAGE). This would give some benefits, as the possibility to use the template system of Wikipedia and centralizing the information.

I have done my research, and it seems that there is an extension for this: https://www.mediawiki.org/wiki/Extension:Header_Tabs. Is this extension user for this? Can we implement it in euwp to develop this project?

Event Timeline

that would point to the article with a slash

Where would that article for younger people be located? On a Basque Wikipedia sub page, if I get it right?
The whole idea to me sounds a bit similar to Simple English Wikipedia (but of course not in English)?

I have done my research, and it seems that there is an extension for this

The Header Tabs extension is not deployed yet on any Wikimedia sites, so that code would have to go through the review process.

The whole idea to me sounds a bit similar to Simple English Wikipedia (but of course not in English)?

Yes, it sound like that, but we can't have a Simple Basque Wikipedia, isn't it?... so it would be a solution instead of having a not well-known external website, and directing traffic through Wikipedia. Maybe some students will read the big article after the small one.

Where would that article for younger people be located? On a Basque Wikipedia sub page, if I get it right?

It could be like that. Solar-system is the main article. Solar-system/WIKIDS is the kids one. Then, we can even have a different front-page for the WIKIDS project, with the relevant information and even a different css.

The Header Tabs extension is not deployed yet on any Wikimedia sites, so that code would have to go through the review process.

Is there any other solution to insert a new tab?

I don't know if "inserting a new tab" is the best solution. I'd recommend to discuss the actual underlying problem (we want a second version of an article, for a different audience) in a better suited and broader venue, like a mailing list.

I don't either know if "inserting a new tab" is the best solution, but we are discussing it in the Basque Wikimedians User Group mailing list and we want to know if this COULD BE a solution, technically. If it CAN BE a solution, then we will discuss if this is THE solution. But we are not going to discuss this solution if it's not feasible.

On the English Wiktionary they achieve this for the "Citations" namespace using a gadget called "DocTabs" (js, css).

BTW, header tabs is not the right extension for this. To see it in practice, see e.g. this page.

Thanks for the clue @jhsoby! Today we have been discussing this again, and it seems a good solution but we need to know if this is even possible. I'll see what you have been doing!

Another question, @jhsoby... I see that it creates a namespace called 114. So I think that part of the solution would be creating a new namespace for the articles... something like Wikids:Solar-system... isn't it?

It doesn't create namespace 114, but points the tab link to a page in that namespace (which happens to be 114 in this case) with the same pagename. So yes, if you use this system the pages from Vikidia should be imported so that the pages from Vikidia's main namespace go into a new namespace (probably called Vikidia), and the script needs to be adapted to point to that namespace. One question is if you want there to be a (red) link to Vikidia on every page that doesn't have one, or if it should be restricted to only the pages that have a Vikidia page – I can imagine quite a few articles that shouldn't necessarily have a "kid's version". There are multiple possible solutions – only showing the links when a Vikidia page exists; implementing a template like {{NOVIKIDIALINK}} with some code that trigger the tab not to be shown; etc.

It seems that there's community agreement on this but the discussión is going on (https://eu.wikipedia.org/wiki/Wikipedia:Txokoa#Vikidia_eta_Wikipedia).

About the link, there are many solutions, and the easiest ones are via css, by the way. You can show a link when it exists, and another thing or nothing when it is a red link (class="new").

I have been looking at the code and can't find where it creates the namespace. I think we should ask the creation of one here in Phabricator isn't it?

Yeah, to create a namespace you need to file a task here (preferrably when the discussion is finished). You also need to figure what should be imported – Vikidia naturally has several namespaces, but with this solution I think only the main namespace content should go into the new namespace, so you need to figure out what should be done with the other content. Looking at the stats, there are only four talk pages, some user & user talk pages (probably shouldn't be imported), a few images (all without any licensing info; should probably try to find from Commons instead, so not import), around 150 templates (many of which seem to be copied from Wikipedia, and therefore probably identical to existing ones), and just a small handful of pages in other namespaces. All in all I'll say it's very doable, and I'd be happy to help you with the import itself, since I have done similar things a couple of times for Incubator wikis to Wikipedias, so I know what steps to take.

Alright, I finished the script, you can test it by adding importScript( 'Lankide:Jon Harald Søby/VikidiaTab.js' ); to your common.js. It substitutes the wikiproject namespace for Vikidia, since the Vikidia namespace doesn't exist yet. You can test it on a page like Arkitektura or any other article to see that it works.

It works fine! We are discussing the name and the technical details cited in the discussion. I think it'll take one week. We have a workshop on Vikidia April 12th and it would be great to announce the details there!

Thanks for all!

T47666 might be another possible implementation.

Which would the differences be in relation to the solution proposed by @jhsoby?

The end result would be pretty much the same, but an extension would be preferable since adding the tab(s) is done server-side instead of client-side by a javascript. However, it seems that extension is in need of a maintainer, which I wish I could do, but I don't have the know-how. Until that happens, the JavaScript can be used and if the extension gets revitalized and approved then you could switch to it, that would be simple once the extension is approved/set up.

Ok! So now we can start working on this. I have made some changes in the css and create a new Main Page (stub: https://eu.wikipedia.org/wiki/Txikipedia:Azala).

We need to do some subtasks here:

  • Importing every article from Vikidia
  • Making the extra tab code: we have decided that it would be a full tab when it exists and a +tx button when it doesn't. I can get that with CSS easily, and the images are already uploaded (https://commons.wikimedia.org/wiki/Category:Txikipedia)
  • Show items in namespace. If this is impossible, every article should have a category called Txikipedia.
  1. I've already prepared the import, and I think it's ready to go, but I need importer rights. That's not something local bureaucrats can give, it needs to go via [[m:Steward requests/Permissions]], but for that we need some community consensus for that. Where should I go to request that?
  2. The tab code is working, we just need to translate the line with "tooltip-ca-nstab-txikipedia" into Basque. When done you can move that page to [[MediaWiki:Gadget-TxikipediaTab.js]], and put the necessary CSS for the tab in [[MediaWiki:Gadget-TxikipediaTab.css]]. Then create [[MediaWiki:Gadget-TxikipediaTab]] with a description of what the script does, and add the following line to [[MediaWiki:Gadgets-definition]]:
    1. TxikipediaTab[ResourceLoader|default|dependencies=site,mediawiki.api,mediawiki.util|type=general]|TxikipediaTab.js|TxikipediaTab.css
  3. That's easy to add by bot once the import is done.

The import issue has been discussed and accepted here: https://eu.wikipedia.org/wiki/Wikipedia:Txokoa#Vikidia_eta_Wikipedia. If you need a specific consensus with your name, it would take some time.

I'm going to make the translations needed and start with the css in the example page I have created: https://eu.wikipedia.org/wiki/Txikipedia:Karraskari

The Gadget and CSS is there. It would be great to have a preload function, so when someone creates a Txikipedia item receives some extra information and preloaded category.

Found an unexpected (but obvious) issue: while Vikidia links point to pages in Vikidia, Txikipedia pages point to links in Wikipedia when imported. It's easy to change by hand them from [[Foo]] to [[Txikipedia:Foo]], but it would be better to have it done automatically. And I don't know if that's even possible.

You can change it by a bot. If all links in certain namespace should be
changed as you shown, it is not a problem with bot.

I can do it if you want. Then, please contact me at
martin.urbanec@wikimedia.cz, I'll do it.

Martin

I have already fixed all of this when preparing the import. 😊

Den tor. 5. apr. 2018, 15.52 skrev Theklan <
no-reply@phabricator.wikimedia.org>:

Theklan added a comment.

Found an unexpected (but obvious) issue: while Vikidia links point to
pages in Vikidia, Txikipedia pages point to links in Wikipedia when
imported. It's easy to change by hand them from [[Foo]] to
[[Txikipedia:Foo]], but it would be better to have it done automatically.
And I don't know if that's even possible.

*TASK DETAIL*
https://phabricator.wikimedia.org/T189459

*EMAIL PREFERENCES*
https://phabricator.wikimedia.org/settings/panel/emailpreferences/

*To: *Theklan
*Cc: *jhsoby, Framawiki, Base, Aklapper, Theklan, Jayprakash12345,
Zoranzoki21, DatGuy, Devwaker, Niklitov, Urbanecm, JEumerus, Tulsi_Bhagat,
Wong128hk, Luke081515, SimmeD, biplabanand, Snowolf, Dcljr,
Jdforrester-WMF, Matanya, Rxy, Jay8g, Krenair

Oh, great then! Less work for me :D. I wonder if this is intended as "mirror" or how should this work.

When you say mirror, are you implying that every item should be automatically synchronized in both places? It would be interesting, but don't know if we really need it.

Small comment: it is not wise to use Google Fonts API in site CSS [1] because of privacy concerns with including anything Google-y. T110027 has created a local Google Fonts mirror for Wikimedia, so you can replace current @import declaration with
@import url(https://tools-static.wmflabs.org/fontcdn/css?family=Gochi+Hand);

[1]: https://eu.wikipedia.org/wiki/MediaWiki:Gadget-TxikipediaTab.css

Found an unexpected (but obvious) issue: while Vikidia links point to pages in Vikidia, Txikipedia pages point to links in Wikipedia when imported. It's easy to change by hand them from [[Foo]] to [[Txikipedia:Foo]], but it would be better to have it done automatically. And I don't know if that's even possible.

Reading your discussion, there is a sense in creating a shorter namespace alias (to Txikipedia: namespace), so editors could write something like [[tx:biologia|]] (I suppose there won’t be global tx: interwiki any soon, so we can get something like this) and get the local link simpler instead of a lot longer [[txikipedia:biologia|]].

That could be interesting. Another solution, but maybe more difficult, is that links INSIDE Txikipedia namespace always point to Txikipedia if w: is not added.

That could be interesting. Another solution, but maybe more difficult, is that links INSIDE Txikipedia namespace always point to Txikipedia if w: is not added.

I would guess that it is probably not possible without writing an extension specifically for Basque Wikipedia or adding another user script to change all the links. Both solutions are not optimal, since you would need to check if all N links that do not go to Txikipedia exist in Txikipedia (so links could become red).

How is Vikidia different from Wikijunior already hosted on Wikibooks? I do not really get why you add the ns to Wikipedia. Well, whatever, as long as it is not a tab to an external site as proposed initially.

That could be interesting. Another solution, but maybe more difficult, is that links INSIDE Txikipedia namespace always point to Txikipedia if w: is not added.

I think the best way to achieve that would be to just use a template for links actually. {{tx|planeta}}k => [[Txikipedia:planeta|planeta]]k.

I never proposed an external link. The description is there and I think is pretty clear that it was a way to have internal link what before was external.

Vikidia is a multilanguage Encyclopedia, and AFAIK Wikijunior is a projecto to create books for children.

That could be interesting. Another solution, but maybe more difficult, is that links INSIDE Txikipedia namespace always point to Txikipedia if w: is not added.

I think the best way to achieve that would be to just use a template for links actually. {{tx|planeta}}k => [[Txikipedia:planeta|planeta]]k.

Yes for connoisseurs, but for newbies is quite misleading to have things in templates, instead of links when there's a button called "link".

I think the best way to achieve that would be to just use a template for links actually. {{tx|planeta}}k => [[Txikipedia:planeta|planeta]]k.

I would say that this is less user-friendly since tools like visual editor won’t get typical link menu and instead will display template editing. Also there is include size limit to be concerned about in this solution, but for the most pages it won’t matter.

jhsoby closed this task as Resolved.EditedApr 5 2018, 11:18 PM
jhsoby claimed this task.

Alright, the import is finished, so I'm closing the task. Some work remains to be done, but I think that's better done and coordinated on the Basque Wikipedia itself as it shouldn't require any developer attention/coding/etc. (Perhaps except this linking issue – but that should probably be a different task in case code is needed, instead of being part of this task itself.)

I have posted an explanation of the import itself and some info on what needs to be done on Theklan's user talk page here.