User talk:Yair rand/TabbedLanguages2.js

Other languages: de eo fr nl pt ro sv

Open issues
Disclaimer: Some of the below "open issues" are subjective, and some editors may feel that some of these properties are actually desirable. Feel free to discuss. —Ruakh TALK 02:13, 19 June 2011 (UTC)

Category-handling is fragile
The handling of categories is rather fragile. The script cannot always tell which language-section a category belongs to. (Mistakes are usually indicative of problems in the entries themselves, but that is not obvious to readers and editors.) —Ruakh TALK 02:13, 19 June 2011 (UTC)
 * The script now passes over languages in situations where sections don't have any script-identifiable categories, which will probably improve things a bit. Votes/2011-04/Derivations categories will also improve sorting if it passes. --Yair rand 03:19, 21 June 2011 (UTC)
 * The vote has passed. Assuming a page has been autoformatted, the only way that I know of that a category could be sorted incorrectly would be if a section does not have a category beginning with the language name, has a topic category without the language name (of which there are far fewer than there used to be due to WT:Votes/2011-04/Lexical categories), and is followed by another language section. (If it hasn't been autoformatted, that leaves open the possibility of categories having been incorrectly placed.) --Yair rand 10:58, 28 June 2011 (UTC)
 * Sounds good, thanks! I'd still like to leave this under "open issues", though, if you don't mind, since although you've greatly improved the situation, this is still a problem that tabbed-languages can cause. —Ruakh TALK 11:22, 28 June 2011 (UTC)

Difficult to turn off completely
The current beer-parlor discussion provides a big button to turn this feature on and off:

<div style="outline: none;cursor: pointer;text-align: center;text-decoration: none;font: 18px/100% Arial, Helvetica, sans-serif;padding: .5em 2em .55em;text-shadow: 0 1px 1px rgba(0,0,0,.3);-webkit-border-radius: .5em; -moz-border-radius: .5em;border-radius: .5em;-webkit-box-shadow: 0 1px 2px rgba(0,0,0,.2);-moz-box-shadow: 0 1px 2px rgba(0,0,0,.2);box-shadow: 0 1px 2px rgba(0,0,0,.2);color: #fef4e9;border: solid 1px #da7c0c;background: #f78d1d;background: -webkit-gradient(linear, left top, left bottom, from(#faa51a), to(#f47a20));background: -moz-linear-gradient(top, #faa51a,  #f47a20);">(Please purge your cache so that this button will work.)

but there doesn't seem to be a way to do so from Special:Preferences, Per-browser preferences, or the sidebar.

—Ruakh TALK 02:13, 19 June 2011 (UTC)


 * Update: now this is available at Special:Preferences and at Per-browser preferences — but annoyingly, all three mechanisms are independent of each other. If I turn on all three, they don't seem to break each other (which is nice), but then the only way to turn it off is to turn off all three. (This is annoying, given that there's no easy way to get to a copy of the above button.) —Ruakh TALK 13:20, 12 July 2011 (UTC)


 * (Correction: I do experience some problems when I have both the Gadget and the above button enabled. That's not shocking, but it's unfortunate; if/when tabbed-languages gets turned on by default, people who already had it turned on are likely to experience problems as well. —Ruakh TALK 01:57, 13 July 2011 (UTC))


 * Fixed. --Yair rand 06:09, 13 July 2011 (UTC)


 * Oh, thanks! I guess I just had to Shift+Refresh. —Ruakh TALK 12:11, 13 July 2011 (UTC)

There is no "view all" option
There should be a link in the sidebar to view the entire page at once; that is, to turn off the feature temporarily on the current page. I can think of two ways this could work, and I'm fine with either one of them:


 * The feature could check the query-string for something like <tt>tabbed-languages=off</tt>, telling it not to do anything. The link in the sidebar would then be just a regular link to the current URL plus that query-string element. (Ideally, if the feature detects <tt>tabbed-languages=off</tt> in the query-string, it would add a sidebar link back to the version without that.)
 * We could add a sidebar link to permanently turn the feature on and off. Clicking the link would set the appropriate cookie and then reload the current page.

In either case, I'm not sure if this should go in the "Visibility" portlet, or what.

—Ruakh <i >TALK</i > 02:13, 19 June 2011 (UTC)


 * This seems like an issue for after tabbed languages is enabled by default. If the "Visibility" portlet is always going to be displayed, then it would be best to either modify Mediawiki:Sidebar to have an empty list there on load (if that's possible), or to modify Common.js to always have the portlet displayed and add the button to toggle tabbed languages at the same time. The button would switch the <tt>disable-tabbed-languages</tt> cookie and then reload the page. (<tt>tabbedlanguages=off</tt> does work atm to display the page without tabbed languages, btw.) --Yair rand 10:33, 12 July 2011 (UTC)


 * Re: first sentence: why? Surely we can make it available through the sidebar without making it enabled by default? —Ruakh <i >TALK</i > 13:16, 12 July 2011 (UTC)


 * Hm, well the VisibilityToggles bit is loaded from Common.js, which loads after the tabbed languages gadget but before TL enabled from the above button or prefs, and the portlet itself is only sometimes created, and when the documentready event fires is totally unpredictable and for all I know it could be in a completely different place come MW1.18, and VisibilityToggles bases whether to create the portlet not on whether it exists already but on whether VisibilityToggles.button is set, so... Since this is for something that's not even going to be necessary after this is turned on (being replaceable by much simpler code), it seems like a bit of a waste of effort... --Yair rand 14:24, 12 July 2011 (UTC)


 * O.K., fair enough. Thanks for having considered it. :-)  —Ruakh <i >TALK</i > 14:27, 12 July 2011 (UTC)

Resolved issues
There is no link to edit a language section

