MediaWiki talk:Wdsearch.js
See screenshot at right. See more info via Magnus and Gerard.
- USAGE
On en.wikipedia, add the following line to your common.js page:
importScript('MediaWiki:Wdsearch.js');
On other Wikipedias, add this line, instead:
mw.loader.load("//en.wikipedia.org/enwiki/w/index.php?title=MediaWiki:Wdsearch.js&action=raw&ctype=text/javascript");
Translations
To change the header line to your language: add the appropriate line below, and request an admin to update the script.
pt and pt-BR
This edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Hi!
Could you add the following translations?
'pt' : {
'header' : 'Resultados da busca no Wikidata'
} ,
'pt-br' : {
'header' : 'Resultados da busca no Wikidata'
}
Helder 17:07, 9 November 2013 (UTC)
- Done - Hoo man (talk) 10:41, 11 November 2013 (UTC)
Updated version:
'pt' : {
'commons_cat' : 'Categoria no Commons' ,
'wikipedias' : 'Artigos da Wikipédia' ,
'header' : 'Resultados da busca no Wikidata'
},
'pt-br' : {
'commons_cat' : 'Categoria no Commons' ,
'wikipedias' : 'Artigos da Wikipédia' ,
'header' : 'Resultados da busca no Wikidata'
},
Helder 09:15, 5 December 2013 (UTC)
it
This edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
'it' : {
'commons_cat' : 'Categoria in Commons' ,
'wikipedias' : 'Voci di Wikipedia' ,
'wikivoyages' : 'Guide turistiche di Wikivoyage' ,
'wikisources' : 'Pagine di Wikisource' ,
'header' : 'Risultati da Wikidata' ,
'reasonator' : 'Mostra dettagli dell\'elemento su Reasonator'
},
Please add Italian translation "Categoria in Commons", "Voci di Wikipedia", "Risultati da Wikidata". --Nemo 11:37, 17 November 2013 (UTC)
- Done - Hoo man (talk) 16:41, 17 November 2013 (UTC)
- Please update Italian translation. Thanks! --β16 - (talk) 09:26, 14 October 2015 (UTC)
fr
This edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Could you add the French translation: "Catégorie sur Commons", "Articles sur Wikipédia" and "Résultats sur Wikidata"? Thanks. --Coyau (talk) 10:51, 18 November 2013 (UTC)
el
This edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Please add Greek (el) translation:
'el' : {
'commons_cat' : 'Κατηγορία στα Commons' ,
'wikipedias' : 'Λήμματα στη Βικιπαίδεια' ,
'header' : 'Αποτελέσματα αναζήτησης στα Wikidata'
Also in autodesc.js:
stock : {
'no_auto_content' : { en:'Cannot determine auto-content' } ,
'generating_auto_content' : { en:'Generating auto-content...' , de:'Erzeuge automatische Beschreibung...' } ,
'query_error' : { en:'Query error' , de:'Abfrage-Fehler' } ,
'not_found' : { en:'Not found' , de:'Nicht gefunden', el:'Δεν βρέθηκε' } ,
'cannot_describe' : { en:'Cannot auto-describe' , de:'Automatische Beschreibung nicht verfΓΌgbar', el:'Δεν μπορεί να περιγραφεί' } ,
'disambig' : { en:'Wikipedia disambiguation page' , de:'Wikipedia-BegriffsklΓ€rungsseite', el:'Σελίδα αποσαφήνισης στη Βικιπαίδεια' } ,
'person' : { en:'person' , de:'Person', el:'Πρόσωπο' } ,
'in' : { en:'in', el:'στο' } ,
'by' : { en:'by' , de:'von', el:'του' } ,
'for' : { en:'for' , de:'fΓΌr', el:'για' } ,
'from' : { en:'from' , de:'von', el:'από' } ,
'part of' : { en:'part of' , de:'Teil von', el:'μέρος του' } ,
'member of' : { en:'member of' , de:'Mitglied von', el:'μέλος του' } ,
'named after' : { en:'named after' , de:'benannt nach' } ,
'child of' : { en:'child of' , de:'Kind von', el:'τέκνο του' } ,
'spouse of' : { en:'spouse of' , de:'verheiratet mit', el:'σύζυγος του' } ,
'location' : { en:'Location' , de:'LokalitΓ€t', el:'Τοποθεσία' } ,
'BC' : { en:'BC', el:'π.Χ.' }
} ,
and
language_specific : {
....
el : {
'nationality' : { 'Ελλάδα':'Έλληνας', 'Ρωσία':'Ρώσος','Δανία':'Δανός','Νορβηγία':'Νορβηγός','Ολλανδία':'Ολλανδός','Γερμανία':'Γερμανός', 'Χιλή':'Χιλιανός','Βραζιλία':'Βραζιλιάνος', 'Γαλλία':'Γάλλος', 'Αγγλία':'Άγγλος', 'Ηνωμένο Βασίλειο':'Βρετανός', 'Ηνωμένες Πολιτείες της Αμερικής':'Αμερικανός', 'Ισπανία':'Ισπανός', 'Ιταλία':'Ιταλός', 'Τουρκία':'Τούρκος', 'Βουλγαρία':'Βούλγαρος' }
}
--geraki TL 11:37, 18 November 2013 (UTC)
sv
This edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Could you please add the following translation?
'sv' : {
'commons_cat' : 'Kategorier på Commons' ,
'wikipedias' : 'Wikipediaartiklar' ,
'header' : 'Sökresultat från Wikidata'
} ,
Cheers/ André Costa (WMSE) (talk) 22:52, 20 November 2013 (UTC)
bn
This edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
please add the following translation.
'bn' : {
'commons_cat' : 'কমন্স বিষয়শ্রেণী' ,
'wikipedias' : 'উইকিপিডিয়া নিবন্ধ' ,
'header' : 'উইকিউপাত্ত অনুসন্ধানের ফলাফল'
} ,
--Aftab1995 (talk) 15:24, 3 December 2013 (UTC)
This edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
please add following line also.
'reasonator' : 'Reasonator-এ আইটেমের বিস্তারিত দেখাও'
--Aftab1995 (talk) 00:41, 7 December 2013 (UTC)
eo
This edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
please add the following translation.
'eo' : {
'commons_cat' : 'Komuneja kategorio' ,
'wikipedias' : 'Vikipediaj artikoloj' ,
'header' : 'Serĉorezultoj de Vikidatumoj' ,
'reasonator' : 'Montri detalojn en Reasonator'
} ,
Thanks --KuboF (talk) 22:39, 5 December 2013 (UTC)
sk
This edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
please add the following translation.
'sk' : {
'commons_cat' : 'Kategória na Commons' ,
'wikipedias' : 'Články na Wikipédii' ,
'header' : 'Výsledky hľadania na Wikiúdajoch' ,
'reasonator' : 'Zobraziť podrobnosti v Reasonatore'
} ,
Thanks --KuboF (talk) 22:39, 5 December 2013 (UTC)
he
This edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
please add the following translation for the hebrew wikipedia:
'he' : {
'commons_cat': 'קטגוריית ויקישיתוף',
'wikipedias': 'ערכים בוויקיפדיה',
'header': 'תוצאות חיפוש בוויקינתונים'
}
Thanks, קובי כרמל (talk) 09:33, 12 December 2013 (UTC)
ilo
This edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Please add the following Ilokano translations.
'ilo' : {
'commons_cat' : 'Kategoria ti Commons' ,
'wikipedias' : 'Dagiti artikulo ti Wikipedia' ,
'header' : 'Dagiti resulta ti panagbiruk iti Wikidata' ,
'reasonator' : 'Ipakita dagiti salaysay ti banag iti Reasonator'
},
Thanks. Lam-ang (talk) 15:56, 12 December 2013 (UTC)
Minor correction--Lam-ang (talk) 18:57, 12 December 2013 (UTC)
eu
This edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Please add the Basque translation:
'eu' : {
'commons_cat' : 'Commonseko kategoria' ,
'wikipedias' : 'Wikipediako artikuluak' ,
'header' : 'Wikidatako bilaketaren emaitzak' ,
'reasonator' : 'Erakutsi Reasonatorreko xehetasunak'
} ,
Thank you. --Xabier Armendaritz(talk) 21:39, 12 December 2013 (UTC)
ru
This edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Please add the Russian translation:
'ru' : {
'commons_cat' : 'Категория Викисклада' ,
'wikipedias' : 'Статьи Википедии' ,
'header' : 'Результаты поиска в Викиданных' ,
'reasonator' : 'Посмотреть подробности через Reasonator'
},
Thank you. --Kaganer (talk) 12:26, 13 December 2013 (UTC)
- Done thank you. Callanecc (talk • contribs • logs) 12:33, 13 December 2013 (UTC)
zh
This edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Please add the Chinese translation:
'zh' : {
'commons_cat' : '维基共享资源类别' ,
'wikipedias' : '维基百科文章' ,
'header' : '维基数据搜索结果' ,
'reasonator' : '上Reasonator显示项目的详细信息'
},
Thanks. Jianhui67 talk★contribs 19:50, 13 December 2013 (UTC)
es
This edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Spanish translation:
'es' : {
'commons_cat' : 'Categoría en Commons' ,
'wikipedias' : 'Artículos en Wikipedia' ,
'header' : 'Resultados de la búsqueda en Wikidata' ,
'reasonator' : 'Mostrar los detalles en Reasonator'
},
Thanks. --Kizar (talk) 12:49, 14 December 2013 (UTC)
id
This edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
'id' : {
'commons_cat' : 'Kategori Commons' ,
'wikipedias' : 'Artikel Wikipedia' ,
'header' : 'Hasil pencarian Wikidata' ,
'reasonator' : 'Tunjukkan detil item di Reasonator'
},
udm
This edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
'udm' : {
'commons_cat' : 'Викискладысь категория'
'wikipedias' : 'Википедиысь статьяос'
'header' : 'Викиданнойёсысь утчанлэн йылпумъянъёсыз'
'reasonator' : 'Тыро-пыдогес учконо Reasonator пыр'
},
--Kaganer (talk) 22:51, 20 December 2013 (UTC)
cs
This edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Please add the following translation:
'cs' : {
'commons_cat' : 'Kategorie na Wikimedia Commons' ,
'wikipedias' : 'Články na Wikipedii' ,
'header' : 'Výsledky vyhledávání na Wikidatech' ,
'reasonator' : 'Zobrazit podrobnosti nástrojem Reasonator'
} ,
Thank you. --Blahma (talk) 15:48, 25 December 2013 (UTC)
- Done --Magnus Manske (talk) 11:51, 7 January 2014 (UTC)
gu
This edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Will appreciate if you could add following translation for Gujarati, as I have just enabled it on gu.wiki:
'gu' : {
'commons_cat' : 'કોમન્સ કેટેગરી' ,
'wikipedias' : 'વિકિપીડિયાના લેખો' ,
'header' : 'વિકિડેટા શોધ પરિણામો' ,
'reasonator' : 'રિઝોનેટર પર આઇટમની વિગતો બતાવો'
} ,
Many Thanks.-- DhavalTalk 23:50, 29 December 2013 (UTC)
- Done --Magnus Manske (talk) 11:52, 7 January 2014 (UTC)
vi
This edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Would an administrator please add the following Vietnamese translation to MediaWiki:Wdsearch.js:
'vi' : {
'commons_cat' : 'Thể loại Commons' ,
'wikipedias' : 'Bài viết Wikipedia' ,
'wikivoyages' : 'Bài viết Wikivoyage' ,
'header' : 'Kết quả tìm kiếm Wikidata' ,
'reasonator' : 'Xem chi tiết khoản mục trên Reasonator'
},
If you're comfortable with JavaScript, please also merge the following translations into MediaWiki:Wdsearch-autodesc.js:
stock : {
'no_auto_content' : { vi:'Không thể xác định nội dung tự động' } ,
'generating_auto_content' : { vi:'Đang tạo nội dung tự động…' } ,
'query_error' : { vi:'Lỗi truy vấn' } ,
'not_found' : { vi:'Không tìm thấy' } ,
'cannot_describe' : { vi:'Không thể miêu tả tự động' } ,
'disambig' : { vi:'Trang định hướng Wikipedia' } ,
'person' : { vi:'người' } ,
'in' : { vi:'trong' } ,
'by' : { vi:'bởi' } ,
'for' : { vi:'cho' } ,
'from' : { vi:'từ' } ,
'part of' : { vi:'một phần của' } ,
'member of' : { vi:'thành viên của' } ,
'named after' : { vi:'đặt tên theo' } ,
'child of' : { vi:'con của' } ,
'spouse of' : { vi:'vợ/chồng của' } ,
'location' : { vi:'Vị trí' } ,
'BC' : { vi:'TCN' }
} ,
language_specific : {
vi : {
'nationality' : {'Cộng hòa Nhân dân Trung Hoa':'Trung Quốc','Quần đảo Faroe':'Faroe','Cộng hòa Ireland':'Ireland','Nhật Bản':'Nhật','Cộng hòa Nam Phi':'Nam Phi','Hoa Kỳ':'Mỹ','Vương quốc Liên hiệp Anh và Bắc Ireland':'Anh','Cộng hòa Séc':'Séc','Cộng hòa Síp':'Síp','Cộng hòa Macedonia':'Macedonia','Cộng hòa Dân chủ Nhân dân Triều Tiên':'Triều Tiên','Cộng hòa Dân chủ Congo':'Congo','Cộng hòa Dominica':'Dominica','Cộng hòa Trung Phi':'Trung Phi'}
} ,
} ,
// in listWords()
else if ( wd_auto_desc.lang == 'vi' ) {
if ( list.length == 1 ) return list[0] ;
if ( list.length == 2 ) return list[0] + ' và ' + list[1] ;
var last = list.pop() ;
return list.join ( ', ' ) + ', và ' + last ;
}
Thanks!
– Minh Nguyễn (talk, contribs) 08:43, 9 January 2014 (UTC)
- I've added the translations. The rest still needs to be done. — Mr. Stradivarius ♪ talk ♪ 17:45, 13 January 2014 (UTC)
- Done all part done now. I've not really tested it so @Mxn: could you test that its working fine.--Salix alba (talk): 10:12, 26 January 2014 (UTC)
- Yes, it works, thanks! – Minh Nguyễn (talk, contribs) 12:39, 26 January 2014 (UTC)
fa
This edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
please add this:
'fa' : {
'commons_cat' : 'رده انبار' ,
'wikipedias' : 'مقاله ویکیپدیا' ,
'wikivoyages' : 'راهنما در ویکیسفر' ,
'wikisources' : 'صفحه در ویکینبشته' ,
'header' : 'نتیجه جستجو در ویکیداده' ,
'reasonator' : 'اطلاعات بیشتر در مورد این آیتم در ریزنیتور'
},
Thank you :)
Ladsgroupبحث 10:12, 19 February 2014 (UTC)
Done, see here. Thank you. Rjd0060 (talk) 12:05, 19 February 2014 (UTC)
ur
Please add this:
'fa' : {
'commons_cat' : 'کومنز زمرہ' ,
'wikipedias' : 'ویکیپیڈیا مضامین' ,
'wikivoyages' : 'سفری رہنما برائے ویکی سفر' ,
'wikisources' : 'ویکی ماخذ صفحات' ,
'header' : 'ویکی ڈیٹا میں نتیجہ تلاش' ,
'reasonator' : 'ریزونیٹر میں آئٹم کی تفصیلات دکھائیں'
},
Thanks Muhammad Shuaib (talk) 15:26, 26 April 2014 (UTC)
- Done. To Muhammad Shuaib - next time you should use the {{edit protected}} template, otherwise admins might not see your request. All the best — Mr. Stradivarius ♪ talk ♪ 09:28, 13 May 2014 (UTC)
ja
This edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Please add the Japanese ('ja') translations below to the script. Whym (talk) 08:59, 13 May 2014 (UTC)
'ja' : {
'commons_cat' : 'コモンズのカテゴリ' ,
'wikipedias' : 'ウィキペディアの記事' ,
'wikivoyages' : 'Wikivoyage の旅行ガイド' ,
'wikisources' : 'ウィキソースのページ' ,
'header' : 'ウィキデータの検索結果' ,
'reasonator' : 'Reasonator で項目の詳細を見る'
},
lv
Please add the Latvian ('lv') translations below to the script. --Papuass (talk) 10:16, 25 November 2014 (UTC)
'lv' : {
'commons_cat' : 'Vikikrātuves kategorija' ,
'wikipedias' : 'Vikipēdiju raksti' ,
'wikivoyages' : 'Wikivoyage ceļvedis' ,
'wikisources' : 'Wikisource lapas' ,
'header' : 'Vikidatu meklēšanas rezultāti' ,
'reasonator' : 'Rādīt ieraksta informāciju Reasonator'
},
nb and nn
This edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Please add the Norwegian Bokmål ('nb') and Norwegian Nynorsk ('nn') translations below to the script. Jon Harald Søby (talk) 09:21, 6 February 2015 (UTC)
'nb' : {
'commons_cat' : 'Commons-kategori' ,
'wikipedias' : 'Wikipedia-artikler' ,
'wikivoyages' : 'Wikivoyage-sider' ,
'wikisources' : 'Wikikilden-sider' ,
'header' : 'Søkeresultater fra Wikidata' ,
'reasonator' : 'Vis detaljer om elementet i Reasonator'
},
'nn' : {
'commons_cat' : 'Commons-kategori' ,
'wikipedias' : 'Wikipedia-artiklar' ,
'wikivoyages' : 'Wikivoyage-sider' ,
'wikisources' : 'Wikikilden-sider' ,
'header' : 'Søkjeresultat frå Wikidata' ,
'reasonator' : 'Syn detaljar om elementet i Reasonator'
},
- Done — Martin (MSGJ · talk) 09:40, 6 February 2015 (UTC)
kk
This edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
please add the following translation.
'kk' : {
'commons_cat' : 'Ортаққордағы санаты' ,
'wikipedias' : 'Уикипедиядағы мақаласы' ,
'header' : 'Уикидеректегі іздеу нәтижелері' ,
'reasonator' : 'Reasonator арқылы толығырақ қарау'
} ,
Thanks Arystanbek (talk) 14:44, 8 February 2015 (UTC)
de
This edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
please replace 'de' with this:
'de' : {
'commons_cat' : 'Kategorie auf Commons' ,
'wikipedias' : 'Wikipedia-Artikel' ,
'wikivoyages' : 'Wikivoyage-Reiseführer' ,
'wikisources' : 'Wikisource-Artikel' ,
'header' : 'Wikidata-Suchergebnisse'
'reasonator' : 'Zeige die Eigenschaften auf Reasonator'
},
Thanks, --CennoxX (talk @ dewiki) 15:17, 19 February 2015 (UTC)
min
This edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
'min' : {
'commons_cat' : 'Kategori Commons' ,
'wikipedias' : 'Laman Wikipedia' ,
'wikivoyages' : 'Laman Wikivoyage' ,
'wikisources' : 'Laman Wikisource' ,
'header' : 'Hasil pancarian di Wikidata' ,
'reasonator' : 'Caliak labiah jaleh di Reasonator'
},
- Thanks, Ę-oиė >>> ™ 07:25, 31 October 2015 (UTC)
- Added — Martin (MSGJ · talk) 22:01, 31 October 2015 (UTC)
Deprecated code
This edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
The function addOnloadHook (used at autodesc.js) was deprecated and now causes a warning in the console. Could you replace it by its jQuery equivalent? Helder 17:07, 9 November 2013 (UTC)
- @Helder.wiki: please can you describe the exact change you are requesting? I'm not familiar with javascript. — Martin (MSGJ · talk) 12:51, 21 November 2013 (UTC)
- Hmm, since this code is on Labs, only Magnus Manske can fix it (by replacing
addOnloadHook
->$
). Helder 12:58, 21 November 2013 (UTC)- Done, please check if I broke it... --Magnus Manske (talk) 13:54, 2 December 2013 (UTC)
- Hmm, since this code is on Labs, only Magnus Manske can fix it (by replacing
Script error
This edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Hi, I would like to report a script error. With this search: [1] I see this error in the browser error console: "Error: TypeError: v.claims is undefined Source File: https://en.wikipedia.org/enwiki/w/index.php?title=MediaWiki:Wdsearch.js&action=raw&ctype=text/javascript Line: 145". Nice tool btw. --Rotpunkt (talk) 20:14, 26 November 2013 (UTC)
- Done - Hoo man (talk) 22:44, 28 November 2013 (UTC)
- Thanks. Now I have another error at line 151 (TypeError: v.labels is undefined). I think it's just a cut&paste error, it should be:
if ( undefined !== v.labels && undefined !== v.labels[wgUserLanguage] ) { // Label
instead of:
if ( undefined !== v.descriptions && undefined !== v.labels[wgUserLanguage] ) { // Label
- --Rotpunkt (talk) 13:11, 2 December 2013 (UTC)
- Thanks, fixed! --Magnus Manske (talk) 13:55, 2 December 2013 (UTC)
- --Rotpunkt (talk) 13:11, 2 December 2013 (UTC)
Don't load external JS
Can we store the JavaScript currently being pulled from tool labs on wiki somewhere? If we enable this as a gadget, we could set it as a dependency so it gets loaded via ResourceLoader. Legoktm (talk) 07:34, 4 December 2013 (UTC)
mw.loader.using
All of the $.dialog calls should be wrapped in mw.loader.using('jquery.ui.dialog', function() { stuff } ); just to be extra safe. Legoktm (talk) 07:35, 4 December 2013 (UTC)
Script disabled
The script has been disabled for the line: "importScriptURI("https://tools.wmflabs.org/wikidata-todo/autodesc.js");" that it's executed for each visitor on wikipedia when this script is called from a global common.js. Is it possible to move that script autodesc.js somewhere else? and/or refactor a bit that import stuff? --Rotpunkt (talk) 21:09, 4 December 2013 (UTC)
- Yes. I'll update it with [2] which fixes the issue once labs stabilizes a bit. Legoktm (talk) 21:47, 4 December 2013 (UTC)
- Done a while back. Legoktm (talk) 06:24, 5 December 2013 (UTC)
- Thanks! --Rotpunkt (talk) 09:38, 5 December 2013 (UTC)
More robust appending to noarticletext
I'm told that the script doesn't display anything with s:it:MediaWiki:Noarticletext because it doesn't include a table element. I see pl:MediaWiki:Noarticletext doesn't either, nor the default, and this is probably why I don't see anything added to pl:Salticoididae and lb:Salticoididae, unlike it:Salticoididae. Ideas? --Nemo 06:21, 13 December 2013 (UTC)
- See also meta:Talk:Wikidata#Filling red links with Wikidata, Nemo. --Atlasowa (talk) 20:55, 4 May 2014 (UTC)
Language dependant ordering
In some language, as in English, the pattern might be "<nationality> <job>" (e.g. French politician), but in some other languages, the ordering might be reversed: "<job> <nationality>" (e.g. in Indonesian: "politisi Perancis"). Is there any way to reorder the wording? Bennylin (talk) 10:46, 30 December 2013 (UTC)
hu
This edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Can you add the following translation?
'hu' : {
'commons_cat' : 'Commons-kategória' ,
'wikipedias' : 'Wikipédia-szócikkek' ,
'wikisources' : 'Wikiforrás-lapok' ,
'header' : 'Wikidata keresési eredmények'
} ,
Thanks! --Tacsipacsi (talk) 14:05, 4 May 2014 (UTC)
encodeURIComponent
This edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Please use encodeURIComponent
instead of escape
. Using encodeURIComponent
is necessary for (non-Latin) Unicode characters; escape
converts some Unicode characters into codes that start with "%u" which are invalid in URLs. [3] 4 instances would need to be replaced. Whym (talk) 09:02, 13 May 2014 (UTC)
- To clarify, the purpose of the request above is to allow use of the script on other Wikipedias including Japanese and by English Wikipedia users who have one of those affected languages as their user language. This search result page shows how the links given by Wdsearch are broken when one enters a query "東京都千代田区" ("Chiyoda, Tokyo" in Japanese). The second link on the first line of Wdsearch's results points to https://ja.wikipedia.org/wiki/%u5343%u4EE3%u7530%u533A (which gives you a "400 Bad Request" error), while the correct link is ja:千代田区. Whym (talk) 13:10, 14 May 2014 (UTC)
I was working a bit on this yesterday, in a couple of cases it should probably be mw.util.wikiurlencode but i will work on it a bit more in the coming days. —TheDJ (talk • contribs) 07:00, 15 May 2014 (UTC)
- @Mr. Stradivarius and TheDJ: Thank you for working on this. I failed to find previously but MediaWiki:Wdsearch-autodesc.js has 3 instances of escape() too, and would need the same fix, whether it is encodeURIComponent or mw.util.wikiurlencode. Whym (talk) 08:06, 15 May 2014 (UTC)
- Thanks for the swift fix, TheDJ, I can confirm that it works for Japanese now. Whym (talk) 11:11, 15 May 2014 (UTC)
- @Whym: That last part was reverted by Magnus, so if it is broken again now, I suggest you ask him to fix it. —TheDJ (talk • contribs) 20:30, 15 May 2014 (UTC)
- I reverted it because you broke it for external tools. Search here is still broken after your changes; I'll try to find your bug, but keep your condescending tone for someone who buys your BS. Just be more careful next time, OK? --Magnus Manske (talk) 20:14, 19 May 2014 (UTC)
- condenscending... annoyed at most. —TheDJ (talk • contribs) 07:20, 20 May 2014 (UTC)
- I reverted it because you broke it for external tools. Search here is still broken after your changes; I'll try to find your bug, but keep your condescending tone for someone who buys your BS. Just be more careful next time, OK? --Magnus Manske (talk) 20:14, 19 May 2014 (UTC)
- @Whym: That last part was reverted by Magnus, so if it is broken again now, I suggest you ask him to fix it. —TheDJ (talk • contribs) 20:30, 15 May 2014 (UTC)
- Thanks for the swift fix, TheDJ, I can confirm that it works for Japanese now. Whym (talk) 11:11, 15 May 2014 (UTC)
Query error next to search results
Thanks for continued work, but recent changes seem to be a bit too invasive: making a query for each search result hangs my computer. What's worse, I've only seen "Query error" in blue next to reach result; not very helpful. :) --Nemo 15:25, 15 May 2014 (UTC)
- Yeah noticed the same. Was there anything there before ? I'm not really a user of the script, so I don't remember. To me it looks like that part of the code was written for the Search page on wikidata.org and not actually for the search page of en.wp... —TheDJ (talk • contribs) 20:36, 15 May 2014 (UTC)
- I hope this gets fixed soon. -Ash_Crow (talk) 11:31, 17 May 2014 (UTC)
- No, previously there wasn't anything next to each search result: only at the bottom of the page. --Nemo 16:49, 17 May 2014 (UTC)
- TheDJ introduced a race condition bug. Fixed now. --Magnus Manske (talk) 20:34, 19 May 2014 (UTC)
- For future reference, I removed a global variable and made it local without noticing. Accidents like these are one of the reasons implicit globals in JS should be avoided. Thx for fixing Magnus. —TheDJ (talk • contribs) 07:31, 20 May 2014 (UTC)
- Thanks a lot, Magnus Manske and TheDJ, for working on this. Whym (talk) 07:45, 7 June 2014 (UTC)
- For future reference, I removed a global variable and made it local without noticing. Accidents like these are one of the reasons implicit globals in JS should be avoided. Thx for fixing Magnus. —TheDJ (talk • contribs) 07:31, 20 May 2014 (UTC)
- TheDJ introduced a race condition bug. Fixed now. --Magnus Manske (talk) 20:34, 19 May 2014 (UTC)
- No, previously there wasn't anything next to each search result: only at the bottom of the page. --Nemo 16:49, 17 May 2014 (UTC)
- I hope this gets fixed soon. -Ash_Crow (talk) 11:31, 17 May 2014 (UTC)
make this a gadget
I just made a simple gadget for this and put it online on the Dutch Wikipedia and Commons. Three steps:
- Create MediaWiki:Gadget-Wdsearch.js (nl / Commons)
- Create MediaWiki:Gadget-Wdsearch (nl / Commons en / Commons nl /)
- Modify MediaWiki:Gadgets-definition (nl / Commons)
Maybe a good idea to do that here too? Multichill (talk) 19:53, 8 January 2015 (UTC)
Error: Syntax error, unrecognized expression
On this search on Commons I get: Error: Syntax error, unrecognized expression: #MediaWiki talk:Gadget-AuthorityControl.js/Archive/2014 span.wd_desc. Helder 22:57, 6 July 2015 (UTC)
- This also happens on wikispecies, when searching for "Template:Sister project links". Helder 16:18, 25 August 2015 (UTC)
Error: Syntax error, unrecognized expression: unsupported pseudo: Sister
Search for "Template:Sister" and it breaks. Helder 16:18, 25 August 2015 (UTC)
- Also happens for Module:JSON (Error: Syntax error, unrecognized expression: unsupported pseudo: JSON). Helder 16:02, 8 September 2015 (UTC)
Potential for XSS Vulnerabilities
I just saw this script today, and frankly it scares me a bit. This seems to make very minimal attempts to prevent XSS vulnerabilities, it just concatenates strings from the API with bits of html and sticks them into the page. I think this needs a full security review and update to follow security best practices. I'm not saying there are for certain vulnerabilities here, just that it is not written in a way that makes it easy to prove that they don't exist. EBernhardson (WMF) (talk) 15:20, 4 November 2015 (UTC)