请输入您要查询的百科知识:

 

词条 Module:Other people
释义

local mOtheruses = require('Module:Other uses')

local mArguments = require('Module:Arguments')

local compressArray = require('Module:TableTools').compressSparseArray

local p = {}

function p.otherPeople (frame)

--Get arguments

local origArgs = mArguments.getArgs(frame)

local named = origArgs.named

local args = compressArray(origArgs)

if not origArgs[1] then table.insert(args, 1, nil) end

-- Assemble arguments and return

local title = args[1] or mw.title.getCurrentTitle().text

local options = {

title = title,

defaultPage = args[2],

otherText = (args[2] and not args[1] and 'people with the same name') or

string.format('people %s %s', named or 'named', title)

}

-- Don't pass args[1] through as a target page. Manual downshift because Lua

-- expectation of sequences means table.remove() doesn't necessarily work

for i = 2, math.max(table.maxn(args), 2) do

args[i - 1] = args[i]

args[i] = nil

end

return mOtheruses._otheruses(args, options)

end

return p

随便看

 

开放百科全书收录14589846条英语、德语、日语等多语种百科知识,基本涵盖了大多数领域的百科知识,是一部内容自由、开放的电子版国际百科全书。

 

Copyright © 2023 OENC.NET All Rights Reserved
京ICP备2021023879号 更新时间:2024/9/21 2:35:36