User talk:Matěj Suchánek/markasduplicate.js

From Wikidata
Jump to navigation Jump to search
How to install

To install this script:

  1. If it does not yet exist, create a subpage common.js to your user page: Special:MyPage/common.js
  2. Add the following code to the page: mw.loader.load( '//www.wikidata.org/w/index.php?title=User:Matěj_Suchánek/markasduplicate.js&action=raw&ctype=text/javascript' );
  3. Save the page and refresh the browser cache

Checklist[edit]

  • ✓ Done Do not interfere with Move.js where the code was stolen from.
  • ✓ Done Feedback (steal another code...).
  • ✓ Done Check if the article is already marked to merge.
  • ✓ Done (Don't) Watch pages.
  • ✓ Done Announce.
  • ✓ Done Track usage.
  • ✓ Done #No item for a page (ie. run from clients)
  • ✓ Done Support more wikis.
  • Don't query Wikidata on each view of an article.

No P31 value[edit]

Can't absolutely surely confirm, but you may check, if the script works, when item doesn't have a P31 value at all. I have problem in one case, but maybe that wasn't related. --Edgars2007 (talk) 06:44, 30 May 2017 (UTC)[reply]

Good catch, thanks! Actually, there was a problem when the item had no claims at all. Matěj Suchánek (talk) 07:40, 30 May 2017 (UTC)[reply]

No item for a page[edit]

This script could be improved by making it work on client-wiki side (or via duplicity), when newly created duplicated pages does not have yet WD items and we don't want to create duplicate item, instead just marking the duplicate page. I've just marked manually a duplicate page in wiki, and this process isn't always simple, as not all wikis want to keep English aliases for their templates... XXN, 17:28, 11 June 2017 (UTC)[reply]

@XXN: Yesterday, I was working to make this possible. You can move it to your global.js and enjoy. Matěj Suchánek (talk) 07:46, 13 August 2017 (UTC)[reply]
Thanks, Matěj. Good job. Seems that works fine, though I didn't worked much enough with it yet for testing the new feature. On sv.wiki there was a decent number of use cases at that time, but after the major wave of mass-created items for any and ~all pages which took place in last months I can't find anymore easily a series of duplicated (taxon) articles:( XXN, 16:48, 13 August 2017 (UTC)[reply]

Redirect marked for merging[edit]

Looks like I marked a redirect for merging [1].
--- Jura 17:13, 28 June 2017 (UTC)[reply]

✓ Done Pairs with at least one redirect should be skipped now. Matěj Suchánek (talk) 18:57, 28 June 2017 (UTC)[reply]

Greek translator[edit]

case 'el':
			mw.messages.set( {
				'mark-as-duplicate': 'Σημειώστε ως διπλότυπο',
				'mark-as-duplicate-intro': 'Μπορείτε να επισημάνετε αυτό το αντικείμενο ως διπλότυπο ενός άλλου και να ζητήσετε τη συγχώνευση άρθρων σε αντικρουόμενα wiki.',
				'close': 'Κλείσιμο',
				'targetitem': 'Το αναγνωριστικό (id) του δεύτερου αντικειμένου:',
				'targetpage': 'Ο τίτλος του δεύτερου αντικειμένου:',
				'no-conflicts': 'Δεν βρέθηκαν συγκρούσεις.',
				'watch-pages': 'Παρακολουθήστε τις σελίδες που ζητήθηκε να συγχωνευθούν',
				'mark-item-as-duplicate': 'Σημειώστε το αντικείμενο Wikidata σαν διπλότυπο (αν είναι συνδεδεμένο)',
				'success-marked': 'Το αντικείμενο έχει σημειωθεί σαν διπλότυπο.',
				'success-wikis': 'Η συγχώνευση ζητήθηκε σε $1.',
				'success-skipped': '$1 παραλείφθηκε.',
				'error-sameid': 'Το δεύτερο αντικείμενο/αναγνωριστικό (id) πρέπει να είναι διαφορετικό από το υφιστάμενο.',
				'error-invalidid': 'Το δοσμένο αναγνωριστικό (id) δεν είναι έγκυρο αναγνωριστικό στοιχείου.',
				'error-notexisting': 'Το αντικείμενο με αναγνωριστικό (id) $1 δεν υπάρχει.',
				'error-api': 'Παρουσιάστηκε σφάλμα κατά την επεξεργασία του αντικειμένου: $1'
			} );
✓ Done Matěj Suchánek (talk) 14:48, 11 April 2018 (UTC)[reply]

Are Wikipedias using these marked duplicates?[edit]

Hi, I have just requested a merge on frwiki that you had previously marked - I am wondering if wikis get notified of these duplicates in some way (other than manually requesting the merge)? What is the normal workflow? If you explain me how maybe I can nudge frwiki so that they become more aware of this system. (The items I encountered are Nicolas Bohier (Q22248969) and Nicolas Bohier (Q3340903).)

Pintoch (talk) 18:01, 25 June 2018 (UTC)[reply]

Yes, they are (if they have a link to Template:Merge (Q6919004)). But some wikis may require additional actions, such as creating a dedicated page to discuss the merge, so they are skipped (look for needsSpecialCare in the code). Matěj Suchánek (talk) 18:21, 25 June 2018 (UTC)[reply]
Nice, thanks! − Pintoch (talk) 08:30, 26 June 2018 (UTC)[reply]
  • In general, they do. Maybe eswiki less so.
Some wikis tend to generate more dups than others. --- Jura 08:57, 27 November 2018 (UTC)[reply]

Please add frwiki[edit]

  • I think it would be nice if frwiki worked too. I think it's still better to mark them than not mark them at all. Maybe the user could be prompted to confirm that they go and create an entry in the summary page. --- Jura 08:37, 27 November 2018 (UTC)[reply]
  • Format for frwiki is:
{{merge|$1|$2}}
{{à fusionner |$1|$2}}
Order for $1 and $2 should be the same on both articles. --- Jura 08:57, 27 November 2018 (UTC)[reply]
It should work, finally. --Matěj Suchánek (talk) 13:10, 12 August 2019 (UTC)[reply]

Please don't ping bots[edit]

Hi Matěj Suchánek. Please exclude bots from the ping list when starting merge proposals on article talk pages. Examples: en:w:Special:Diff/940567089, en:w:Special:Diff/940567841 (I am not watching this page, so please ping me if you want my attention.) — JJMC89(T·C) 02:46, 14 February 2020 (UTC)[reply]

OK. Better not do that. I had tried to filter them out by ignoring minor edits but seems bots can do non-minors, too. --Matěj Suchánek (talk) 09:39, 14 February 2020 (UTC)[reply]

Just noticed the pings. It really speeds up the merge process, e.g. at w:Talk:Alfredo_Pereira_de_Melo#Merger_proposal (enwiki was already fairly quick before). --- Jura 13:44, 4 November 2021 (UTC)[reply]

It even is recommended, see w:Wikipedia:Merging#Notify involved users (optional). Matěj Suchánek (talk) 15:49, 7 November 2021 (UTC)[reply]
enwiki was always fairly quick to act. But I think at enwiki, I generally left a talk page message. Maybe we could ping slower wikis too?
BTW, I usually mention Wikidata:Database_reports/identical_birth_and_death_dates/1. --- Jura 19:59, 7 November 2021 (UTC)[reply]