编辑“︁
Module:CGroupViewer2
”︁
跳转到导航
跳转到搜索
警告:
您没有登录。如果您进行任何编辑,您的IP地址会公开展示。如果您
登录
或
创建账号
,您的编辑会以您的用户名署名,此外还有其他益处。
反垃圾检查。
不要
加入这个!
local z = {} local error = require( 'Module:Error' ) local function makeText( frame, v ) local text = v.text if not v.preprocessed then text = frame:preprocess( text ) end return mw.text.trim( text ) .. '\n' end local function makeItem( frame, v ) local text = '* ' if v.original then text = text .. '原文:' .. v.original .. ';' end return text .. '-{D|' .. v.rule .. '}-当前显示为:-{|' .. v.rule .. '}-\n' end function z.sandboxshow( frame ) local name = frame.args[1] if not name or name == '' then return '' end local data = require( 'Module:' .. name ) local text = '-{H|zh-hans:模块;zh-hant:模組}-<strong>以下是[[Wikipedia:字詞轉換處理/公共轉換組|公共转换组]]“' .. data.description .. '”的沙盒。</strong>\n\n' for i, v in ipairs( data.content ) do if v.type == 'text' then text = text .. makeText( frame, v ) elseif v.type == 'item' then text = text .. makeItem( frame, v ) end end text = text .. '[[Category:公共转换组模块|sandbox]]' return text end function z._conversion(frame, args) local name = args[1] if not name or name == '' then return '' end local data = require( 'Module:CGroup/' .. name ) if type( data ) ~= 'table' or not data.name or data.name == '' then return error.error{ '指定-{zh-hans:模块;zh-hant:模組};-“' .. name .. '”不是有效的转换组' } end local text = string.format([=[ <!-- 公共转换组%s https://zh.wikipedia.org/wiki/Module:CGroup/%s \n 公共轉換組%s https://zh.wikipedia.org/wiki/Module:CGroup/%s 這是此公共轉換組的純轉換版 \n Chinese Conversion Group(CGroup) - %s Copy from https://zh.wikipedia.org/wiki/Module:CGroup/%s You can use {{#invoke:CGroupViewer2|main|%s}} in chinese wikipedia to find they. --> ]=], name, name, name, name, name, name, name) for i, v in ipairs( data.content ) do if v.type == 'text' then if not v.preprocessed then text = text .. '<!--\n' .. v.text .. '-->\n' end elseif v.type == 'item' then if v.original then text = text .. '-{H|' .. v.rule .. '}-<!--' .. v.original .. '-->\n' else text = text .. '-{H|' .. v.rule .. '}-\n' end end end text = text .. '' return text end function z.main( frame ) local args = {} for k, v in pairs( frame.args ) do args[k] = v end return '<div style="dispaly:none">' .. string.gsub(z._conversion(frame, args), '\\n', '----') .. '</div>' end function z.main2( frame ) local args = {} for k, v in pairs( frame.args ) do args[k] = v end local pre = string.format('<pre>%s</pre>', z._conversion(frame, args)) pre = string.gsub(pre, '!', '!') pre = string.gsub(pre, '=', '=') pre = string.gsub(pre, 'h', 'h') pre = string.gsub(pre, '%[', '[') pre = string.gsub(pre, '%]', ']') pre = string.gsub(pre, '{', '{') pre = string.gsub(pre, '|', '|') pre = string.gsub(pre, '}', '}') pre = string.gsub(pre, '{{', '{{') pre = string.gsub(pre, '\\n', '----') return pre end function z.showlua(frame, args) local name = frame.args[1] if not name or name == '' then return '' end local data = require( 'Module:CGroup/' .. name ) if type( data ) ~= 'table' or not data.name or data.name == '' then return error.error{ '指定-{zh-hans:模块;zh-hant:模組};-“' .. name .. '”不是有效的转换组' } end return mw.getCurrentFrame():preprocess('<syntaxhighlight lang="lua">' .. mw.title.new('Module:CGroup/' .. name):getContent() .. '</syntaxhighlight>') end return z
摘要:
请注意,所有对Local Chinese Wikipedia的贡献均可能会被其他贡献者编辑、修改或删除。如果您不希望您的文字作品被随意编辑,请不要在此提交。
您同时也向我们承诺,您提交的内容为您自己所创作,或是复制自公共领域或类似自由来源(详情请见
Project:著作权
)。
未经许可,请勿提交受著作权保护的作品!
取消
编辑帮助
(在新窗口中打开)
导航菜单
个人工具
未登录
讨论
贡献
创建账号
登录
命名空间
模块
讨论
English
查看
阅读
编辑
查看历史
更多
搜索
导航
首页
最近更改
随机页面
MediaWiki帮助
工具
链入页面
相关更改
特殊页面
页面信息