User talk:Yair rand

Return to "Yair rand" page.

This talk page uses the LiquidThreads discussion system.

Namespace listing on search page

Hi, is there any chance you could have look at [[WT:GP#Namespaces listing on search page]], please? Your expertise is needed.​—msh210 (talk) 18:50, 15 January 2012 (UTC)

Start a new discussion


Thread titleRepliesLast modified
Russian with User:Yair rand/newentrywiz.js000:51, 16 April 2014
Template:etymtree022:16, 14 April 2014
MediaWiki:Gadget-FastRevert.js205:45, 31 October 2013
Diff radio buttons on history pages017:36, 28 October 2013
My gadgets.722:49, 8 October 2013
WT:BP#Search results page119:47, 15 September 2013
Collapsible tables in etyltree?212:02, 12 August 2013
Definition editing gadget409:25, 22 July 2013
TabbedLanguages.js413:09, 18 July 2013
show the links to senseids421:48, 7 July 2013
Module:etymtree needs some fixes421:29, 7 July 2013
Oops307:08, 4 July 2013
New appendix010:59, 5 June 2013
New entry wizards209:24, 3 June 2013
Problem with the translation editor421:32, 2 June 2013
Tabbed languages problem020:39, 11 May 2013
Software development016:37, 2 May 2013
checksitelinks418:59, 11 March 2013
Comment gadget1317:22, 7 March 2013
Template:Avst122:11, 21 January 2013
First page
First page
Previous page
Previous page
Last page
Last page

Russian with User:Yair rand/newentrywiz.js


Can this be added? Could you help me please?

   noun:ru-noun (genders: m-an, m-in, f-an, f-in, n-an, n-in, m-an-p, m-in-p, , f-an-p, f-in-p, n-an-p, n-in-p, p;
   adjective: ru-adj
   verb: ru-verb
   verb: ru-adv
Anatoli (обсудить/вклад)00:51, 16 April 2014


User:Clyde is developing a template for Uralic that seems to fulfill the same purpose as this. As they're new to Wiktionary, could you show them how to use Template:etymtree instead?

It might also be good to add more documentation on how to create new trees. Currently it only tells you how to use information from an existing tree.

CodeCat22:16, 14 April 2014


How does changing ".innerHTML = .innerHTML + ..." to ".innerHTML += ..." fix anything? For all I know, JavaScript treats these two as equivalent (and if it does not, this language is even more fucked up than I thought): the DOM is still being thrashed, and event handlers forgotten (which is why the radio buttons do not disappear and reappear properly after that script fires). You should probably avoid innerHTML entirely, and just use document.createElement/.createTextNode and appendChild. (Though there is also insertAdjacentHTML, but I am not sure how widely it is supported.)

Also, I have read somewhere that addOnloadHook is deprecated, but I am not sure what the replacement should be.

Keφr20:31, 30 October 2013

You're completely right on all points. I've changed the script to use the normal DOM methods instead of modifying innerHTML.

The replacement for addOnloadHook is $(document).ready.

Yair rand (talk)22:33, 30 October 2013

Why not use it, then? We never know what is going to bite us next.

Keφr05:45, 31 October 2013

Diff radio buttons on history pages

Hello Yair, your input is needed at WT:GP#Diff radio buttons on history pages. Any help would be appreciated!

WikiTiki8917:36, 28 October 2013

My gadgets.

Thanks for asking. I have deleted the custom JS and CSS that I had in the vain hope that it would help.

I have the following gadgets selected:

  1. *** Navigation popups
  2. ** ToC right
  3. Box for blocked users
  4. Sidebar wikis to English
  5. Disable targeted translations
  6. Regular expressions
  7. * Accelerated creation of inflected forms
  8. Disable rhymes editor
  9. ** Patrolling enhancements

The *s indicate items that I value highly.

The regex gadget has never worked for me.

Other problems I have include the non-display of the controls that allow display of quotations, translations, rel-top items.

I should also check my per-browser items.

DCDuring TALK22:47, 7 October 2013

On per-browser preferences (not relevant for library problem) I have selected:

  1. X Special character input for search
  2. X Links to previous and next entries
  3. Language to ISO converter
  4. Archive links to BP
  5. Orange translation links
  6. Orange language section links
  7. others

Another non-functioning thing is the set of special characters appearing under the edit box. Several character sets appear, but I have to copy and paste rather than just click as formerly.

The hypothesis I've heard is that all of this is do to a "race condition", but that can't be right as some of my best friends are non-Caucasian ;-|}.

DCDuring TALK23:04, 7 October 2013
Edited by author.
Last edit: 19:37, 8 October 2013

Please ask me whatever questions would help in diagnosis. My problems in principal namespace are quite intermittent. I can hope that fixing the persistent problem will fix or improve the harder-to-diagnose intermittent problems.

Persistent problems are:

  1. The non-display of the {{rel-top}} "show" control on User:DCDuring.
  2. The failure of the special character functionality under my edit window.
  3. The non-appearance of the regex option.
  4. The non-appearance of the special character option under the search box.
DCDuring TALK23:40, 7 October 2013

Okay, two bugs fixed:

  • The "Show a special character input (like the one beneath the edit field) for the search field" pref hadn't been switched to use protocol-relative urls, so the recent-ish switch to https:// broke it.
  • The sidebar wikis to English gadget wasn't working well with some of the slight changes in monobook that happened a while ago. This is probably what was breaking the main JS.

Some of the gadgets are in serious need of cleanup...

How many of the problems you listed are still occurring?

Yair rand (talk)16:35, 8 October 2013

The most annoying persistent problems were on my user page. I think they are fixed. I guessed that nested {{rel-top}} was a possible problem and that few others have used it on a large page so such a problem might be peculiar to me. I eliminated that and eliminated some other things and the problem went away. I will trying adding back the other things to see whether they might have been the cause.

[I just realized that it may have been your changes not mine that fixed my user page.]

The special characters below both the edit and search windows and the regex are back.

Thanks for giving this your attention and for actually succeeding in fixing it (at least apparently !!!).

I will let you know if I come across any of the other problems or if anything recurs.

I guess rarely selected and used options are somewhat likely to become problems as things change.

DCDuring TALK19:36, 8 October 2013

Everything important seems fine. But I don't think that the next-/previous-entry link thing ever worked for me. What is supposed to appear where on the screen?

DCDuring TALK21:22, 8 October 2013

WT:BP#Search results page

Some users have suggested minor improvements to FindTrans.js here which you might want to look at. Thanks

Μετάknowledgediscuss/deeds18:47, 15 September 2013

Thanks for pointing this out.

Yair rand (talk)19:47, 15 September 2013

Collapsible tables in etyltree?

Instead of showing all the descendants in one big tree, would it be possible to hide descendants of each branch like we do now, but show a button (like for quotations) that lets the user view the descendants of that branch? Perhaps it should only be hidden once the number passes a certain limit, like say 4.

CodeCat12:41, 11 August 2013

Certainly possible, but why would that be useful?

Yair rand (talk)06:29, 12 August 2013

It would make the list a bit shorter and easier to oversee. Someone who is interested in Latin won't need to scroll past Germanic first.

CodeCat12:02, 12 August 2013

Definition editing gadget

AFAICT, the definition-editing gadget has not had problems, but I don't use it so I don't know for sure. Has it had problems? How many users have been using it? Has it been thoroughly tested?

I ask all this because if it has been tested AND you think it would be desirable as a default for all or all registered users (Is that even possible?), I would support a test to see whether it would encourage enough additional good contributions to offset whatever increase in bad contributions it might also bring. I'd be willing to do patrolling for the test period.

DCDuring TALK14:34, 18 July 2013

The tool was tested quite a lot, although most of that was a long enough time ago that it's possible that new problems may have popped up as a result of the many changes to Mediawiki since then.

There was a vote on enabling the tool for all users a while back (Wiktionary:Votes/2012-10/Enabling Definition Editing Options), which failed to pass. Enabling it by default for all users or specifically all registered users is indeed possible, but I think that excluding IPs misses most of the point.

Conducting a test sounds like an interesting idea, but it might be hard to gather enough data to determine whether/how much the tool encourages additional good contributions. Using the Tag filter/edit filter to tag edits done with the tool (so that the recent changes can be filtered to show specifically those changes and such), might be helpful. I'm not sure if that's possible/feasible, though.

Yair rand (talk)16:19, 18 July 2013

I actually think that the key part of the test is whether bad contributions are encouraged. More total edits and a "small" increase in vandalism/bad edits would show success without requiring careful measurement.

DCDuring TALK18:58, 18 July 2013

Yes, I agree. A test sounds like a good idea. Want to bring it up in the BP?

Yair rand (talk)07:56, 22 July 2013

That's what I had in mind

DCDuring TALK09:25, 22 July 2013



I tried to do what you said on eo:Vikivortaro:Diskutejo#TabbedLanguages.js, that is to say add javascript:(function(){importScript("Uzanto:Yair rand/TabbedLanguages.js")}) into the URL. But the result is a page with the title Fuŝa titolo ("invalid title" in Esperanto). Maybe I didn't add this text like I should in the URL:

Thank you by advance

Automatik (talk)18:56, 17 July 2013

Sorry, I didn't explain it clearly enough. You're supposed to replace the url with the javascript:(function(){importScript("Uzanto:Yair rand/TabbedLanguages.js")})(), not add it to the end.

Yair rand (talk)01:31, 18 July 2013

I tried, but it does nothing.

Automatik (talk)09:56, 18 July 2013

Ah, sorry, there was a bug in the script. It should work now.

(By the way, is putting the page title in the L2 headers next to the language name standard over there now? If so, that's likely to cause some issues with the script...)

Yair rand (talk)11:57, 18 July 2013

I tried again, by removing the title of the page next to {{Lingvo}}, then emptying the cache of the browser and by adding "&action=purge" to the path index.php to be sure, but I do not see any results then. Maybe I didn't do what I should.

Automatik (talk)13:09, 18 July 2013

show the links to senseids

Hi Yair_rand, sorry to bring this up again, I am hoping you are not annoyed. I recently tried to link to the second definition of context#English-text_in_which_a_word_appears and added a gloss for it. The only way to get the correct link: is however only by looking at the HTML source currently (e.g. via FireBug) and copying the id attribute to the URL in the browser location bar. Recently I saw on GitHub, that they provide #-fragments for titles when you hover on them: It seems to be basic HTML and CSS:

<span class="octicon octicon-link"></span>
.markdown-body h2:hover a.anchor .octicon-link

You would know better, if any JS was involved. Would it be difficult to make something like this for Wiktionary sense definitions?

SebastianHellmann (talk)22:25, 30 May 2013

Definitely not annoyed. :)

It would be very simple to make something like this for Wiktionary sense definitions (either using JS or plain HTML+CSS), but I suspect that it wouldn't be a good idea. Github is a coding site, so all of its users can be expected to be reasonably technically competent, whereas there's a good chance that most Wiktionary users wouldn't understand at all what the link was doing, or even know what the hash changing meant (and probably wouldn't have any real use for it even if they did :/ ). For the average user, an extra icon appearing when the user hovers over a definition would probably just add confusion.

For users who do understand enough to know what the hash in the URL means, I would think (or at least hope) that many/most would realize fairly quickly (assuming that links to definitions are somewhat widespread) that the definition's link always matches the gloss, which can typically be found at least once on the page (in a translation table head or similar). Wiki editors would probably also know to look at the page source. This is not an ideal situation, but having another icon popping in and out of an already somewhat complex interface is probably not an overall benefit.

Yair rand (talk)13:36, 2 June 2013

Hm, maybe make it optional. I guess many users install their preferred gadgets anyhow. So we could offer it and then wait for adoption. I could promote it a little bit over Wiktionary2RDF ( Maybe make a screen cast. I guess, having these stable glosses would be a highly wanted feature in the NLP world. For example wordnet definitions have ids that change between each version and the changelog mapping has to be maintained manually.

SebastianHellmann (talk)18:22, 2 June 2013

Make the link icons optional? That could work, I guess. Full JS code would be $(".senseid").each(function(){var a;$(this).hover(function(){$(a).toggle();if(!a){a=document.createElement("a");a.href="#";$(a).text("#").css({position:'absolute',zIndex:5,marginLeft:'-5px'});$(this).prepend(a);}})}) (possibly buggy), and I guess it could be added to either WT:PREFS or as gadget, or both.

Regular adoption of {{senseid}} is still essentially blocked by the fact that the regular linking templates don't support any way to link to the senses. With the deployment of Lua, I had hoped that {{l}} would have support added (as I proposed here), but things seem to be happening disappointingly slowly...

Yair rand (talk)21:57, 2 June 2013

Update: {{l}} now supports linking to senseids. Example: {{l|en|peach|id=fruit}} > peach .

Yair rand (talk)21:48, 7 July 2013

Module:etymtree needs some fixes

Because {{lr}} was abandoned, some things have changed. The page *wódr̥ is now giving a script error. Can you look into it?

CodeCat23:43, 5 July 2013

Hm, lr's deprecation caused a bunch of problems. Now fixed, sort of. The uses of {{recons}} aren't displaying properly italicized in wota's use of findetym, but I think that's an issue in recons and not in findetym.

Yair rand (talk)21:06, 7 July 2013

The etymology at wota is all weird as well. It's displaying all kinds of terms that it shouldn't.

CodeCat21:12, 7 July 2013

Thanks for pointing that out. Now fixed.

Yair rand (talk)21:24, 7 July 2013

Thank you. And yes it appears that {{recons}} isn't italicising some terms. I'll see if I can fix it.

CodeCat21:29, 7 July 2013


Sorry, please revert it to the old version, I forgot something.

Z06:45, 4 July 2013


Yair rand (talk)07:01, 4 July 2013

Ok done, just update Module:links with this and the module is ready to use.

Z07:03, 4 July 2013


Yair rand (talk)07:08, 4 July 2013

New appendix

As a participant in an associated discussion, you are invited to contribute to the list of terms and criteria at Appendix:Terms considered difficult or impossible to translate into English.


  — C M B J  10:58, 5 June 2013

New entry wizards

User:Yair rand/transnewentry.js isn't currently working, and neither is the main new entry wizard. Using IE9 currently. Cleared my cache a few times, but no success.

heyzeuss07:39, 3 June 2013

User:Yair rand/transnewentry.js should be fixed now. I don't know what's wrong the the new entry wizard, it's working for me.

Yair rand (talk)08:13, 3 June 2013

Thank you for the quick fix. As for the new entry creator, maybe I'll try rebooting the internets. :)

heyzeuss09:24, 3 June 2013

Problem with the translation editor

I tried to make some changes so that it would use the modules instead of the language templates, but something seems to have gone wrong because -sche gave me these two diffs: diff, diff. I've reverted my changes but I'm not sure why they don't work. There were also some problems with User:Hippietrail adding trreq and having them come out with language names, even though I changed it to use the codes instead. There is some discussion on their talk page. Could you have a look and fix it if possible?

CodeCat21:10, 29 May 2013

The problem is caused by the new format containing an additional colon: one right after "subst" and another right after "#invoke", instead of just one for subst. In the old format, the second colon was always right after the language name ("{{subst:fr}}:"), which is what the script used for delineating where the new translation actually starts, and what has to be added even if a line for that language already exists. One solution that comes to mind is replacing the var wt = wikitext.replace('subst:',''); lines with var wt = wikitext.replace('subst:#invoke:','');, but I don't know what other effects that might have.

Yair rand (talk)03:40, 30 May 2013

Can you try it?

CodeCat12:09, 30 May 2013

Done. The types of edits that were causing problems last time seem to be working fine now, but there still might be problems in other areas.

Yair rand (talk)21:31, 2 June 2013

Ok, thank you.

CodeCat21:32, 2 June 2013

Tabbed languages problem

Hi, could you have a look at this? It is kind of urgent. Wiktionary:Grease pit/2013/April#Pages appearing empty

CodeCat20:39, 11 May 2013

Software development

FYI, better late than never: «We are working on a few more features for our next release, such as alternative displays of talk page messages [...] thank all the community members who have guided our development» (blog).

Nemo16:37, 2 May 2013



Is it possible to change the comment for frwiki in the gadget checksitelinks from "[[WP:WDATA|Wikidata]]" to "[[WP:WD|Wikidata]]" ? It's an alias more simple like you can see it here. Thanks by advance.

Automatik (talk)16:23, 11 March 2013

If it's possible too, "interlangues" is more precise that "interwikis". Thanks

Automatik (talk)16:33, 11 March 2013

So, the button should say "Supprimer les liens interlangues" and the summary should say "Suppression des liens interlangues migrés sur [[WP:WD|Wikidata]]"?

Yair rand (talk)18:06, 11 March 2013


Automatik (talk)18:47, 11 March 2013


Yair rand (talk)18:59, 11 March 2013

Comment gadget

I think you created the current version of TargetedTranslations.js.

I was wishing for another, similar script, that would add a comment to a talk page, as we are still waiting for LiquidThreads to become universally useful. The background is that editing a whole section of a talk page is difficult on a smart phone browser, while the TargetedTranslations, as used on Wiktionary, works perfectly on a small screen.

What I want is a link that opens a small editing window, receives text, and then adds the appropriate number of colons to the beginning of each line, adds --~~~~ at the end, and appends the result to the end of the current section on a talk page or village pump. It would look similar to LiquidThreads, but could be used on any talk page. Do you know if anything such exists, or could you write it?

LA2 (talk)10:04, 22 February 2013

Do you mean to have the comment added only to the end of the section (either before the next section header or the end of the page)? Having a script add a comment in the middle of a section, as a reply to a specific comment, would be extremely difficult, but a script that only adds to the end of a section would be fairly simple.

Yair rand (talk)17:29, 24 February 2013

Append at the end would be just fine.

LA2 (talk)19:21, 24 February 2013

Okay, here's my attempt: User:Yair rand/addcomment.js. It's still very buggy in a number of ways: The Preview button doesn't always work quite right (sometimes not giving an accurate preview), there is no "Cancel" button for add comment, it doesn't handle edit conflicts, and the "comment" button is at the top of a section instead of the bottom, among other issues.

Yair rand (talk)21:57, 26 February 2013

Excellent! I got it to work at the Beer Parlour. I also tried to cross-import it to sv.wikipedia (sv:w:User:LA2/common.js) but that didn't work.

LA2 (talk)23:24, 3 March 2013

That's because it relies on the newNode function in Mediawiki:Common.js.

Yair rand (talk)23:55, 3 March 2013

I found a bug: the script directly uses "/w/api.php", and that doesn't work in wikis where the script path isn't "w". Please change it to use wgScriptPath. Btw, I assume wgEnableWriteAPI is also needed, so that could be an "early exit" test.

Waldir (talk)09:08, 4 March 2013


Yair rand (talk)21:19, 4 March 2013


Hi, would you please add "xml:lang", as well? Also, please set "ae" as the default value for "lang".

Z16:21, 21 January 2013

xml:lang is automatically filled in by Mediawiki, so it's not necessary to add it to the wikitext. I've set "ae" as the default lang.

Yair rand (talk)22:11, 21 January 2013
First page
First page
Previous page
Previous page
Last page
Last page
Last modified on 15 January 2012, at 18:50