There is no link to edit a language section
It's still possible to edit the subsections of a language section, but it's not possible to edit the language section as a whole (except by editing the entry as a whole). This is annoying if you need to add an etymology or pronunciation or whatnot. (Admittedly, that can be done by section-editing the following section, and inserting the new section at the top; but I don't think that's very intuitive to most people. It works because of how section-editing is implemented in MediaWiki, a sort of leak in the section-editing abstraction.) —Ruakh <i >TALK</i > 02:13, 19 June 2011 (UTC)


 * Confirmed fixed. Thanks, Yair! —Ruakh <i >TALK</i > 11:19, 21 June 2011 (UTC)

Language-heading interwikis no longer work

Language-heading interwikis no longer work
The "Show an interwiki link under the language heading when one exists in the sidebar." preference at Per-browser preferences, and the corresponding Gadget at Special:Preferences, have no visible effect when this feature is turned on. —Ruakh <i >TALK</i > 02:13, 19 June 2011 (UTC)


 * Fixed. --Yair rand 00:12, 21 June 2011 (UTC)


 * Confirmed. Thank you! —Ruakh <i >TALK</i > 01:58, 21 June 2011 (UTC)

"Forward" button sometimes broken

"Forward" button sometimes broken
Steps to reproduce:


 * 1) Visit [[foo]].
 * 2) Click a link (one of the "edit"-links, say, or one of the links in the sidebar).
 * 3) Click your browser's "back" button.

Expected behavior:


 * The browser's "forward" button should be clickable, to undo the "back".

Actual behavior:


 * It is clickable for a second, until tabbed languages does its magic, at which point it becomes disabled.

(This is using Firefox 4.0.1 on WinXP. I can test in other browsers if needed.)

—Ruakh <i >TALK</i > 12:20, 22 June 2011 (UTC)
 * Fixed. --Yair rand 18:52, 22 June 2011 (UTC)


 * Confirmed. Thank you! —Ruakh <i >TALK</i > 16:23, 25 June 2011 (UTC)

<div class="NavHead" id='"[Mark this page as patrolled]" link ends up in last language tab.' style="text-align:left">"[Mark this page as patrolled]" link ends up in last language tab.

"[Mark this page as patrolled]" link ends up in last language tab.
When patrolling a new page, the little "[Mark this page as patrolled]" link at the bottom of the page ends up in the last language tab. (Likewise the little "[Mark as patrolled]" link when patrolling an edit; but that one's not a big deal, because then there's a bigger link at the top of the page anyway.) It should either appear in every language tab, or else be outside the whole tabbed-languages thing. Or, better yet, maybe tabbed languages should have no effect when patrolling a new page, since in that case you really want to see the whole thing anyway. —Ruakh <i >TALK</i > 12:55, 26 June 2011 (UTC)


 * I moved the button outside the language sections. --Yair rand 22:37, 26 June 2011 (UTC)


 * Confirmed, thank you. By the way, the new tab-link-thing for editing a whole language section looks very nice! —Ruakh <i >TALK</i > 23:16, 26 June 2011 (UTC)

A great script with some frustrating features
Tabbed Languages has improved my editing and viewing experience for the most part, and I am very grateful for your work on it. However, adding a new language section is extremely frustrating to me if I try to do it through your script.
 * First of all, I have to type in the full language name. Would it be possible just to type in the code (something like <tt> </tt>, perhaps, or by the method that the translation system uses?)
 * The line that says <tt> </tt> before it is clicked on should instead say <tt>  </tt> to reflect current template usage.
 * I commonly put etymologies, alternative forms, and usage notes in my new entries, and I see no in-built way to add these in.

All these lacking features make a really good tool simply inefficient for me to use in most cases. I would be even more indebted to you than I already am if you could make any of these changes. Thank you --Μετάknowledge discuss/deeds 18:21, 12 May 2012 (UTC)
 * I've fixed it to use instead of . The tool is targeted at simplifying editing for users who haven't edited before, so I'd rather have language codes used as rarely as possible. I'll try to add an autocomplete function like the one in the translations script so that the user doesn't have to type out the whole language name every time. Adding a way to add etymologies, pronunciations, usage notes, etc. is something I'll need to get around to at some point, but I still haven't thought of any good ideas for a design...
 * Thanks for the feedback. :) --Yair rand (talk) 15:45, 13 May 2012 (UTC)
 * Re design: maybe the 'More' dropbox could have options for other L3 headers (like 'Etymology'), the way it currently does for 'Synonyms' and 'Antonyms'.
 * In any case, thank you so much for your work on this, and your helpful response. --Μετάknowledge discuss/deeds 17:16, 13 May 2012 (UTC)
 * The problem with putting options like adding Etymology in the 'more' box is that the box is really for modifying/adding content related to specific definitions. Individual definitions can have associated synonyms and antonyms, but etymologies are per-section. (I've added autocompleting for language names in the "Add language" box, by the way.) --Yair rand (talk) 01:32, 31 May 2012 (UTC)

Language flags
Is it possible to make MediaWiki:Gadget-WiktCountryFlags.css work with tabbed languages? It is an extremely useful visual guide. — Ungoliant (Falai) 22:21, 22 October 2012 (UTC)
 * Probably not, unfortunately. Adding the flags to the top of the tab's content would be fairly simple, just requiring duplicating the IDs and adding "<tt>container</tt>" to the end of each id in the stylesheet, but I assume people would want to flags in the tabs themselves, which don't have classes or anything attached to them, and reworking things to add them would probably slow things down enough to make it not worth it if the flags are only used by a few users. --Yair rand (talk) 22:31, 22 October 2012 (UTC)
 * Pity. Thanks anyway. — Ungoliant (Falai) 22:54, 22 October 2012 (UTC)