MediaWiki talk:RefToolbarConfig.js

Latest comment: 3 years ago by Trappist the monk in topic normalize parameter names

Coauthors edit

Please do not remove the coauthors field until the auto-filling function is updated to support multiple authors. Otherwise this will completely break auto-filling from a DOI/ISBN for works that have multiple authors. Mr.Z-man 18:01, 9 February 2014 (UTC)Reply

Protected edit request on 8 April 2014 edit

Hello!

Since "$j" is deprecated, could someone replace this by "$"? Helder.wiki 00:31, 8 April 2014 (UTC)Reply

@Helder.wiki: Will this change how the script works in any way? Callanecc (talkcontribslogs) 08:13, 9 April 2014 (UTC)Reply
@Callanecc: Not really. The global variable $j is defined as $ but will be removed soon. Helder.wiki 09:31, 9 April 2014 (UTC)Reply
@Helder.wiki: So if I change "$j" to "$" it won't break anything? Callanecc (talkcontribslogs) 09:58, 9 April 2014 (UTC)Reply
@Callanecc: Yep. We did a similar change in other parts of the script a few days ago: MediaWiki talk:RefToolbarNoDialogs.js#Use of "$j" is deprecated. Use $ or jQuery instead and MediaWiki talk:Gadget-refToolbarBase.js#Use of "$j" is deprecated. Use $ or jQuery instead. But I forgot about this RefToolbarConfig.js. Helder.wiki 10:25, 9 April 2014 (UTC)Reply
  Done thank you. Callanecc (talkcontribslogs) 11:00, 9 April 2014 (UTC)Reply

Urlstatus edit

This was requested on Wikipedia:Village pump (technical)/Archive_175#RefToolbar, without any objections. Add the following in a newline after line 64. It should be added along with MediaWiki talk:RefToolbarMessages-en.js#Urlstatus. The change will add an edit field for the url-status parameter for the cite web template. (url-status is the new parameter for dead links)

{"field": "url-status", "tooltip":"cite-urlstatus-tooltip"} --Snaevar (talk) 21:55, 9 October 2019 (UTC)Reply

