跳转到内容
主菜单
主菜单
移至侧栏
隐藏
导航
首页
最近更改
随机页面
MediaWiki帮助
二次元百科
搜索
搜索
外观
创建账号
登录
个人工具
创建账号
登录
查看“︁Module:Nihongo”︁的源代码
模块
讨论
English
阅读
查看源代码
查看历史
工具
工具
移至侧栏
隐藏
操作
阅读
查看源代码
查看历史
常规
链入页面
相关更改
特殊页面
页面信息
外观
移至侧栏
隐藏
←
Module:Nihongo
因为以下原因,您没有权限编辑该页面:
您请求的操作仅限属于该用户组的用户执行:
用户
您可以查看和复制此页面的源代码。
require('Module:No globals') local getArgs = require('Module:Arguments').getArgs local yesno = require('Module:Yesno') local function ja(text) return '<span lang="ja" xml:lang="ja">-{' .. text ..'}-</span>' end local function romaji(text) return '<span lang="ja-Latn" xml:lang="ja-Latn" title="平文式罗马字">-{' .. text .. '}-</span>' end local function label(args, label, content) if yesno(args.lead) then return label .. ':' .. content end return content end local p = {} function p.main(frame) local args = getArgs(frame, {frameOnly = true}) return p._main(args) end function p._main(args) local bracketArr, temp = {} if args[1] then if args[2] then table.insert(bracketArr, label(args, '[[日语]]', ja(args[2]))) end if args['romaji'] then table.insert(bracketArr, label(args, '[[平文式罗马字|罗马字]]', romaji(args['romaji']))) end if args[3] then table.insert(bracketArr, args[3]) end if args[4] then table.insert(bracketArr, args[4]) end if #bracketArr > 0 then temp = '(' .. table.concat(bracketArr, ',') .. ')' end if args[5] then temp = temp and (temp .. ' ' .. args[5]) or (' ' .. args[5]) end if temp then return string.format('%s<span style="font-weight: normal;">%s</span>', args[1], temp) end return args[1] end if args['romaji'] then if args[2] then table.insert(bracketArr, label(args, '[[日语]]', ja(args[2]))) end if args[3] then table.insert(bracketArr, args[3]) end if args[4] then table.insert(bracketArr, args[4]) end if #bracketArr > 0 then temp = '(' .. table.concat(bracketArr, ',') .. ')' end if args[5] then temp = temp and (temp .. ' ' .. args[5]) or (' ' .. args[5]) end if temp then return string.format('%s<span style="font-weight: normal;">%s</span>', romaji(args.romaji), temp) end return romaji(args.romaji) end if args[3] then if args[2] then table.insert(bracketArr, label(args, '[[日语]]', ja(args[2]))) end if args[4] then table.insert(bracketArr, args[4]) end if #bracketArr > 0 then temp = '(' .. table.concat(bracketArr, ',') .. ')' end if args[5] then temp = temp and (temp .. ' ' .. args[5]) or (' ' .. args[5]) end if temp then return string.format('%s<span style="font-weight: normal;">%s</span>', args[3], temp) end return args[3] end if args[2] then if args[4] then temp = '(' .. args[4] .. ')' end if args[5] then temp = temp and (temp .. ' ' .. args[5]) or (' ' .. args[5]) end if temp then return string.format('%s<span style="font-weight: normal;">%s</span>', ja(args[2]), temp) end return ja(args[2]) end if args[4] then if args[5] then return args[4] .. '<span style="font-weight: normal;"> ' .. args[5] .. '</span>' end return args[4] end if args[5] then return args[5] end return '' end return p
返回
Module:Nihongo
。