[Wikidata-bugs] [Maniphest] [Updated] T156344: Property: namespace as content

2017-01-26 Thread Andrei_Stroe
Andrei_Stroe removed a subtask: T156357: Edit quality campaign for Romanian Wikipedia.
TASK DETAILhttps://phabricator.wikimedia.org/T156344EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: Andrei_StroeCc: Lydia_Pintscher, EBernhardson, aude, dcausse, daniel, Aklapper, Smalyshev, D3r1ck01, Izno, Wikidata-bugs, Mbch331___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs


[Wikidata-bugs] [Maniphest] [Commented On] T76229: [Story] create demo infoboxes

2016-09-20 Thread Andrei_Stroe
Andrei_Stroe added a comment.
Thanks, @Strainu for the praise and for letting me know of this discussion.
By now, we have many infoboxes that have been refactored into working both in parameter-less mode, and with local override.

I had to heavily enhance https://ro.wikipedia.org/wiki/Modul:Wikidata in order to make it expose some functions that provide exactly what is needed in an infobox starting from an item, such as getOneValue (returns one value from those with the highest rank), getOneValueNoRef (same without reference), getValueListWithSeparator, getTimestampedValueListWithSeparator, getDateValue, getPreferredValue.

An example of infobox that uses these functions is https://ro.wikipedia.org/wiki/Format:Infocaseta_Joc_video

Other infoboxes were rewritten in LUA, such as https://ro.wikipedia.org/wiki/Format:Infocaseta_A%C8%99ezare and https://ro.wikipedia.org/wiki/Format:Infocaseta_Fotbalist

https://ro.wikipedia.org/wiki/Format:Infocaseta_Biografie was rewritten in LUA as a basic infobox for biographies (and takes multiple biographical data from Wikidata, such as birth date and place, occupation etc.). It can, however, be extended into more specific biography infoboxes, both in LUA, such as https://ro.wikipedia.org/wiki/Format:Infocaseta_Om_politic for politicians and https://ro.wikipedia.org/wiki/Format:Infocaseta_Actor for actors; and with basic parameters, such as https://ro.wikipedia.org/wiki/Format:Infocaseta_Artist for painters and other visual artists.

I avoided creating infoboxes for use with Wikidata that are separate from those with specified parameters in order to push the move towards Wikidata. The only example of such infobox is https://ro.wikipedia.org/wiki/Format:Taxobox-wd (LUA-based, only works with Wikidata as a parameter-less infobox) that is different than https://ro.wikipedia.org/wiki/Format:Taxobox (which still works with parameters only) - this is a complex infobox in a field of which I know little (biological taxonomy), so I wanted to avoid intruding in such an area.

I hope this is useful, just tag me if there is more I can do in this area.TASK DETAILhttps://phabricator.wikimedia.org/T76229EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: Andrei_StroeCc: Strainu, Andrei_Stroe, Base, RexxS, Tobias1984, WikedKentaur, VIGNERON, jeblad, Smalyshev, Wesalius, Lucie, Jonas, Aklapper, putnik, Prod, Ainali, HenkvD, ValterVB, Snipre, Liuxinyu970226, Lydia_Pintscher, hoo, D3r1ck01, Izno, Psychoslave, Wikidata-bugs, aude, TheDJ, Mbch331___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs


[Wikidata-bugs] [Maniphest] [Commented On] T57755: allow time values more precise than day

2017-03-09 Thread Andrei_Stroe
Andrei_Stroe added a comment.
I tried this today via API, and it seems indeed that the limitation is in the API now.  If I use the API to push a date with precision 12 (to the hour), I get:

"error": {
"code": "modification-failed",
"info": "Out of range, must be no higher than 11",
"messages": [
{
"name": "wikibase-validator-too-high",
"parameters": [
"11",
"12"
],
"html": {
"*": "Out of range, must be no higher than 11"
}
}
],
"*": "See https://www.wikidata.org/w/api.php for API usage. Subscribe to the mediawiki-api-announce mailing list at https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce for notice of API deprecations and breaking changes."
},

If I try with any number other than 0 in the hour slot, I get:

"error": {
"code": "modification-failed",
"info": "Malformed input: +2017-03-09T02:00:00Z",
"messages": [
{
"name": "wikibase-validator-malformed-value",
"parameters": [
"+2017-03-09T02:00:00Z"
],
"html": {
"*": "Malformed input: +2017-03-09T02:00:00Z"
}
}
],
"*": "See https://www.wikidata.org/w/api.php for API usage. Subscribe to the mediawiki-api-announce mailing list at https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce for notice of API deprecations and breaking changes."
},

