thiemowmde added a comment.

  I might oversimplify this, but exposing the API endpoint should be possible 
like that:
  
  name=In SpecialMathWikibase.php
    $settings = WikibaseClient::getDefaultInstance()->getSettings();
    $url = $settings->getSetting( 'repoUrl' );
    $scriptPath = $settings->getSetting( 'repoScriptPath' );
    $this->getOutput()->addJsConfigVars( 'repoApiUrl', $url . $scriptPath . 
'/api.php' );
  
  name=In ext.math.wikibase.js
    var repoApiUrl = mw.config.get( 'repoApiUrl' );
  
  For the language, the code currently uses `mw.config.get( 'wgContentLanguage' 
)`. I think this is fine. It's what I would do as well.

TASK DETAIL
  https://phabricator.wikimedia.org/T229939

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Physikerwelt, thiemowmde
Cc: Liuxinyu970226, Ladsgroup, Lucas_Werkmeister_WMDE, hoo, Aklapper, MaxSem, 
thiemowmde, Tgr, cscott, Niedzielski, Esanders, Physikerwelt, Andreg-p, 
Akuckartz, darthmon_wmde, Nandana, Hagarshilo, Lahi, Gq86, GoranSMilovanovic, 
Maosef, QZanden, LawExplorer, Debenben, _jensen, rosalieper, xSavitar, 
Scott_WUaS, Izno, ferdbold, Wikidata-bugs, aude, fredw, Pkra, Gryllida, 
Ricordisamoa, scfc, Jdforrester-WMF, Mbch331, Jay8g
_______________________________________________
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs

Reply via email to