MediaWiki talk:Wdsearch-autodesc.js: Difference between revisions
Content deleted Content added
add section title, to fix TOC position |
m Replaced deprecated <source> tags with <syntaxhighlight> (via WP:JWB) |
||
Line 3:
{{editprotected|ans=yes}}
Please add to the list of nationalities:
<
language_specific : { el : { 'nationality' : {
'Αυστρία':'Αυστριακός', 'Ηνωμένες Πολιτείες Αμερικής':'Αμερικανός', 'Σουηδία':'Σουηδός', 'Πολωνία':'Πολωνός', 'Ουκρανία':'Ουκρανός', 'Ιρλανδία':'Ιρλανδός', 'Σερβία':'Σέρβος', 'Γιουγκοσλαβία':'Γιουγκοσλάβος'
</syntaxhighlight>
Thanks. -[[User:Geraki|<font color="green">'''geraki'''</font>]] <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)
Line 61:
Also in the code
<
if (typeof mw !== 'undefined' && typeof prevent_wd_auto_desc === 'undefined' ) { // On Wikidata
$(document).ready( function() {
if ( mw.config.get('wgSiteName') != 'Wikidata' ) return ;
...
</syntaxhighlight>
The comment <
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:<
wd_auto_desc.loadItem ( "Q2045965" , { callback: function ( q , html , opt ) {
console.log( "AutoDesc for " + q + " item=" + html );
} } ) ;
</syntaxhighlight>
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 ♀"
|