User talk:Yair rand/checksitelinks.js
fa translation edit
please add
'fa': {
removeinterwikis: "حذف میانویکیها",
summary: "حذف پیوند میانویکی این صفحه از [[ویکیپدیا:ویکیداده|ویکیداده]]"
}
▬ Reza1615 / T 18:35, 1 March 2013 (UTC)
- Done, thank you. --Yair rand (talk) 18:33, 3 March 2013 (UTC)
Japanese translation edit
Please add
'ja': {
removeinterwikis: "言語間リンクの除去",
summary: "[[WP:WDATA|ウィキデータ]]に移行した言語間リンクを除去"
}
Thanks. --fryed-peach (talk) 07:38, 2 March 2013 (UTC)
- Done, thanks you. --Yair rand (talk) 18:33, 3 March 2013 (UTC)
Finnish translation edit
Please add
'fi': {
removeinterwikis: "Poista kielilinkit",
summary: "Poistetut kielilinkit siirretty [[WP:WDATA|Wikidataan]]"
},
Thank you! --Silvonen (talk) 15:34, 4 March 2013 (UTC)
Ilokano traslations edit
Please add
'ilo': {
removeinterwikis: "Agikkat kadagiti interwiki",
summary: "Nagikkat kadagiti silpo ti sitio a naiyalis idiay [[WP:WDATA|Wikidatos]]"
},
Thanks.--Lam-ang (talk) 21:03, 4 March 2013 (UTC)
- Done. Thank you. --Yair rand (talk) 23:15, 4 March 2013 (UTC)
French translation edit
Please add
'fr': {
removeinterwikis: "Supprimer les liens interwikis",
summary: "Suppression des liens interwikis migrés sur [[WP:WDATA|Wikidata]]"
},
Thanks a lot! Ayack (talk) 15:08, 6 March 2013 (UTC)
German translation edit
In german wikipedia, the script doesn't work. Is it because wikidata will activated only this night, or because the german translation is missing? Anyway, here is the german translation:
'de': {
removeinterwikis: "Interwiki-Links entfernen",
summary: "Nach [[WP:WD|Wikidata]] übertragene Links entfernt"
Steak (talk) 19:28, 6 March 2013 (UTC)
- Thanks. Steak (talk) 09:55, 7 March 2013 (UTC)
Please change the German (de) summary:
Verschiebe $2 [[Hilfe:Internationalisierung|Interlanguage-Links]] nach [[WP:Wikidata|Wikidata]] nach [[d:$1]]
Differences:
- Unneccessary abbreviation WD (Walt Disney?).
- Link to the help page.
- "Entfernt" (removed) changed to "verschiebe" (move). The links aren't deleted, they still exist in a different place. Using words like "remove" is confusing for users that haven't heard about Wikidata yet.
Thanks. --TMg 18:54, 11 March 2013 (UTC)
- Oppose. Too long, too complicated, and "Interlanguage-Links" is not much used in de:wp. Steak (talk) 20:37, 11 March 2013 (UTC)
- Wen stört es, wenn da ein Link mehr steht, der einem nachfolgenden Benutzer die Chance gibt, zu verstehen, was da vor sich geht? Mach bitte einen besseren Vorschlag. "Interlanguage" kann gern in "Interwiki" geändert werden, wenn das stört. Aber das "Entferne" war viel zu irreführend. Die Links werden nicht entfernt, sie sind nach der Bearbeitung immer noch da. English: Please change "Interlanguage" to "Interwiki". --TMg 00:08, 12 March 2013 (UTC)
- Sie werden aus dem Quelltext entfernt, genau das sagt die Zusammenfassung aus. Sie werden nicht mit dem Entfernungsedit nach Wikidata verschoben, weil sie sich nämlich schon vorher dort befinden, genau das sagt aber dein Vorschlag aus. Steak (talk) 09:01, 12 March 2013 (UTC)
- @Steak: Wortklauberei. Sie sind vorher schon verschoben worden, die Entfernung der Redundanz aus dem Quelltext ist nur der letzte Schritt dieser Verschiebung. "Entfernt" konnte man mindestens genauso missverstehen. Wenn wir mit "migriert" einen Kompromiss gefunden haben, ist das für mich erledigt. --TMg 14:51, 12 March 2013 (UTC)
- Steak, then make another suggestion that includes $1 and $2. --Leyo 10:49, 12 March 2013 (UTC)
- Sie werden aus dem Quelltext entfernt, genau das sagt die Zusammenfassung aus. Sie werden nicht mit dem Entfernungsedit nach Wikidata verschoben, weil sie sich nämlich schon vorher dort befinden, genau das sagt aber dein Vorschlag aus. Steak (talk) 09:01, 12 March 2013 (UTC)
- Wen stört es, wenn da ein Link mehr steht, der einem nachfolgenden Benutzer die Chance gibt, zu verstehen, was da vor sich geht? Mach bitte einen besseren Vorschlag. "Interlanguage" kann gern in "Interwiki" geändert werden, wenn das stört. Aber das "Entferne" war viel zu irreführend. Die Links werden nicht entfernt, sie sind nach der Bearbeitung immer noch da. English: Please change "Interlanguage" to "Interwiki". --TMg 00:08, 12 March 2013 (UTC)
What about
'de': {
summary: "$2 [[Hilfe:Internationalisierung|Interwiki-Links]] nach [[WP:Wikidata|Wikidata]] ([[d:$1]]) migriert"
? Steak (talk) 11:06, 12 March 2013 (UTC)
- Better. --Succu (talk) 13:51, 12 March 2013 (UTC)
- (EC) That would be fine for me.
- One thing: If $2 = 1, the grammar is incorrect. --Leyo 13:51, 12 March 2013 (UTC)
- Solution:
$2 [[Hilfe:Internationalisierung|Interwiki-Link(s)]] nach [[WP:Wikidata|Wikidata]] ([[d:$1]]) migriert
I'm fine with this line. --TMg 14:51, 12 March 2013 (UTC)
- Solution:
With PLURAL
:
de: {
summary: "{{PLURAL:$2|Ein|$2}} [[Hilfe:Internationalisierung|Interwiki-Link{{PLURAL:$2||s}}]] nach [[WP:Wikidata|Wikidata]] ([[d:$1]]) migriert."
}
>>> mw.messages.set( 'summary', "{{PLURAL:$2|Ein|$2}} [[Hilfe:Internationalisierung|Interwiki-Link{{PLURAL:$2||s}}]] ach [[WP:Wikidata|Wikidata]] ([[d:$1]]) migriert." ) true >>> mw.msg( 'summary', 'Q123', 1) "Ein [[Hilfe:Internationalisierung|Interwiki-Link]] nach [[WP:Wikidata|Wikidata]] ([[d:Q123]]) migriert." >>> mw.msg( 'summary', 'Q123', 4) "4 [[Hilfe:Internationalisierung|Interwiki-Links]] nach [[WP:Wikidata|Wikidata]] ([[d:Q123]]) migriert."
--Fomafix (talk) 07:49, 14 March 2013 (UTC)
- Thank you. I implemented it. --Leyo 13:55, 14 March 2013 (UTC)
- I restored, because these changes didn't worked. --Stryn (talk) 14:36, 14 March 2013 (UTC)
- You have to change the code and use
mw.msg
to use PLURAL. I'll make a implementation in a few days. --Fomafix (talk) 16:16, 14 March 2013 (UTC)
- You have to change the code and use
- I restored, because these changes didn't worked. --Stryn (talk) 14:36, 14 March 2013 (UTC)
Portuguese translation edit
'pt': {
removeinterwikis: "Remover interwikis",
summary: "Removidos links interlínguas migrados para [[WP:WDATA|Wikidata]]"
}
Thanks, VítoR™ • (D) 01:30, 7 March 2013 (UTC)
Portuguese translation edit
'pt-br': {
removeinterwikis: "Remover ligações para outros idiomas",
summary: "Removidas ligações para outros idiomas migradas para [[d:$1|um item]] do projeto [[WP:WDATA|Wikidata]]"
},
PS: you'll need to use wgUserLanguage instead of wgPageContentLanguage. Helder 18:15, 7 March 2013 (UTC)
Urdu Translation edit
please add
'ur': {
removeinterwikis: "حذف بین الویکی روابط",
summary: "حذف بین الویکی ربط برائے صفحہ ہذا از [[منصوبہ:ویکی ڈیٹا|ویکی ڈیٹا]]"
}
Ehm... edit
By the way, I already wrote it:User:Ricordisamoa/WikidataHelper.js. However, I think that we both can learn each other.
- WikidataHelper could be improved with new regular expressions, to remove only some of the interlinks if not all of them are present on Wikidata;
- checksitelinks could be improved using ajax and advise the user if there are some conflicts.
@ Yair rand: Please tell me your opinion, maybe just in this page. --Ricordisamoa 18:52, 7 March 2013 (UTC)
- What kind of conflicts do you mean? Do you mean when there are interwikis in the article that are not present in the Wikidata item? --Yair rand (talk) 01:58, 8 March 2013 (UTC)
- Yes, that type! checksitelinks doesn't check for them, does it? --Ricordisamoa 07:24, 8 March 2013 (UTC)
- No, it just leaves them in the article. Should it do something else? I'm pretty sure there are some cases where articles are supposed to have interwikis left there. For example, some interwikis lead to redirects or sections, neither of which Wikidata can handle... --Yair rand (talk) 19:52, 10 March 2013 (UTC)
- Neither WikidataHelper imports interwikis into Wikidata, but it alerts when some links aren't there. --Ricordisamoa 23:38, 11 March 2013 (UTC)
- No, it just leaves them in the article. Should it do something else? I'm pretty sure there are some cases where articles are supposed to have interwikis left there. For example, some interwikis lead to redirects or sections, neither of which Wikidata can handle... --Yair rand (talk) 19:52, 10 March 2013 (UTC)
- Yes, that type! checksitelinks doesn't check for them, does it? --Ricordisamoa 07:24, 8 March 2013 (UTC)
Indonesian and Minangkabau languages translation edit
Please add
'id': {
removeinterwikis: "Hapus interwiki",
summary: "Hapus interwiki, migrasi ke [[WP:WDATA|Wikidata]]"
},
'min': {
removeinterwikis: "Hapuih interwiki",
summary: "Hapuih interwiki, migrasi ka [[WP:WDATA|Wikidata]]"
},
Thanks in advance. Ę-oиė >>> ™ 16:06, 8 March 2013 (UTC)
Belarusian (Taraškievica) translation edit
'be-tarask': { removeinterwikis: "Выдаліць інтэрвікі", summary: "Выдаленыя інтэрвікі перанесеныя ў [[ВП:Вікізьвесткі|Вікізьвесткі]]" },
Thank you! Wizardist (talk) 22:34, 8 March 2013 (UTC)
Translate into es and gl edit
'es': { removeinterwikis: "Eliminar interwikis", summary: "Eliminando los interwikis movidos a [[Wikidata]]" }, 'gl': { removeinterwikis: "Eliminar interwikis", summary: "Eliminando os interwikis movidos a [[Wikidata]]" },
Please add these translations. --Vivaelcelta (talk) 20:02, 9 March 2013 (UTC)
Link to Wikidata item edit
Hi!
Could you change the script so it adds to the edit summary a link to the Wikidata item to which the sitelinks were moved? E.g.:
- Removed sitelinks migrated to [[d:Q1|an item]] from [[WP:WDATA|Wikidata]]
Helder 18:24, 10 March 2013 (UTC)
- Done. --Yair rand (talk) 19:46, 10 March 2013 (UTC)
Kurdish translation edit
'ku': {
removeinterwikis: "Girêdanên înterwîkiyê jê bibe",
summary: "Girêdanên ku derbasî [[WP:WD|Wikidata]]yê bûne jêbibe"
--Thanks--George Animal (talk) 21:05, 10 March 2013 (UTC)
- Done. --Yair rand (talk) 21:17, 10 March 2013 (UTC)
Number of interwiki links edit
Would it be feasible to include the number of wikilinks (re)moved to the edit summary? Addbot has this feature (example). --Leyo 09:32, 11 March 2013 (UTC)
- +1. Helder 13:59, 11 March 2013 (UTC)
- Done. --Yair rand (talk) 19:05, 11 March 2013 (UTC)
- Since the number is ≥ 1 I used the following wording: Removed $2 sitelink(s) ….
- The nicest solution would be to differentiate between $2 = 1 and $2 > 1. --Leyo 18:02, 12 March 2013 (UTC)
- Done. --Yair rand (talk) 19:05, 11 March 2013 (UTC)
In case someone thinks it is really necessary to have proper plural for this, there is the module "mediawiki.jqueryMsg", documented at mw:ResourceLoader/Default modules#mediawiki.jqueryMsg and mw:Manual:Messages API#Notes about gender, grammar, plural. Helder 19:25, 14 March 2013 (UTC)
Bengali translation edit
Please add
'bn': {
removeinterwikis: "আন্তঃউইকি সংযোগ অপসারণ",
summary: "সাইটলিঙ্ক সরানো হয়েছে, যা উইকিউপাত্তের [[d:$1|একটি আইটেমে]] রয়েছে"
},
Thank you! --Leemon →talk 14:43, 11 March 2013 (UTC)
{{Editprotected}}
- REMOVE THIS BN TRANSLATION
removeinterwikis: "আন্তঃউইকি সংযোগ অপসারণ",
summary: "সাইটলিঙ্ক সরানো হয়েছে, যা উইকিউপাত্তের [[d:$1|একটি আইটেমে]] রয়েছে"
+ ADD THIS BN TRANSLATION
removeinterwikis: "আন্তঃউইকি সংযোগ সরানো",
summary: "$2টি সাইটলিঙ্ক সরানো হয়েছে, যা উইকিউপাত্তের [[d:$1|আইটেমে]] স্থানান্তর করা হয়েছে"
thanks --Aftab1995 (talk) 18:42, 21 August 2013 (UTC)
- Done. --Yair rand (talk) 20:14, 21 August 2013 (UTC)
Translation update for Ilokano edit
Update Ilokano translations please
'ilo': {
removeinterwikis: "Agikkat kadagiti interwiki",
summary: "Nagikkat kadagiti $2 a silpo ti sitio a naiyalis iti [[d:$1|maysa a banag]] idiay [[WP:WDATA|Wikidata]]"
},
Thanks.--Lam-ang (talk) 21:57, 11 March 2013 (UTC)
- Done. --Yair rand (talk) 22:01, 11 March 2013 (UTC)
Finnish update edit
Please update the Finnish translation.
'fi': {
removeinterwikis: "Poista kielilinkit",
summary: "Poistettu $2 [[WP:WDATA|Wikidatan]] sivulle [[d:$1]] siirrettyä kielilinkkiä"
},
Thank you! --Silvonen (talk) 18:24, 12 March 2013 (UTC)
- Done. --Yair rand (talk) 18:26, 12 March 2013 (UTC)
Plural support would be handy edit
Hi,
it would be great if there was some plural form support for the $2
. Please keep in mind, that some languages have more forms depending on count. Thanks.
— Danny B. 21:32, 12 March 2013 (UTC)
- See #Number of interwiki links. --Leyo 22:50, 12 March 2013 (UTC)
- I did. Your request is limited to two forms only, that's why I added this one, besides it is under more descriptive header.
— Danny B. 22:56, 12 March 2013 (UTC)- Which additional groups/cases would be needed? --Leyo 23:15, 12 March 2013 (UTC)
- Slavic languages use 0 | 1 | 2..4 | >=5 (or even 0 | (>20) mod 10 = 1 | (>20) mod 10 = 2..4 | (>20) mod 10 = 5..9,0) cases (where typically 0 case == >=5 case). For more you can track
convertPlural()
function in Language classes.
— Danny B. 12:05, 13 March 2013 (UTC)
- Slavic languages use 0 | 1 | 2..4 | >=5 (or even 0 | (>20) mod 10 = 1 | (>20) mod 10 = 2..4 | (>20) mod 10 = 5..9,0) cases (where typically 0 case == >=5 case). For more you can track
- Which additional groups/cases would be needed? --Leyo 23:15, 12 March 2013 (UTC)
- I did. Your request is limited to two forms only, that's why I added this one, besides it is under more descriptive header.
Update translations for "id" & "min" edit
Please update the translations for Indonesian & Minangkabau languages
'id': {
removeinterwikis: "Hapus interwiki",
summary: "Hapus $2 interwiki, migrasi ke ''[[d:$1|item]]'' di [[WP:WDATA|Wikidata]]"
},
'min': {
removeinterwikis: "Hapuih interwiki",
summary: "Hapuih $2 interwiki, migrasi ka ''[[d:$1|item]]'' di [[WP:WDATA|Wikidata]]"
},
Thanks in advance. Ę-oиė >>> ™ 02:07, 13 March 2013 (UTC)
Btw can you fix this, Sir? edit
The "Remove interwiki" link not shown on vector coz it was blocked by edit toolbar (just for sysop). http://prntscr.com/w3tw2
Kind regards, Ę-oиė >>> ™ 03:27, 13 March 2013 (UTC)
- As far as I can tell, ordinarily when the menu goes far enough to overlap with the toolbar the menu goes on top. Are you using a gadget that modifies the edit box? --Yair rand (talk) 03:49, 13 March 2013 (UTC)
- Yup.. I use wikEd. When I disable wikEd, the menu goes on top like You said. Ę-oиė >>> ™ 16:50, 15 March 2013 (UTC)
Some users in the German Wikipedia have similar problems. The checksitelinks script does not work for some reason (don't know exactly, sorry) when the WikEd gadget is enabled. Just to let you know. Would be nice to fix this. --TMg 12:56, 21 March 2013 (UTC)
French editsum edit
Hi. Please replace
'fr': {
removeinterwikis: "Supprimer les liens interlangues",
summary: "Suppression des liens interlangues migrés sur [[WP:WD|Wikidata]]"
},
by
'fr': {
removeinterwikis: "Supprimer les liens interlangues",
summary: "Retrait de $2 liens interlangues, désormais fournis par [[WP:WD|Wikidata]] sur la page [[d:$1]]"
},
Thanks. — Hawk-Eye (talk) 11:48, 13 March 2013 (UTC)
- Isn't better? $2 might be also 1. --Leyo 14:55, 13 March 2013 (UTC)
Retrait de $2 lien(s) interlangue(s), désormais fournis par [[WP:WD|Wikidata]] sur la page [[d:$1]]
- Yes, it is, for sure. — Hawk-Eye (talk) 15:06, 13 March 2013 (UTC)
Japanese update edit
'ja': {
removeinterwikis: "言語間リンクの除去",
summary: "[[WP:WDATA|ウィキデータ]]の[[d:$1|項目]]に移行した言語間リンク $2 件を除去"
},
Please update Japanese translation, thanks. --fryed-peach (talk) 08:27, 17 March 2013 (UTC)
- Done. --Yair rand (talk) 18:53, 17 March 2013 (UTC)
Using user interface language in edit summary is not optimal edit
Hello! Congratulations for the scrript, it is very useful and I have advised many editors to use it!
However, I have received comments as the edit summaries are left in the language set by the user for the interface (in my case, it is often French) rather than the local language or English, when I edit interwiki links in other projects, which is often necessary when solving conflicts. However, this edit summary used to be in the local language in a previous version of the script, as can be seen on my contributions or this diff.
I would prefer the edit summary to be in the local language (first choice) or English (second choice). Do you think it is possible? Place Clichy (talk) 11:02, 18 March 2013 (UTC)
- It is possible, but not always desirable: it would be problematic for wikis where there is more than one variant for the content language. E.g. on Portuguese Wikipedia, the content and edit summaries can be in "pt" or "pt-br", on English Wikipedia it can be 'en', 'en-gb', on Chinese Wikipedia, there are many more variants. So I think for most wikis it should use wgPageContentLanguage, but for wikis with more than one variant, it should use wgUserLanguage in case the prefix is identical to that of wgPageContentLanguage.
- Helder 14:17, 18 March 2013 (UTC)
Korean translation edit
'ko': {
removeinterwikis: "인터위키 제거",
summary: "[[백:위키데이터|]]]]의 [[d:$1|항목]]으로 이동한 $2개의 인터위키 링크 제거"
},
Thank you. -- ChongDae (talk) 02:47, 26 March 2013 (UTC)
- Done. --Yair rand (talk) 17:54, 28 March 2013 (UTC)
Russian translation edit
'ru': {
removeinterwikis: "Удалить интервики",
summary: "Удалённые интервики-ссылки ($2) перенесены в [[d:$1|соответствующий элемент]] [[ВП:ВД|Викиданных]]"
},
Thank you. --Kaganer (talk) 10:38, 3 April 2013 (UTC)
- Done. Yair rand (talk) 20:43, 3 April 2013 (UTC)
Esperanto and Slovak translations edit
'eo': { removeinterwikis: "Forigi intervikiojn", summary: "$2 intervikioj transigitaj al [[d:$1|ero]] en [[WP:WDATA|Vikidatumoj]]" }, 'sk': { removeinterwikis: "Odstrániť interwiki", summary: "$2 interwiki prevedených do [[d:$1|položky]] na [[WP:WÚ|Wikiúdajoch]]" },
--KuboF (talk) 21:09, 25 April 2013 (UTC)
- Done. --Yair rand (talk) 21:23, 25 April 2013 (UTC)
Template documentation on sk.wiki is usually on page Template:Foo/Dokumentácia. Please, add it.
- Done. --Yair rand (talk) 21:38, 16 June 2013 (UTC)
Summary adding edit
Your script behaves badly if there is already some summary present – it just appends its own part. It should append it after a comma instead.
My proposed version is below. Please diff it against the base and replace if you like it – consider my changes public domain :) Matma Rex (talk) 19:38, 8 May 2013 (UTC)
$(function ($) {
var translate = {
'en': {
removeinterwikis: "Remove interwikis",
summary: "Removed $2 sitelink(s) migrated to [[d:$1|an item]] on [[WP:WDATA|Wikidata]]"
},
'be-tarask': {
removeinterwikis: "Выдаліць інтэрвікі",
summary: "Выдаленыя інтэрвікі перанесеныя ў [[ВП:Вікізьвесткі|Вікізьвесткі]]"
},
'bn': {
removeinterwikis: "আন্তঃউইকি সংযোগ অপসারণ",
summary: "সাইটলিঙ্ক সরানো হয়েছে, যা উইকিউপাত্তের [[d:$1|একটি আইটেমে]] রয়েছে"
},
'cs': {
removeinterwikis: "Odstranit interwiki",
summary: "$2 interwiki převedeno/a do [[d:$1|položky]] na Wikidatech"
},
'de': {
removeinterwikis: "Interwiki-Links entfernen",
summary: "$2 [[Hilfe:Internationalisierung|Interwiki-Link(s)]] nach [[WP:Wikidata|Wikidata]] ([[d:$1]]) migriert"
},
'eo': {
removeinterwikis: "Forigi intervikiojn",
summary: "$2 intervikioj transigitaj al [[d:$1|ero]] en [[VP:VD|Vikidatumoj]]"
},
'es': {
removeinterwikis: "Eliminar interwikis",
summary: "Eliminando los interwikis movidos a [[Wikidata]]"
},
'fa': {
removeinterwikis: "حذف میانویکیها",
summary: "حذف $2 پیوند میانویکی انتقالیافته به [[d:$1|این آیتم]] در [[ویکیپدیا:ویکیداده|ویکیداده]]"
},
'fi': {
removeinterwikis: "Poista kielilinkit",
summary: "Poistettu $2 [[WP:WDATA|Wikidatan]] sivulle [[d:$1]] siirrettyä kielilinkkiä"
},
'fr': {
removeinterwikis: "Supprimer les liens interlangues",
summary: "Retrait de $2 lien(s) interlangue(s), désormais fournis par [[WP:WD|Wikidata]] sur la page [[d:$1]]"
},
'gl': {
removeinterwikis: "Eliminar interwikis",
summary: "Eliminando os interwikis movidos a [[Wikidata]]"
},
'id': {
removeinterwikis: "Hapus interwiki",
summary: "Hapus $2 interwiki, migrasi ke ''[[d:$1|item]]'' di [[WP:WDATA|Wikidata]]"
},
'ilo': {
removeinterwikis: "Agikkat kadagiti interwiki",
summary: "Nagikkat kadagiti $2 a silpo ti sitio a naiyalis iti [[d:$1|maysa a banag]] idiay [[WP:WDATA|Wikidata]]"
},
'it': {
removeinterwikis: "Rimuovi interlink",
summary: "Rimossi $2 interlink trasferiti a [[d:$1|un elemento]] su [[Aiuto:Interlink#Interlink_mediante_Wikidata|Wikidata]]"
},
'ja': {
removeinterwikis: "言語間リンクの除去",
summary: "[[WP:WDATA|ウィキデータ]]の[[d:$1|項目]]に移行した言語間リンク $2 件を除去"
},
'ko': {
removeinterwikis: "인터위키 제거",
summary: "[[백:위키데이터|위키데이터]]]]의 [[d:$1|항목]]으로 이동한 $2개의 인터위키 링크 제거"
},
'ku': {
removeinterwikis: "Girêdanên înterwîkiyê jê bibe",
summary: "Girêdanên ku derbasî [[WP:WD|Wikidata]]yê bûne jêbibe"
},
'min': {
removeinterwikis: "Hapuih interwiki",
summary: "Hapuih $2 interwiki, migrasi ka ''[[d:$1|item]]'' di [[WP:WDATA|Wikidata]]"
},
'pl': {
removeinterwikis: "Usuń linki interwiki",
summary: "Przeniesiono linki interwiki ($2) do [[d:$1|elementu]] na [[Wikidane|Wikidanych]]"
},
'pt': {
removeinterwikis: "Remover interwikis",
summary: "Removidos links interlínguas migrados para [[WP:WDATA|Wikidata]]"
},
'pt-br': {
removeinterwikis: "Remover ligações para outros idiomas",
summary: "Removidas ligações para outros idiomas migradas para [[d:$1|um item]] do projeto [[WP:WDATA|Wikidata]]"
},
'ru': {
removeinterwikis: "Удалить интервики",
summary: "Удалённые интервики-ссылки ($2) перенесены в [[d:$1|соответствующий элемент]] [[ВП:ВД|Викиданных]]"
},
'sk': {
removeinterwikis: "Odstrániť interwiki",
summary: "$2 interwiki prevedených do [[d:$1|položky]] na [[WP:WÚ|Wikiúdajoch]]"
},
'ur': {
removeinterwikis: "حذف بین الویکی روابط",
summary: "حذف بین الویکی ربط برائے صفحہ ہذا از [[منصوبہ:ویکی ڈیٹا|ویکی ڈیٹا]]"
}
}
var namespace = mw.config.get('wgNamespaceNumber'),
lang = mw.config.get('wgPageContentLanguage'),
m = translate[ lang ] || translate.en,
page = namespace === 0 ? mw.config.get('wgTitle') : mw.config.get('wgFormattedNamespaces')[ namespace ] + ':' + mw.config.get('wgTitle').replace(/\/doc$/, ''),
editbox = document.getElementById( "wpTextbox1" );
function summaryAppend(text) {
if (!text) return;
var editsum = document.getElementById("wpSummary");
if (!editsum) return;
if (editsum.value == '' || editsum.value.match(/\*\/\s*$/)) {
// if the summary is empty or only consists of the autogenerated part, just append
editsum.value += text
} else {
// otherwise append after a comma
editsum.value += ', ' + text
}
}
function removeInterwikis() {
document.body.style.cursor = "wait";
$.ajax({
url: '//www.wikidata.org/w/api.php',
data: {
'format': 'json',
'action': 'wbgetentities',
'sites': mw.config.get('wgDBname'),
'titles': page,
'props': 'sitelinks',
'languages': lang
},
dataType: 'jsonp',
success: function (data) {
if (data.success) {
for (var i in data.entities) {
if ( i != -1 ) {
var item = data.entities[i] && data.entities[i].sitelinks, numberremoved = 0;
if ( item ) {
for ( var ii in item ) {
var interw = "[[" + item[ ii ].site.split("wiki")[0].replace(/_/g,"-") + ":" + item[ ii ].title + "]]";
editbox.value !== (editbox.value = editbox.value.replace( interw + "\n", "" ).replace( interw, "" )) && numberremoved++;
}
}
summaryAppend(( m.summary || '' ).replace(/\$1/g, i.toUpperCase()).replace(/\$2/g, numberremoved));
}
}
}
document.body.style.cursor = "";
}
});
}
editbox && $( mw.util.addPortletLink( 'p-cactions', '#', m.removeinterwikis ) ).on( "click", removeInterwikis);
});
Please remove asymmetric brackets in ko-summary edit
ko.summary should be "[[백:위키데이터|위키데이터]]의 [[d:$1|항목]]으로 이동한 $2개의 인터위키 링크 제거". Current version has 4 brackets after first link. Best regards. Kwj2772 (talk) 20:28, 5 June 2013 (UTC)
- Done [1]--DangSunM (talk) 20:39, 5 June 2013 (UTC)
"Translate me" option for sites without localized message edit
Hey, could we throw on a ([[d:User talk:Yair rand/checksitelinks.js|Translate me!]])
after the default (English) message for languages we don't have L10n for? I'd do it myself, but I'm fairly clueless when it comes to JavaScript. — PinkAmpers&(Je vous invite à me parler) 17:00, 12 June 2013 (UTC)
- You mean add it to the edit summary? I'm not sure that would be helpful. I imagine that a user who is using the tool in a language that doesn't have it translated yet would know where translations could go, wouldn't they? How would they have come across the tool and still not know what page it was on, if they're the first person in their language to use it? --Yair rand (talk) 21:41, 16 June 2013 (UTC)
- Well sometimes I use it for convenience on wikis where I don't speak the language. — PinkAmpers&(Je vous invite à me parler) 02:33, 28 June 2013 (UTC)
Detection of canonical namespaces edit
I was wondering if you could implement a change like this to make the script detect both the localized and the canonical namespace names when removing language links. This would be useful e.g. if a page has
[[fr:Template:...]]
instead of
[[fr:Modèle:...]]
In the JavaScript code suggested above I provided also an update for the pt and pt-br translations and made a few fixes suggested by jslint. Helder 12:21, 26 June 2013 (UTC)
- Yair rand, here is another example: on w:pt:Predefinição:Idade/doc, the script didn't remove "
[[bar:Vorlage:Alter]]
" but its item already contains a link to w:bar:Vorlog:Alter. Helder.wiki 20:22, 7 March 2014 (UTC)- Urgh. I take it "Vorlage" is a local namespace alias for Template on that wiki?
- Fixing this is not going to be simple, if it's even possible. --Yair rand (talk) 17:02, 9 March 2014 (UTC)
- Yair rand, yep, according to languages/messages/MessagesBar.php, "Vorlage" is an alias to the template namespace on any Bavarian wiki. Helder.wiki 13:33, 10 March 2014 (UTC)
New translations from Meta-Wiki edit
I launched m:User:SamoaBot/Wikidata Summary to increase users' participation: it features the new Translate extension and some keywords; this script could easily get translations from there, e.g. m:Translations:User:SamoaBot/Wikidata Summary/translate/1/fi for Finnish. --Ricordisamoa 04:50, 4 July 2013 (UTC)
Tool broken? edit
I don't see this menu item on fiwiki anymore after the latest MediaWiki UI changes. Can it be fixed? --Silvonen (talk) 16:14, 23 October 2013 (UTC)
- Sorry, it's still working for me on fiwiki... --Yair rand (talk) 21:43, 23 October 2013 (UTC)
- Hmm, now I see the menu item again. I wonder what the problem was? --Silvonen (talk) 04:34, 21 November 2013 (UTC)
Bosnian translation edit
'bs': {
removeinterwikis: "Ukloni međuwiki veze",
removeinterwikissummary: "{{PLURAL:$2|Uklonjena međuwiki veza koja je već premještena|Uklonjene međuwiki veze ($2) koje su već premještene}} na stavku [[d:$1|$1]] na [[WP:WDATA|Wikipodacima]]"
},
-- Edinwiki (talk) 12:33, 18 February 2014 (UTC)
- Done, thank you. --Yair rand (talk) 22:41, 18 February 2014 (UTC)
Texts always displayed in English edit
Hi, the menu item and edit summary are now displayed in English on fiwiki, although the script has been localized into Finnish. Shouldn't the script set lang = mw.config.get('wgPageContentLanguage')
before calling mw.messages.set( translate[ lang ] || translate.en )
? That is how it worked before this change on Feb. 11. --Silvonen (talk) 08:22, 21 February 2014 (UTC)
- Fixed. --Yair rand (talk) 04:28, 24 February 2014 (UTC)
Problem with parentheses? edit
The tool doesn’t seem to remove links that contain parentheses. For example, the link en:HMS Arab (1901) is not removed from the page fi:HMS Arab (1901). --Silvonen (talk) 04:56, 27 February 2014 (UTC)
Yair rand, the tool was not able to remove these links from w:en:Template:Quote/doc (Q3918978):
[[fr:modèle:citation]]
(the actual site link is to Modèle:Citation)[[it:Template:quote]]
(it:Template:Citazione redirects to it:Template:Citazione)
Is it possible to improve the script for these cases? Helder.wiki 19:40, 2 March 2014 (UTC)
- Fixed the issue with parentheses in the titles, and the case sensitivity issue. Having the script handle redirects might not be feasible. --Yair rand (talk) 23:55, 2 March 2014 (UTC)
- Thanks, but now I don't seem to be able to remove any links anymore... The result is "Removed 0 sitelinks..." both on the page en:Paul Tant and on fi:HMS Arab (1901). --Silvonen (talk) 16:16, 3 March 2014 (UTC)
- Sorry about that. Should be fixed now. --Yair rand (talk) 19:29, 3 March 2014 (UTC)
- Thanks, but now I don't seem to be able to remove any links anymore... The result is "Removed 0 sitelinks..." both on the page en:Paul Tant and on fi:HMS Arab (1901). --Silvonen (talk) 16:16, 3 March 2014 (UTC)
Latvian translation edit
{{Edit request}}
'lv': {
removeinterwikis: "Izņemt starpvikipēdiju saites",
removeinterwikissummary: "{{PLURAL:$2|izņemta $2 starpviki saite|izņemtas $2 starpviki saites}}, kas atrodas [[Vikidati|Vikidatos]] [[d:$1]]"
},
Please add this translation. --Edgars2007 (talk) 11:47, 11 August 2014 (UTC)
- Done, thank you! --Stryn (talk) 16:04, 11 August 2014 (UTC)
Tool is broken edit
I just tried it on fiwiki, but it's just loading and not deleting the sitelink from the article. --Stryn (talk) 18:54, 9 August 2015 (UTC)
$.escapeRE
has to replaced bymw.RegExp.escape
. I fixed this and some other problems in User:Fomafix/checksitelinks.js. --Fomafix (talk) 19:42, 9 August 2015 (UTC)- Updated to use
mw.RegExp.escape
. --Yair rand (talk) 20:55, 9 August 2015 (UTC)- Hi! The script needs a new update. It shows this message in the console: This page is using the deprecated ResourceLoader module "mediawiki.RegExp". Please use mw.util.escapeRegExp() instead. Helder 21:23, 20 September 2019 (UTC)
- Updated to use
Not working edit
I wanted to use it on Wiktionary, but 0 links were removed and page not changed. JAn Dudík (talk) 20:25, 21 June 2017 (UTC)
Doesn't work with the "new" code editor (VE based) edit
Doesn't work with the "new" code editor (VE based), probably need some delaying before searching for the "wpTextbox1". MarMi wiki (talk) 18:15, 24 July 2023 (UTC)
- I am not aware of any tool that would work under the "new" 2017 wikitext editor. "wpTextbox1" probably means nothing in that interface. --Matěj Suchánek (talk) 18:03, 26 July 2023 (UTC)
- It could work, if the "wpTextbox1" assigment would be delayed (didn't have a test article to see if it removes anything, but after manually loading the script from the dev console, at least it shows itself in the menu and doesn't throw an exception after clicking):MarMi wiki (talk) 21:12, 26 July 2023 (UTC)
//Waiting for a hook: mw.hook('ve.activationComplete').add(function () { //code executed when hook is fired }); /*All hooks fired during the editor start (in any mode): ve.activationStart ve.loadModules ve.wikitextInteractive ve.skinTabSetupComplete ve.activate ve.activationComplete The last one fires again during switching between modes. Detection of the mode: */ var surface = ve.init.target.getSurface(); if ( surface.getMode() === 'visual' ) { // Visual mode } else if ( surface.getMode() === 'source' ) { // Source mode }
- It could work, if the "wpTextbox1" assigment would be delayed (didn't have a test article to see if it removes anything, but after manually loading the script from the dev console, at least it shows itself in the menu and doesn't throw an exception after clicking):