Last modified: 2013-05-21 13:59:19 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T47682, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 45682 - Add a parser function to get the label in a given language
Add a parser function to get the label in a given language
Status: RESOLVED WONTFIX
Product: MediaWiki extensions
Classification: Unclassified
WikidataRepo (Other open bugs)
unspecified
All All
: Unprioritized normal with 1 vote (vote)
: ---
Assigned To: Wikidata bugs
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-03-04 03:27 UTC by jeblad
Modified: 2013-05-21 13:59 UTC (History)
5 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description jeblad 2013-03-04 03:27:11 UTC
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
Comment 1 jeblad 2013-03-04 03:50:23 UTC
https://gerrit.wikimedia.org/r/51977
Comment 2 jeblad 2013-03-05 10:27:46 UTC
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.
Comment 3 jeblad 2013-03-06 16:54:36 UTC
Remember to add items like link as it is done at line 362 in https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/extensions/ParserFunctions.git;a=blob;f=ParserFunctions_body.php;hb=HEAD
Comment 4 denny vrandecic 2013-03-20 16:17:59 UTC
This needs a design pass. The problem needs a solution, but we shouldn't introduce yet another syntax for data access.
Comment 5 abraham.taherivand 2013-05-21 13:59:19 UTC
This can be done with template using LUA.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links