Page MenuHomePhabricator

Add a parser function to get the label in a given language
Closed, DeclinedPublic

Description

It should be possible to get the label in a given language. This would be useful for templates and similar things, but also for discussion in general where it would be possible to write out labels for items.

See also https://www.wikidata.org/wiki/Wikidata:Project_chat#Localized_links_to_items


Version: unspecified
Severity: normal
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=45659

Details

Reference
bz45682

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 1:16 AM
bzimport set Reference to bz45682.
bzimport added a subscriber: Unknown Object (MLST).

The changeset implements {{link:q1}}, {{label:q1}} and {{description:q1}} with optional language specifiers. If the language specifiers are not used the global fallbacks are used. The parser functions will generate a link like in recent changes, or a html-representation of a label or a description.

It could be interesting to have a parser function that will link to a site through its sitelink in the item, that is not implemented.

Purpose is for use on ordinary wikipages on the repo, not on the client. How to look up the item from the prefixed id is somewhat different from the client.

There is another bug about getting the number of sitelinks. That is not considered here, that is more about statistics for the item.

This needs a design pass. The problem needs a solution, but we shouldn't introduce yet another syntax for data access.

This can be done with template using LUA.

Restricted Application added a subscriber: StudiesWorld. · View Herald Transcript