User talk:Yair rand/TabbedLanguages2.js

From Wiktionary, the free dictionary
Latest comment: 11 years ago by Ungoliant MMDCCLXIV in topic Language flags
Jump to navigation Jump to search
Other languages: de eo fr nl pt ro sv

Open issues[edit]

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. —RuakhTALK 02:13, 19 June 2011 (UTC)Reply

Category-handling is fragile[edit]

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.) —RuakhTALK 02:13, 19 June 2011 (UTC)Reply

The script now passes over languages in situations where sections don't have any script-identifiable categories, which will probably improve things a bit. Wiktionary:Votes/2011-04/Derivations categories will also improve sorting if it passes. --Yair rand 03:19, 21 June 2011 (UTC)Reply
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)Reply
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. —RuakhTALK 11:22, 28 June 2011 (UTC)Reply

Difficult to turn off completely[edit]

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

(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, Wiktionary:Per-browser preferences, or the sidebar.

RuakhTALK 02:13, 19 June 2011 (UTC)Reply

Update: now this is available at Special:Preferences and at Wiktionary: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.) —RuakhTALK 13:20, 12 July 2011 (UTC)Reply
(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. —RuakhTALK 01:57, 13 July 2011 (UTC))Reply
Fixed. --Yair rand 06:09, 13 July 2011 (UTC)Reply
Oh, thanks! I guess I just had to Shift+Refresh. —RuakhTALK 12:11, 13 July 2011 (UTC)Reply

There is no "view all" option[edit]

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 tabbed-languages=off, 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 tabbed-languages=off 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.

RuakhTALK 02:13, 19 June 2011 (UTC)Reply

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 disable-tabbed-languages cookie and then reload the page. (tabbedlanguages=off does work atm to display the page without tabbed languages, btw.) --Yair rand 10:33, 12 July 2011 (UTC)Reply
Re: first sentence: why? Surely we can make it available through the sidebar without making it enabled by default? —RuakhTALK 13:16, 12 July 2011 (UTC)Reply
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)Reply
O.K., fair enough. Thanks for having considered it. :-)   —RuakhTALK 14:27, 12 July 2011 (UTC)Reply

Resolved issues[edit]

A great script with some frustrating features[edit]

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 {{subst:xyz}}, perhaps, or by the method that the translation system uses?)
  • The line that says {{infl}} before it is clicked on should instead say {{head}} 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 --Μετάknowledgediscuss/deeds 18:21, 12 May 2012 (UTC)Reply

I've fixed it to use {{head}} instead of {{infl}}. 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)Reply
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. --Μετάknowledgediscuss/deeds 17:16, 13 May 2012 (UTC)Reply
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)Reply

Language flags[edit]

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)Reply

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 "container" 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)Reply
Pity. Thanks anyway. — Ungoliant (Falai) 22:54, 22 October 2012 (UTC)Reply