MediaWiki talk:Wdsearch-autodesc.js: Difference between revisions

Content deleted Content added
add section title, to fix TOC position
m Obsolete HTML tags "tt" swapped out for "code". Project Lint
 
(2 intermediate revisions by 2 users not shown)
Line 3:
{{editprotected|ans=yes}}
Please add to the list of nationalities:
<sourcesyntaxhighlight lang="javascript">
language_specific : { el : { 'nationality' : {
 
'Αυστρία':'Αυστριακός', 'Ηνωμένες Πολιτείες Αμερικής':'Αμερικανός', 'Σουηδία':'Σουηδός', 'Πολωνία':'Πολωνός', 'Ουκρανία':'Ουκρανός', 'Ιρλανδία':'Ιρλανδός', 'Σερβία':'Σέρβος', 'Γιουγκοσλαβία':'Γιουγκοσλάβος'
 
</syntaxhighlight>
</source>
Thanks. -[[User:Geraki|<fontspan colorstyle="color: green">'''geraki'''</fontspan>]] <sup>[[User_talk:Geraki|T]]</sup><sub class="plainlinks" >[http://en.wikipedia.org/w/index.php?title=Special:Log&type=&user=Geraki L]</sub> 17:32, 14 March 2014 (UTC)
:{{done}} I added the appropriate closing brackets. You might want to check the list did not get truncated as the list of language seemed rather small. --[[User:Salix alba|Salix alba]] ([[User talk:Salix alba|talk]]): 17:50, 14 March 2014 (UTC)
 
@[[User:Salix alba|Salix alba]]. There was some confusion here. There was already a list for ''el''. I just wanted to add to the existing list, five rows higher from what it was added (that's why I had'n added closing brackets - I only mentioned ''where'' it should be added). Please merge the two lists. -[[User:Geraki|<fontspan colorstyle="color: green">'''geraki'''</fontspan>]] <sup>[[User_talk:Geraki|T]]</sup><sub class="plainlinks" >[http://en.wikipedia.org/w/index.php?title=Special:Log&type=&user=Geraki L]</sub> 12:58, 16 March 2014 (UTC)
:{{ping|Geraki L}} Ah yes I see now. Lists merged now. --[[User:Salix alba|Salix alba]] ([[User talk:Salix alba|talk]]): 14:30, 16 March 2014 (UTC)
 
Line 18:
 
{{editprotected|answered=yes}}
I've made a Dutch translation, it can be found on [http://pastebin.com/sHmz14ss Pastebin]. I've posted the whole script on Pastebin (because of the complicated translation-system of this script), so it's just copy-and-paste. [[User:Sjoerddebruin|<fontspan facestyle="font-family: Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif" color="#325186">'''Sjoerd de Bruin'''</fontspan>]] [[User talk:Sjoerddebruin|<fontspan facestyle="font-family: Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif" color="#325186"><small>(talk)</small></fontspan>]] 21:29, 15 July 2014 (UTC)
:Ping [[User:Writ Keeper|Writ Keeper]]: ^^ the onwiki request as you requested. :) [[User:Trijnstel|<fontspan colorstyle="color: #064EA3" face="Verdana" size="2">Trijnstel</fontspan>]]<sub>[[User talk:Trijnstel|<fontspan colorstyle="color: #000000">talk</fontspan>]]</sub> 21:34, 15 July 2014 (UTC)
::Done, thanks. [[User:Writ Keeper|Writ&nbsp;Keeper]]&nbsp;[[User Talk: Writ Keeper|&#9863;]][[Special:Contributions/Writ_Keeper|&#9812;]] 21:46, 15 July 2014 (UTC)
 
Line 51:
I've fixed the Dutch translation and trimmed some whitespace, please replace with [https://nl.wikipedia.org/w/index.php?title=Gebruiker:Sjoerddebruin/js&oldid=42954723 this].
<!-- End request -->
[[User:Sjoerddebruin|<fontspan facestyle="font-family: Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif" color="#325186">'''Sjoerd de Bruin'''</fontspan>]] [[User talk:Sjoerddebruin|<fontspan facestyle="font-family: Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif" color="#325186"><small>(talk)</small></fontspan>]] 20:18, 8 January 2015 (UTC)
:[[File:Yes check.svg|20px|link=]] '''Done'''<!-- Template:EP --> Thanks for the update! — '''''[[User:Mr. Stradivarius|<span style="color: #194D00; font-family: Palatino, Times, serif">Mr.&nbsp;Stradivarius</span>]]''''' <sup>[[User talk:Mr. Stradivarius|♪&nbsp;talk&nbsp;♪]]</sup> 20:33, 8 January 2015 (UTC)
 
Line 61:
 
Also in the code
<sourcesyntaxhighlight lang=php>
if (typeof mw !== 'undefined' && typeof prevent_wd_auto_desc === 'undefined' ) { // On Wikidata
$(document).ready( function() {
if ( mw.config.get('wgSiteName') != 'Wikidata' ) return ;
...
</syntaxhighlight>
</source>
The comment <sourcesyntaxhighlight lang=php inline> // On Wikidata</sourcesyntaxhighlight> is on the wrong line, it should be after the test for <code>wgSiteName</code>.
 
2. Why is the script hosted on {{SERVERNAME}} when it only works on wikidata.org?
Line 73:
3. It looks like this script started out matching [https://bitbucket.org/magnusmanske/autodesc/src/HEAD/www/js/short_autodesc.js?at=master Magnus Manske's AutoDesc] code, but there's no mention of this in comments except the vague "The code hosted here also runs OUTSIDE of mediawiki scopes". Also the JavaScript on-wiki has drifted from the JS in that project.
 
4. It's unclear what it does on Wikidata. How do I know it's working? Even if I set <code>wd_auto_desc_wd_always_show = true;</code> in my common.js on Wikidata before this script, I never see its generated wikidata auto-description. I can invoke <code>loadItem()</code> by hand by pasting the following into the browser's developer tools JavaScript console:<sourcesyntaxhighlight lang=javascript>
wd_auto_desc.loadItem ( "Q2045965" , { callback: function ( q , html , opt ) {
console.log( "AutoDesc for " + q + " item=" + html );
} } ) ;
</syntaxhighlight>
</source>
and then it displays teh AutoDesc awesomeness:
: "AutoDesc for Q2045965 item=Indian author and autobiographer (*1940); Padma Shri and Sahitya Akademi Award; spouse of Surinder Singh ♀"
I'm not sure where this description is supposed to appear on the Wikidata page [[d:Q2045965]].
: I figured 4. out, the AutoDesc short descriptions appear on wikidata's [[d:Special:Search]] results page and in the search suggestions dropdown on www.wikidata.org that appears when you enter "Padma S...". This is obvious from the script name <ttcode>{{ARTICLEPAGENAME}}</ttcode> :-) , but a comment mentioning this would be nice. The AutoDesc doesn't display on individual Q''NNNN'' pages as I expected. -- [[User:SPage (WMF)|SPage (WMF)]] ([[User talk:SPage (WMF)|talk]]) 21:50, 20 August 2015 (UTC)
 
Thanks for any elucidation, and maybe someone with rights can add comments to the script clarifying these. -- [[User:SPage (WMF)|SPage (WMF)]] ([[User talk:SPage (WMF)|talk]]) 21:01, 20 August 2015 (UTC)
Line 101:
== Koninkrijk der Nederlanden ==
{{editrequest|answered=yes}}
Please add <code>'Koninkrijk der Nederlanden':'Nederlands'</code> to the nl-section, will come with more improvements later. [[User:Sjoerddebruin|<fontspan colorstyle="color: #325186">'''Sjoerd de Bruin'''</fontspan>]] [[User talk:Sjoerddebruin|<fontspan colorstyle="color: #325186"><small>(talk)</small></fontspan>]] 19:16, 13 August 2016 (UTC)
:{{notdone}} {{u|Sjoerddebruin}} I'm not sure "exactly" what you want done. Can you please provide a current line as-is, and with your change included below? (Then reactivate the edit request). — [[User:Xaosflux|<span style="color:#FF9933; font-weight:bold; font-family:monotype;">xaosflux</span>]] <sup>[[User talk:Xaosflux|<span style="color:#009933;">Talk</span>]]</sup> 22:49, 14 August 2016 (UTC)
::I think [[Special:Diff/734745225|this]] would do, as the former ones are no official nationalities. [[User:Sjoerddebruin|<fontspan colorstyle="color: #325186">'''Sjoerd de Bruin'''</fontspan>]] [[User talk:Sjoerddebruin|<fontspan colorstyle="color: #325186"><small>(talk)</small></fontspan>]] 12:33, 16 August 2016 (UTC)
:{{u|Sjoerddebruin}} That diff appears to '''remove''' entries, as well as add the new entry - is that what you intend?
 
Line 112:
</pre>
'''Change to''':{{?}}</br>
::Like I said, I removed those because they are not valid nationalities. [[User:Sjoerddebruin|<fontspan colorstyle="color: #325186">'''Sjoerd de Bruin'''</fontspan>]] [[User talk:Sjoerddebruin|<fontspan colorstyle="color: #325186"><small>(talk)</small></fontspan>]] 23:05, 19 August 2016 (UTC)
:::Hello?!? [[User:Sjoerddebruin|<fontspan colorstyle="color: #325186">'''Sjoerd de Bruin'''</fontspan>]] [[User talk:Sjoerddebruin|<fontspan colorstyle="color: #325186"><small>(talk)</small></fontspan>]] 21:02, 28 August 2016 (UTC)
::::Hi! {{done}} :) [[User:Legoktm|Legoktm]] ([[User talk:Legoktm|talk]]) 21:12, 28 August 2016 (UTC)