@Snaevar: Done (though technically, you're missing a comma that needs to be added in your edit request). The tooltip could probably stand to be expanded upon though; it's not super descriptive as is. Writ Keeper  14:34, 10 October 2019 (UTC)Reply

normalize parameter names edit

cs1|2 is (slowly) moving to deprecate and remove all-run-together multiword parameter names with hyphenated parameter names. WP:RefToolbar should not create cs1 templates that include parameters that will be deprecated and their support withdrawn. Switching to the hyphenated forms now will ease the cleanup requirements later. To that end, I propose that RefToolbarConfig.js shall be changed by replacing the code at certain line numbers with the code as listed in the table.

proposed changes
line # new code
49 {"field": "access-date"},
54 {"field": "author<N>-link", "tooltip":"cite-authorlink-tooltip", 'increment_group':'authorlink', 'increment_button':true},
55 {"field": "archive-url"},
56 {"field": "archive-date"},
74 {"field": "access-date"},
84 {"field": "author<N>-link", "tooltip":"cite-authorlink-tooltip", 'increment_group':'authorlink', 'increment_button':true},
85 {"field": "archive-url"},
86 {"field": "archive-date"},
109 {"field": "access-date"},
115 {"field": "author<N>-link", "tooltip":"cite-authorlink-tooltip", 'increment_group':'authorlink', 'increment_button':true},
119 {"field": "archive-url"},
120 {"field": "archive-date"},
141 {"field": "access-date"},
146 {"field": "author<N>-link", "tooltip":"cite-authorlink-tooltip", 'increment_group':'authorlink', 'increment_button':true},

Trappist the monk (talk) 14:11, 25 October 2020 (UTC)Reply

  • LGTM from a technical standpoint. Changes appear to be consistent with the 2014 RFC. – SD0001 (talk) 14:21, 16 November 2020 (UTC)Reply
  Done — Martin (MSGJ · talk) 19:15, 22 November 2020 (UTC)Reply
MSGJ and SD0001, there are still some issues here, even after we've gotten the access date autofill button back. The archive URL label is currently displaying as "Archive-url", and a bunch of others are similar. Regardless of how we label them behind the scenes, the actual display should be grammatical, so capitalizing "URL", no dash, etc. I think we may need to make some edits to MediaWiki:RefToolbarMessages-en.js to get the proper configurations back? {{u|Sdkb}}talk 21:58, 24 November 2020 (UTC)Reply
@Trappist the monk: — Martin (MSGJ · talk) 22:28, 24 November 2020 (UTC)Reply
Oops, sorry I forgot to ping you, Trappist! {{u|Sdkb}}talk 23:13, 24 November 2020 (UTC)Reply
I have only sufficient js skills to have figured out how to prevent this tool from emitting cs1|2 citation templates that use to-be-deprecated parameters. But, if I had to guess, I would guess at these changes:
guesses
line # new code
67 'cite-access-date-label' : 'Access date',
69 'cite-author-link-label' : "Author's article",
70 'cite-url-status-label' : 'URL status',
71 'cite-archive-url-label' : 'Archive URL',
72 'cite-archive-date-label' : 'Archive date',
|coauthors= is not a supported cs1|2 parameter
It may be that lines 87–90 and 93–95 can be deleted because, apparently, the label does not change for each successive click of the add-another button.
caveat lector
Trappist the monk (talk) 23:21, 24 November 2020 (UTC)Reply
Trappist the monk and MSGJ, this appears to have fallen off the table, which is not good. Can we make sure it gets implemented? {{u|Sdkb}}talk 06:33, 3 December 2020 (UTC)Reply
I have given all the help that I know how to give. I am not an IA so cannot do the change.
Trappist the monk (talk) 14:02, 3 December 2020 (UTC)Reply
  Done I have implemented the "guesses". Please reopen with a specific request if something else needs to be done. Izno (talk) 20:17, 15 December 2020 (UTC)Reply
Looks to me like it's working now. Thanks, Izno! {{u|Sdkb}}talk 23:13, 15 December 2020 (UTC)Reply

Re-opening as |authorlink= and its enumerated versions are still being generated, rather than the desired |author-link=. --NSH001 (talk) 07:24, 14 March 2021 (UTC)Reply

Are you sure? If I create a {{cite book}} from isbn 978-0-679-60168-5 and add Jane Austen as author's article I get:
<ref>{{cite book |last1=Austen |first1=Jane |author1-link=Jane Austen |title=Pride and prejudice |date=1995 |publisher=Modern Library |location=New York |isbn=978-0-679-60168-5}}</ref>
Trappist the monk (talk) 12:45, 14 March 2021 (UTC)Reply
Yes, I'm sure. I haven't tried letting it generate the details from an ISBN, but if you just type in all the details manually, it generates "authorlink", or its enumerated variants if you type in more than one author. That's why the "authorlink" count is going up, while the other three biggies are going down. --NSH001 (talk) 16:50, 14 March 2021 (UTC)Reply
Where the tool gets the data to fill in the form should not matter. But, to try it, I just hand entered:
Last name: Austen
First name: Jane
Title: Pride and Prejudice
Author's article: Jane Austen
and from that I get:
<ref>{{cite book |last1=Austen |first1=Jane |author1-link=Jane Austen |title=Pride and Prejudice}}</ref>
This is the correct and expected output.
Trappist the monk (talk) 17:13, 14 March 2021 (UTC)Reply
Here's what I get when I enter those exact same details (I hate the horizontal format)
<ref>{{cite book |last=Austen |first=Jane |authorlink=Jane Austen |title=Pride and Prejudice}}</ref>
BTW, I don't see any field labeled "Author's article", instead I see "Authorlink:" I suspect the difference may be because we are using different versions of the wiki editor. I believe I'm using some old version (can't be sure, as I use an external editor for most of my editing). --NSH001 (talk) 17:34, 14 March 2021 (UTC)Reply
Hmm, tried typing in ISBN. Doesn't generate anything other than what I've already typed manually. But whatever it is that I'm using, it's almost certainly responsible for the count going up. --NSH001 (talk) 17:46, 14 March 2021 (UTC)Reply
Found it! This is the culprit: Wikipedia:RefToolbar/1.0. --NSH001 (talk) 18:11, 14 March 2021 (UTC)Reply
Hmm, I can see why no-one wants to maintain MediaWiki:RefToolbarLegacy.js. I stuck with the old toolbar because I like some of its buttons, and I never use the cite-generating tools. But (and I'm speculating here) I suspect the best solution will be to withdraw the old toolbar completely (after giving plenty of notice), as its small benefit isn't worth the trouble of maintaining obsolete code? --NSH001 (talk) 18:59, 14 March 2021 (UTC)Reply
It looks like we may need an interface editor to modify this script to update many parameters at MediaWiki:RefToolbarLegacy.js, including accessdate, trans_title, and more. In order for such an editor to respond effectively, we need to identify which lines of the script need to be changed, as Trappist did above for this page. I have marked this edit request as answered, since it has technically been done. A new edit request, with proposed edits, should be opened at the other script's talk page. – Jonesey95 (talk) 01:02, 15 March 2021 (UTC)Reply
Thanks, that would be good if someone's willing and able to do it. But I won't be too surprised or upset if they say, "Yuk, not worth the effort", in which case the best course is probably to withdraw the old toolbar. --NSH001 (talk) 05:29, 15 March 2021 (UTC)Reply
MediaWiki talk:RefToolbarLegacy.js § normalize parameter names
Trappist the monk (talk) 13:56, 16 March 2021 (UTC)Reply
Done.
Trappist the monk (talk) 14:55, 5 April 2021 (UTC)Reply

Interface-protected edit request on 16 November 2020 edit

Continuing from MediaWiki_talk:RefToolbarMessages-en.js#Interface-protected_edit_request_on_24_October_2020, please add the new tooltips to complete the implementation, as demonstrated here. {{u|Sdkb}}talk 19:02, 16 November 2020 (UTC)Reply

  Done — Martin (MSGJ · talk) 19:18, 22 November 2020 (UTC)Reply