petr.matas added a comment.

In T74815#3314217, @Tpt wrote:

Some questions remain :

The mw.title object is a strong weapon, which solves all remaining questions: If mw.wikibase.getEntityIdForTitle(titleString) is a shorthand for mw.wikibase.getEntityIdForTitle(mw.title.new(titleString)), we will get a simple and consistent API and we can refer the user to mw.title for all peculiarities. No additional ("Global") function will be needed.

Let us also have shorthands:

  • getEntityId()getEntityIdForCurrentPage()
  • getEntityId(title)getEntityIdForTitle(title)

Finally it should be considered that a given title may refer to a redirect, which itself may or may not be connected to a WD entity. In the latter case, the user may want to follow the redirect (or redirect chain if multiple redirects are allowed) to the (first) page which is connected. This behavior could be controlled by a table of options supplied to the function as a second parameter.


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

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

To: petr.matas
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
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs

Reply via email to