模块:En:修订间差异
来自末世录
更多操作
https://simmc.huijiwiki.com/>Feral rage bot edit |
小 导入1个版本 |
||
(没有差异)
| |||
2026年3月28日 (六) 01:18的版本
此模块的文档可以在模块:En/doc创建
local p = {}
local wikipedia = "https://en.wikipedia.org/wiki/"
local noLang = false
local function genEn(frame)
local enPage = frame.args[1]
if enPage ~= nil then
enPage = enPage:gsub(" ", "_")
else
enPage = ""
end
local display = frame.args[2]
if display ~= nil and display ~= "" then
display = display:gsub("_", " ")
else
display = enPage:gsub("_", " ")
end
local title = mw.title.getCurrentTitle()
local res = "([" .. wikipedia .. enPage .. " " .. display .. "])"
-- end
if noLang ~= true then
res = res .. "[[en:" .. enPage:gsub("_", " ") .. "]]"
end
return res
end
function p.en(frame)
return genEn(frame)
end
function p.enNoLang(frame)
noLang = true
return genEn(frame)
end
return p