So, @sladen , it's from both the precision greater than 11, and from the hour part of the timestamp being different than 00:00:00.

The + at the year is supposed to be there and is valid.TASK DETAILhttps://phabricator.wikimedia.org/T57755EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: Andrei_StroeCc: Andrei_Stroe, Jklamo, sladen, Liuxinyu970226, Esc3300, Edgars2007, ChristianKl, Saehrimnir, Jc3s5h, Mike_Peel, Thryduulf, Jobu0101, Laddo, Aklapper, MGChecker, Yair_rand, Apsdehal, Wikidata-bugs, Ricordisamoa, Lydia_Pintscher, Ltrlg, D3r1ck01, Izno, aude, Mbch331___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs


[Wikidata-bugs] [Maniphest] [Commented On] T172592: Badges are no longer shown next to interwiki links

2017-08-08 Thread Andrei_Stroe
Andrei_Stroe added a comment.
We seem to be having the same problem on ro.wpTASK DETAILhttps://phabricator.wikimedia.org/T172592EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: Ladsgroup, Andrei_StroeCc: Andrei_Stroe, gerritbot, Obsuser, He7d3r, Liuxinyu970226, Stryn, Dvorapa, MrFulano, Vachovec1, Ladsgroup, TTO, Lydia_Pintscher, Aklapper, Srdjan_m, PokestarFan, Lordiis, GoranSMilovanovic, Adik2382, Jrbranaa, Th3d3v1ls, Ramalepe, Liugev6, QZanden, Lewizho99, Maathavan, Johan, Izno, Luke081515, Wikidata-bugs, aude, TheDJ, Mbch331, Jay8g___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs


[Wikidata-bugs] [Maniphest] [Created] T176124: Lua: Make it possible to load all statements for only one property of an entity using mw.wikibase

2017-09-18 Thread Andrei_Stroe
Andrei_Stroe created this task.Andrei_Stroe added a project: Wikidata.Herald added a subscriber: Aklapper.
TASK DESCRIPTIONThe work done phab:T172905 resulted in the availability of the mw.wikibase.getBestStatements function that helps makes tracking Wikidata more efficient. At rowiki, this has helped us drastically reduce the tracking of entire entities and made queries more efficient.

We could still do more; especially if we had some function that doesn't limit itself to just the "best" statements for an entity. We have some use cases that might benefit from that.

One example is our HistoricalCuntries module which lists all the countries in which a city (or anything for that matter) was throughout history. In this case, P17 (country) for the entity will have one 'preferred' statement (with the current country), as well as more 'normal' statements, with P580 and P582 qualifiers for the historic ones. We also do a lot more magic with these 'normal' statements hidden beneath one or more 'preferred' ones: we extract the country and official name of a town for a specific date in time - for instance, to show that when Max Born was born (pun not intended) in 1882, he was born in Breslau, German Empire, not Wrocław, Poland (as it is today). We do similar stuff with flags for countries that changed their flag throughout their existence.

So, we still have a lot of code that loads an entire entity just to cycle through the claims associated with only one property, and the usage tracking of these entities could be helped a lot by something similar to mw.wikibase.getBestStatements, only with the 'best' part left out.TASK DETAILhttps://phabricator.wikimedia.org/T176124EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: Andrei_StroeCc: Aklapper, hoo, Andrei_Stroe, GoranSMilovanovic, QZanden, Izno, Wikidata-bugs, aude, Mbch331___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs


[Wikidata-bugs] [Maniphest] [Commented On] T176124: Lua: Make it possible to load all statements for only one property of an entity using mw.wikibase

2017-09-27 Thread Andrei_Stroe
Andrei_Stroe added a comment.
Yes, it's perfectly OK, because the code I'm going to replace with a call to this function is brutely iterating through the claims table.
Further filtering should be left to the calling module.TASK DETAILhttps://phabricator.wikimedia.org/T176124EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: hoo, Andrei_StroeCc: gerritbot, Lydia_Pintscher, eranroz, Aklapper, hoo, Andrei_Stroe, Lordiis, GoranSMilovanovic, Adik2382, Th3d3v1ls, Ramalepe, Liugev6, QZanden, Lewizho99, Maathavan, Izno, Wikidata-bugs, aude, Mbch331___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs