Rical added a comment. |
Each call of datas.property(pp) defines one property in the pp table.
The calling process contains a table to define all eventual properties.
p.args_known = { -- Table of the definitions of all known arguments at module level. -- All arguments have a keyword identical to the registration name, except synonyms. ["country"] = { ["typ"] = "dat", ["need"] = 0, ["keyword"] = "country", ["prop"] = "P27", }, ["countryRANK"] = { ["typ"] = "dat", ["need"] = 0, ["keyword"] = "country", ["prop"] = "P27", ["RANK"] = "RANK_NORMAL", }, ["birthyear"] = { ["typ"] = "dat", ["need"] = 2, ["keyword"] = "birthyear", ["prop"] = "P569", ["format"] = "year", }, ["deathyear"] = { ["typ"] = "dat", ["need"] = 2, ["keyword"] = "deathyear", ["prop"] = "P570", ["format"] = "year", }, ["lastname"] = { ["typ"] = "dat", ["need"] = 0, ["keyword"] = "lastname", ["prop"] = "P734", }, ["lastname2"] = { ["typ"] = "dat", ["need"] = 0, ["keyword"] = "lastname", ["prop"] = "P734", ["syn"] = 2, }, ["firstname"] = { ["typ"] = "dat", ["need"] = 0, ["keyword"] = "firstname", ["prop"] = "P735", }, ["firstname2"] = { ["typ"] = "dat", ["need"] = 0, ["keyword"] = "firstname", ["prop"] = "P735", ["syn"] = 2, }, ["title"] = { ["typ"] = "dat", ["need"] = 2, ["keyword"] = "label", ["prop"] = "P735", ["syn"] = 2, }, ["personlang"] = { ["typ"] = "dat", ["need"] = 2, ["keyword"] = "personlang", ["prop"] = "P1412", }, ["QITEM"] = { ["typ"] = "dat", ["need"] = 2, ["keyword"] = "QITEM", ["prop"] = "Q16222597", }, ["label"] = { ["typ"] = "dat", ["need"] = 0, ["keyword"] = "label", ["prop"] = "label", }, ["sitelink"] = { ["typ"] = "dat", ["need"] = 0, ["keyword"] = "sitelink", ["prop"] = "sitelink", }, ["description"] = { ["typ"] = "dat", ["need"] = 2, ["keyword"] = "description", ["prop"] = "description", }, }
I have used this structure for years and have change it when I need or when new mw.wikibase functions have appeared.
TASK DETAIL
EMAIL PREFERENCES
To: Rical
Cc: Lydia_Pintscher, hoo, thiemowmde, Uzume, Aklapper, Rical, Lahi, Gq86, GoranSMilovanovic, Soteriaspace, Jayprakash12345, JakeTheDeveloper, QZanden, Zoranzoki21, LawExplorer, Wikidata-bugs, aude, TheDJ, Mbch331
Cc: Lydia_Pintscher, hoo, thiemowmde, Uzume, Aklapper, Rical, Lahi, Gq86, GoranSMilovanovic, Soteriaspace, Jayprakash12345, JakeTheDeveloper, QZanden, Zoranzoki21, LawExplorer, Wikidata-bugs, aude, TheDJ, Mbch331
_______________________________________________ Wikidata-bugs mailing list Wikidata-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs