Module:Sandbox/Wangxuan8331800/SB2: Difference between revisions
Appearance
Content deleted Content added
No edit summary |
No edit summary |
||
Line 26: | Line 26: | ||
local title = frame.args[1] |
local title = frame.args[1] |
||
bold = frame.args.bold |
bold = frame.args.bold |
||
local diff = frame.args.diff |
|||
local ja = frame.args.ja |
|||
local ko = frame.args.ko |
|||
local en = frame.args.en |
|||
local na = frame.args.na |
|||
local eu = frame.agrs.eu |
|||
local cn = frame.agrs.cn |
|||
local hk = frame.args.hk |
|||
local tw = frame.args.tw |
|||
local note = frame.args[2] |
|||
-- Load parameters end |
-- Load parameters end |
Revision as of 05:58, 1 February 2014
local p = {}
function yesno(a)
if a == ("yes" or "y" or "1") then
a = 1
elseif a == ("no" or "n" or "0") then
a = 0
end
return a
end
function bold_title(a)
if yesno(bold) == 0 then
else
a = '<b>' .. a .. '</b>'
end
return a
end
function p.vgname(frame)
-- Load parameters begin
local title = frame.args[1]
bold = frame.args.bold
-- Load parameters end
-- Main part begin
title = bold_title(title)
if yesno(bracket) ~= 0 then
title = '《' .. title .. '》'
end
-- Main part end
-- Japanese / Korean group end
return title .. '(' .. ')'
end
return p