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/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. |
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)
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
It is requested that an edit be made to the interface page at MediaWiki:Wdsearch.js. (edit · history · last · links)
This template must be followed by a complete and specific description of the request, that is, specify what text should be removed and a verbatim copy of the text that should replace it. "Please change X" is not acceptable and will be rejected; the request must be of the form "please change X to Y".
The edit may be made by any interface administrator. Remember to change the |
Please add the Chinese translation:
'zh' : {
'commons_cat' : '维基共享资源类别' ,
'wikipedias' : '维基百科文章' ,
'header' : '维基数据搜索结果' ,
'reasonator' : '上Reasonator显示项目的详细信息'
},
Thanks. Jianhui67 talk★contribs 19:50, 13 December 2013 (UTC)
es
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)
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/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. Ideas? --Nemo 06:21, 13 December 2013 (UTC)