Tpt added a comment.

To summary the current state of the work on this task:

The plan is to have at least one function mw.wikibase.getEntityIdForTitle( pageTitle ) -> string|null that returns the entity id of the item related to the page on the current wiki with for title pageTitle. It is implemented in https://gerrit.wikimedia.org/r/357126

Some questions remain :

  • Should mw.wikibase.getEntityIdForTitle take as parameter a string, a mw.title object, or allow the two?
  • Should we have a new mw.wikibase.getEntityIdForGlobalTitle function that allows to specify a global site id like "enwiki"?
  • Instead of having a mw.wikibase.getEntityIdForGlobalTitle, should we resolve interwiki prefixes like "s:fr:" to site ids in order to allow the retrieval of entity ids from interwiki links using mw.wikibase.getEntityIdForTitle (e.g. mw.wikibase.getEntityIdForTitle('s:fr:Auteur:Jean-François_Champollion') would return Q260 even if called from English Wikipedia). This approach is probably more convenient for Lua module writers because interwiki links are usually written this way in wikitext.

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

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

To: Tpt
Cc: petr.matas, Supernino, Paucabot, gerritbot, Agabi10, Jan_Dittrich, srishakatux, Tpt, Jarekt, Wesalius, Zppix, czar, Strainu, Dvorapa, Base, Lucie, Pasleim, SJu, Bene, Herzi.Pinki, Mbch331, Daniel_Mietchen, Aklapper, Edgars2007, matej_suchanek, Aubrey, Accurimbono, ValterVB, Nemo_bis, Yair_rand, Liuxinyu970226, Candalua, Ricordisamoa, Wikidata-bugs, JulesWinnfield-hu, Lydia_Pintscher, hoo, GoranSMilovanovic, Adik2382, Th3d3v1ls, Ramalepe, Liugev6, QZanden, Lewizho99, Maathavan, SamanthaNguyen, Izno, aude, RandomDSdevel, He7d3r, Jdforrester-WMF, Ladsgroup, Jay8g, Tgr
_______________________________________________
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs

Reply via email to