Difference between revisions of "Module:TNT"
Jump to navigation
Jump to search
deprecate link function, always use c: for data links to Commons
en>Yurik (fix doc translation link) |
en>Yurik (deprecate link function, always use c: for data links to Commons) |
||
Line 68: | Line 68: | ||
end | end | ||
-- | -- Obsolete function that adds a 'c:' prefix to the first param. | ||
-- "Sandbox/Sample.tab" -> ' | -- "Sandbox/Sample.tab" -> 'c:Data:Sandbox/Sample.tab' | ||
function p.link(frame) | function p.link(frame) | ||
return link(frame.args[1]) | return link(frame.args[1]) | ||
Line 158: | Line 158: | ||
-- Given a dataset name, convert it to a title with the 'commons:data:' prefix | -- Given a dataset name, convert it to a title with the 'commons:data:' prefix | ||
link = function(dataset) | link = function(dataset) | ||
return 'c:Data:' .. mw.text.trim(dataset or '') | |||
end | end | ||