As a template editor I want to be able to access the Lemma(s) of a Lexeme in order to show a meaningful representation instead of just an ID to the user.
In order to be able to reference a Lexeme in wiki text and show its Lemma we should have a Lua function that takes a Lexeme ID and returns the Lemma of that Lexeme.
Example:
for example mw.wikibase.getLemmas( lexemeId ) would return a table (indexed by language codes) holding tables consisting of the language + the lemma (like in the JSON representation). Like de => { language => 'de', value => 'Haus' }.
See also https://www.mediawiki.org/wiki/Extension:Wikibase_Client/Lua
BDD
GIVEN
AND
WHEN
AND
THEN
AND
Acceptance criteria:
Open questions:
- How do we want to track these data usages? We will initially start with tracking them as other usages, and potentially create a more specific usage type later on (or track them as label usages once WikibaseClient is ready for that).
- Can we do the same for Forms/Senses? Yes: mw.wikibase.getGlosses( senseId )/mw.wikibase.getReprensetations( formId )
- What do we return if there are multiple Lemmas? Should they just be concatenated or should they hint which spelling variant they have? We will return everything (equivalent to JSON format)
- Do you want to be able to select a specific spelling variant's Lemma with another function? For now, no.
- Currently Lua is disabled for access to Lexeme data. How did we do this? Can we re-enable it just bit-by-bit? Yes, this is independent from getting whole entities.