Modul:Available: Perbedaan antara revisi

Konten dihapus Konten ditambahkan
Tidak ada ringkasan suntingan
Tidak ada ringkasan suntingan
 
(22 revisi perantara oleh pengguna yang sama tidak ditampilkan)
Baris 4:
local label = ""
for i,v in ipairs(frame.args) do
-- if ( mw.wikibase.label( frame.args[i] ) ) then
-- label = mw.wikibase.label( frame.args[i] )
-- else
-- label = "[[w:d:" .. trim(frame.args[i]) .. "|" .. trim(frame.args[i]) .. "]]"
-- end
-- link_available = link_available .. "\n| " .. mw.wikibase.getEntity().idlabel .. "\n| "
 
-- if ( mw.wikibase.sitelink( frame.args[i] ) ) then
local code = mw.language.getContentLanguage():getCode()
-- link_available = link_available .. "[[" .. mw.wikibase.sitelink( frame.args[i] ) .. "]]"
--[[
if code == nil then return nil endelse
-- link_available = link_available .. '<span style="color:red">' .. label .. '</span>'
local entity = php.getEntity( id )
-- end
if entity == nil or entity.labels == nil then return nil end
link_available = link_available .. "[[" .. mw.wikibase.sitelink( frame.args[i] ) .. "]]\n|-\n"
local label = entity.labels[code]
if label == nil then return nil end
return label.value
--]]
link_available = link_available .. "\n| " .. code .. ":" .. mw.wikibase.label( frame.args[i] ) .. "\n| "
 
 
-- link_available = link_available .. "\n| " .. mw.wikibase.getEntity().id .. "\n| "
 
 
-- if ( mw.wikibase.sitelink( frame.args[i] ) ) then
-- link_available = link_available .. "[[" .. mw.wikibase.sitelink( frame.args[i] ) .. "]]"
-- else
-- link_available = link_available .. '<span style="color:red">' .. label .. '</span>'
-- end
link_available = link_available .. "[[" .. mw.wikibase.sitelink( frame.args[i] ) .. "]]"
end
link_available = link_available .. "\n|}"