Module:links/templates: Difference between revisions

Jump to navigation Jump to search
no edit summary
(Undo revision 234187 by Sware (talk))
Tag: Undo
No edit summary
Line 7: Line 7:
[[Module:scripts]]
[[Module:scripts]]
[[Module:parameters]]
[[Module:parameters]]
[[Module:debug]]
]=]
]=]


Line 35: Line 34:
["ts"] = {},
["ts"] = {},
["sc"] = {},
["sc"] = {},
["w"] = {type = "boolean", default = true},
}
}
Line 50: Line 50:
local lang = args[compat and "lang" or 1]
local lang = args[compat and "lang" or 1]
-- Tracking for missing language or und
if not lang then
require("Module:debug").track("link/no lang")
elseif lang == "und" then
require("Module:debug").track("link/und")
end
lang = lang or "und"
lang = lang or "und"
Line 76: Line 69:
end
end
-- Forward the information to full_link
local language_name = args.w and lang:makeWikipediaLink() or lang:getCanonicalName()
return require("Module:links").full_link(  
{
if term == "-" then
lang = lang,  
return language_name
sc = sc,  
else
term = term,
return language_name .. " " ..
alt = alt,  
require("Module:links").full_link(  
id = args["id"],  
{
tr = args["tr"],
lang = lang,  
ts = args["ts"],
sc = sc,  
genders = args["g"],  
term = term,
gloss = args["gloss"],  
alt = alt,  
pos = args["pos"],  
id = args["id"],  
lit = args["lit"],
tr = args["tr"],
nocont = true,
ts = args["ts"],
accel = args["accel-form"] and {
genders = args["g"],  
form = args["accel-form"],
gloss = args["gloss"],  
translit = args["accel-translit"],
pos = args["pos"],  
lemma = args["accel-lemma"],
lit = args["lit"],
lemma_translit = args["accel-lemma-translit"],
nocont = true,
gender = args["accel-gender"],
accel = args["accel-form"] and {
nostore = args["accel-nostore"],
form = args["accel-form"],
} or nil,
translit = args["accel-translit"],
},
lemma = args["accel-lemma"],
face,
lemma_translit = args["accel-lemma-translit"],
allowSelfLink
gender = args["accel-gender"],
)
nostore = args["accel-nostore"],
} or nil,
},
face,
allowSelfLink
)
end
end
end


Line 211: Line 210:
local lang = args[compat and "lang" or 1]
local lang = args[compat and "lang" or 1]
-- Tracking for missing language or und
if not lang then
require("Module:debug").track("link/no lang")
elseif lang == "und" then
require("Module:debug").track("link/und")
end
lang = lang or "und"
lang = lang or "und"

Navigation menu